/* Accolade Pricing Table CSS */

.accolade-pricing-table-container {
    width: 100%;
    margin: 20px 0;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

.accolade-pricing-table-title {
    font-size: 28px;
    font-weight: 700;
    color: #0a3681;
    margin-bottom: 10px;
}

.accolade-pricing-table-description {
    font-size: 16px;
    color: #555555;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Controls / Search Bar */
.accolade-pricing-table-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.accolade-pricing-table-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.accolade-pricing-table-search-input {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background-color: #ffffff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.accolade-pricing-table-search-input:focus {
    border-color: #0a3681;
    box-shadow: 0 0 0 3px rgba(10, 54, 129, 0.1);
}

/* Responsive Table Wrapper */
.accolade-pricing-table-responsive-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

/* Scrollbar styles */
.accolade-pricing-table-responsive-wrapper::-webkit-scrollbar {
    height: 8px;
}
.accolade-pricing-table-responsive-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}
.accolade-pricing-table-responsive-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 8px;
}
.accolade-pricing-table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Table Style */
table.accolade-pricing-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: #ffffff;
}

table.accolade-pricing-table th, 
table.accolade-pricing-table td {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px solid #e2e8f0;
}

/* Header style */
table.accolade-pricing-table th {
    background-color: #0a3681;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    position: relative;
    border-bottom: none;
    white-space: nowrap;
}

table.accolade-pricing-table th.sortable {
    cursor: pointer;
    user-select: none;
    padding-right: 32px;
    transition: background-color 0.2s ease;
}

table.accolade-pricing-table th.sortable:hover {
    background-color: #082b68;
}

/* Alignment utilities */
table.accolade-pricing-table th.text-center,
table.accolade-pricing-table td.text-center {
    text-align: center;
}

/* Rows styling */
table.accolade-pricing-table tbody tr {
    transition: background-color 0.25s ease;
}

table.accolade-pricing-table tbody tr:nth-child(even) {
    background-color: #f4f7fc;
}

table.accolade-pricing-table tbody tr:hover {
    background-color: #eaeff8;
}

table.accolade-pricing-table tbody tr.filtered-out {
    display: none;
}

/* Cell specifics */
table.accolade-pricing-table td.location-cell {
    color: #0a3681;
}

table.accolade-pricing-table td.region-cell {
    color: #718096;
}

/* Sorting arrows css implementation */
table.accolade-pricing-table th.sortable .sort-arrows {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    width: 12px;
    height: 12px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

table.accolade-pricing-table th.sortable:hover .sort-arrows {
    opacity: 1;
}

table.accolade-pricing-table th.sortable .sort-arrows::before,
table.accolade-pricing-table th.sortable .sort-arrows::after {
    content: '';
    position: absolute;
    left: 3px;
    border: 4px solid transparent;
    width: 0;
    height: 0;
}

/* Default state arrows */
table.accolade-pricing-table th.sortable .sort-arrows::before {
    border-bottom-color: #ffffff;
    top: -1px;
}

table.accolade-pricing-table th.sortable .sort-arrows::after {
    border-top-color: #ffffff;
    bottom: -1px;
}

/* Active Sorting States */
table.accolade-pricing-table th.sort-asc .sort-arrows::after {
    opacity: 0.2;
}

table.accolade-pricing-table th.sort-desc .sort-arrows::before {
    opacity: 0.2;
}

table.accolade-pricing-table th.sort-asc,
table.accolade-pricing-table th.sort-desc {
    background-color: #082b68;
}

table.accolade-pricing-table th.sort-asc .sort-arrows,
table.accolade-pricing-table th.sort-desc .sort-arrows {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    table.accolade-pricing-table th, 
    table.accolade-pricing-table td {
        padding: 12px 14px;
        font-size: 13px;
    }
}

/* Mobile Card Layout */
@media screen and (max-width: 768px) {
    .accolade-pricing-table-responsive-wrapper {
        border: none;
        box-shadow: none;
        background: transparent;
    }

    table.accolade-pricing-table, 
    table.accolade-pricing-table thead, 
    table.accolade-pricing-table tbody, 
    table.accolade-pricing-table th, 
    table.accolade-pricing-table td, 
    table.accolade-pricing-table tr {
        display: block;
    }

    table.accolade-pricing-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    table.accolade-pricing-table tbody tr {
        margin-bottom: 15px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 0;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        overflow: hidden;
    }

    table.accolade-pricing-table tbody tr:hover {
        background-color: #fff;
    }

    table.accolade-pricing-table td {
        border: none;
        position: relative;
        padding: 15px 20px 15px 50% !important;
        text-align: right !important;
        margin-bottom: 0;
        border-bottom: 1px solid #f1f1f1;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background-color: #fdfdfd;
    }
    
    table.accolade-pricing-table td:first-child {
        background-color: #f4f4f4;
    }

    table.accolade-pricing-table td:last-child {
        border-bottom: none;
    }

    table.accolade-pricing-table td::before {
        position: absolute;
        top: 50%;
        left: 20px;
        transform: translateY(-50%);
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: #555;
        content: attr(data-label);
    }
}
