/* Main container styles */
.fw-crm-vce-fluentcrm-company-report {
    font-family: Arial, sans-serif;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 20px;
    position: relative;
}

/* Header styling */
.fw-crm-vce-fluentcrm-company-report h2.fw-crm-vce-report-title {
    color: #005095;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Hide company name if needed to match design */
.fw-crm-vce-fluentcrm-company-report h3.fw-crm-vce-company-name {
    display: block !important;
    color: #005095;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Table container for horizontal scrolling */
.fw-crm-vce-report-content {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

/* Table Styles with horizontal scrolling */
.fw-crm-vce-report-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    border-collapse: separate; /* Changed from collapse for sticky columns */
    border-spacing: 0;
    margin-bottom: 30px;
    font-size: 14px;
}

.fw-crm-vce-report-table th {
    background-color: #005b97 !important;
    color: #FFFFFF;
    font-weight: bold;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    position: relative;
}

/*.fw-crm-vce-report-table th:after {*/
/*    content: "▼";*/
/*    font-size: 10px;*/
/*    margin-left: 5px;*/
/*    opacity: 0.5;*/
/*}*/

.fw-crm-vce-report-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

/* Alternating row colors */
.fw-crm-vce-report-table tr:nth-child(odd) {
    background-color: #f5f5f5;
}

.fw-crm-vce-report-table tr:nth-child(even) {
    background-color: #ffffff;
}

/* Fixed columns (name and email) */
.fw-crm-vce-report-table th.fw-crm-vce-col-name,
.fw-crm-vce-report-table td.fw-crm-vce-col-name {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: inherit; /* Maintains row background color */
    border-right: 1px solid #ddd;
}

.fw-crm-vce-report-table th.fw-crm-vce-col-email,
.fw-crm-vce-report-table td.fw-crm-vce-col-email {
    position: sticky;
    left: 150px; /* Adjust based on the width of the name column */
    z-index: 2;
    background-color: inherit;
    border-right: 1px solid #ddd;
}

/* Add shadow effect to indicate scrolling */
.fw-crm-vce-report-table td.fw-crm-vce-col-email:after {
    content: "";
    position: absolute;
    top: 0;
    right: 1px;
    bottom: 0;
    width: 5px;
    /*box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);*/
    pointer-events: none;
}

/* Adjust the column widths */
.fw-crm-vce-report-table .fw-crm-vce-col-name {
    min-width: 150px;
}

.fw-crm-vce-report-table .fw-crm-vce-col-email {
    min-width: 200px;
}

.fw-crm-vce-report-table .fw-crm-vce-col-tag,
.fw-crm-vce-report-table .fw-crm-vce-col-tag-status {
    min-width: 120px;
    background-color: transparent;
}

/* For tables with 4 columns total (2 tag columns) */
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-4 th:nth-child(3),
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-4 th:nth-child(4) {
    width: 50%;
}

/* For tables with 5 columns total (3 tag columns) */
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-5 th:nth-child(3),
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-5 th:nth-child(4),
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-5 th:nth-child(5) {
    width: 33.33%;
}

/* For tables with 6 columns total (4 tag columns) */
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-6 th:nth-child(3),
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-6 th:nth-child(4),
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-6 th:nth-child(5),
.fw-crm-vce-report-table.fw-crm-vce-tag-columns-6 th:nth-child(6) {
    width: 25%;
}

/* Report controls with responsive layout */
.fw-crm-vce-report-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.fw-crm-vce-report-controls .fw-crm-vce-search-container {
    flex: 1;
    min-width: 200px;
}

.fw-crm-vce-report-controls .fw-crm-vce-search-container input {
    border: 2px solid #005095;
    border-radius: 5px;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    font-size: 14px;
    height: 40px !important;
}

.fw-crm-vce-report-controls .fw-crm-vce-search-container input::placeholder {
    color: #005095;
    font-weight: bold;
}

.fw-crm-vce-report-controls .fw-crm-vce-search-container input:focus {
    border: 2px solid #005095;
    border-radius: 5px;
    color: #005095;
    font-weight: bold;
    outline: none;
}

/* Export button styling */
.fw-crm-vce-report-controls .fw-crm-vce-export-container {
    display: flex;
    align-items: center;
}

.fw-crm-vce-report-controls .fw-crm-vce-export-container .fw-crm-vce-export-button {
    background: #005b97;
    color: #FFFFFF;
    font-weight: bold;
    padding: 14px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Add CSV icon for mobile */
.fw-crm-vce-report-controls .fw-crm-vce-export-container .fw-crm-vce-export-button:before {
    content: "";
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>');
    width: 16px;
    height: 16px;
    display: none;
    background-repeat: no-repeat;
}

/* Show only icon on mobile, text on desktop */
@media (max-width: 576px) {
    .fw-crm-vce-report-table th.fw-crm-vce-col-email,
    .fw-crm-vce-report-table td.fw-crm-vce-col-email {
        position: relative;
        left: 0;
        background-color: inherit;
    }

    .fw-crm-vce-report-controls .fw-crm-vce-export-container .fw-crm-vce-export-button:before {
        display: inline-block;
    }

    .fw-crm-vce-report-controls .fw-crm-vce-export-container .fw-crm-vce-export-button span {
        display: none;
    }

    .fw-crm-vce-report-controls .fw-crm-vce-export-container .fw-crm-vce-export-button {
        padding: 8px;
    }
}

/* Tag indicators styling to match screenshot */
.fw-crm-vce-report-table .fw-crm-vce-tag-indicator {
    display: none; /* Hide checkmarks and dashes */
}

.fw-crm-vce-report-table .fw-crm-vce-has-tag {
    font-weight: normal; /* Remove bold from checkmarks */
}

/* Change highlight style */
.fw-crm-vce-highlighted-tag {
    background-color: transparent !important;
}

.fw-crm-vce-non-highlighted-tag {
    background-color: #005b97;
}

/* Ensure headers have the same background color when sticky */
.fw-crm-vce-report-table th.fw-crm-vce-col-name,
.fw-crm-vce-report-table th.fw-crm-vce-col-email {
    background-color: #005b97;
}

/* Loader styling */
.fw-crm-vce-report-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.fw-crm-vce-loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Blur effect for the table during search/loading */
.fw-crm-vce-report-table.fw-crm-vce-is-blurred,
.fw-crm-vce-report-cards.fw-crm-vce-is-blurred,
.fw-crm-vce-report-list.fw-crm-vce-is-blurred {
    filter: blur(3px);
    opacity: 0.7;
    pointer-events: none;
    transition: all 0.2s ease;
}

/* Pagination styles */
.fw-crm-vce-report-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 15px;
}

.fw-crm-vce-pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.fw-crm-vce-pagination-button {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
}

.fw-crm-vce-pagination-button:hover {
    background-color: #e5e5e5;
}

.fw-crm-vce-pagination-button.fw-crm-vce-current {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.fw-crm-vce-pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fw-crm-vce-pagination-info {
    color: #666;
}

.fw-crm-vce-per-page-selector {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .fw-crm-vce-fluentcrm-company-report h2.fw-crm-vce-report-title {
        font-size: 28px;
    }

    .fw-crm-vce-report-table .fw-crm-vce-col-name {
        min-width: 120px;
    }

    .fw-crm-vce-report-table .fw-crm-vce-col-email {
        min-width: 150px;
        left: 120px; /* Adjust based on the new width of the name column */
    }

    .fw-crm-vce-report-table .fw-crm-vce-col-tag,
    .fw-crm-vce-report-table .fw-crm-vce-col-tag-status {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .fw-crm-vce-report-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .fw-crm-vce-pagination-controls {
        margin-bottom: 10px;
    }

    .fw-crm-vce-fluentcrm-company-report h2.fw-crm-vce-report-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .fw-crm-vce-report-controls {
        flex-direction: column;
        align-items: stretch;
    }

    /* Fixed columns (name and email) */
    .fw-crm-vce-report-table th.fw-crm-vce-col-name,
    .fw-crm-vce-report-controls .fw-crm-vce-search-container {
        width: 100%;
        margin-bottom: 10px;
    }

    .fw-crm-vce-pagination-button {
        padding: 5px 8px;
        font-size: 12px;
    }

    .fw-crm-vce-fluentcrm-company-report h2.fw-crm-vce-report-title {
        font-size: 20px;
    }
}

/* Base styles for highlighted elements */
.fw-crm-vce-highlighted-tag {
    font-weight: bold;
}

/* Table specific styles */
.fw-crm-vce-report-table th.fw-crm-vce-highlighted-tag {
    position: relative;
}

.fw-crm-vce-report-table td.fw-crm-vce-has-tag {
    text-align: center;
}

.fw-crm-vce-report-table .fw-crm-vce-tag-indicator {
    font-size: 1.2em;
}

/* Card specific styles */
.fw-crm-vce-report-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: stretch;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.fw-crm-vce-report-cards .fw-crm-vce-employee-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #f5f5f5;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: 0.3s;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
}

.fw-crm-vce-report-cards .fw-crm-vce-employee-card:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    border: 1px solid #005b96;
}

.fw-crm-vce-employee-card .fw-crm-vce-tag-item.fw-crm-vce-highlighted-tag {
    padding: 2px 6px;
    border-radius: 4px;
}

.fw-crm-vce-report-cards .fw-crm-vce-employee-card .fw-crm-vce-employee-tags {
    text-align: left;
}

/* List specific styles */
.fw-crm-vce-employee-item .fw-crm-vce-tag-item.fw-crm-vce-highlighted-tag {
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

/* Tag list styling */
.fw-crm-vce-employee-card .fw-crm-vce-tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fw-crm-vce-employee-card .fw-crm-vce-tag-item {
    padding: 5px 30px;
    margin: 3px 0;
    border-radius: 4px;
}

/* Tag indicator (checkmark) styling */
.fw-crm-vce-employee-card .fw-crm-vce-tag-indicator {
    color: #005B96;
    font-size: 16px;
    font-weight: 600;
    margin-left: 5px;
}

/* Highlighted tag styling */
.fw-crm-vce-employee-card .fw-crm-vce-highlighted-tag {
    font-weight: bold;
}

.fw-crm-vce-report-controls .fw-crm-vce-export-container .fw-crm-vce-export-dropdown select{
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #005b96;
    text-align: center;
}

/* Export Modal Styles */
.fw-crm-vce-export-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.fw-crm-vce-export-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    max-width: 500px;
    border-radius: 5px;
}

.fw-crm-vce-export-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.fw-crm-vce-export-modal-close:hover,
.fw-crm-vce-export-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.fw-crm-vce-export-modal-title {
    margin-top: 0;
    color: #005B96;
}

.fw-crm-vce-export-filename-container {
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.fw-crm-vce-export-filename {
    flex-grow: 1;
    margin: 0 5px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.fw-crm-vce-export-modal-footer {
    text-align: right;
    margin-top: 20px;
}

.fw-crm-vce-export-cancel-btn,
.fw-crm-vce-export-confirm-btn {
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
}

.fw-crm-vce-export-cancel-btn {
    background-color: transparent;
    border: 1px solid rgba(255, 0, 0, 0.74);
    color: rgba(255, 0, 0, 0.74);
}

.fw-crm-vce-export-cancel-btn:hover {
    background-color: rgba(255, 0, 0, 0.74);
    border: 1px solid rgba(255, 0, 0, 0.74);
}

.fw-crm-vce-export-confirm-btn {
    background-color: #005B96;
    color: white;
    border: 1px solid #004a7c;
}