/**
 * Frontend Styles for Pricing Rates Manager - Version 2.0.0
 * Div-based responsive layout with improved mobile support
 */

/* Wrapper and general styles */
.pricing-rates-wrapper {
    margin: 0 auto;
    padding: 0px;
    animation: fadeIn 0.8s ease-in-out forwards;
}

/* Fade-in animation for wrapper */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intro text */
.pricing-rates-intro {
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in-out forwards 0.2s;
    animation-fill-mode: both;
}

.pricing-rates-intro p {
    margin: 10px 0;
    line-height: 1.6;
    color: #fff;
}

/* Currency note */
.pricing-rates-currency-note {
    text-align: center;
    font-size: 14px;
    color: #fff;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-in-out forwards 0.4s;
    animation-fill-mode: both;
}

/* Section styles */
.pricing-rates-section {
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease-in-out forwards;
    animation-fill-mode: both;
}

/* Staggered animation for sections */
.pricing-rates-section:nth-child(2) {
    animation-delay: 0.2s;
}

.pricing-rates-section:nth-child(3) {
    animation-delay: 0.4s;
}

.pricing-rates-section:nth-child(4) {
    animation-delay: 0.6s;
}

.pricing-rates-section:nth-child(5) {
    animation-delay: 0.8s;
}

.pricing-rates-section:nth-child(6) {
    animation-delay: 1s;
}

/* Title styles */
.pricing-rates-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #AF0808;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Subtitle (used for special rates note) */
.pricing-rates-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
    display: block;
    padding-top: 8px;
    border-top: 3px solid #AF0808;
}

/* ===== DIV-BASED TABLE STYLES ===== */

.pricing-rates-table-container {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
    display: table;
    border-collapse: collapse;
}

/* Table Header */
.pricing-rates-table-header {
    display: table-row;
    background: linear-gradient(to bottom, #ffffff, #ffffff);
    border-bottom: 2px solid #e0e0e0;
}

.pricing-rates-header-cell {
    display: table-cell;
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    color: #000000;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    word-break: break-word;
    border-right: 1px solid #34495e;
    white-space: nowrap;
}

.pricing-rates-header-cell:last-child {
    border-right: none;
}

.pricing-rates-col-location {
    text-align: left;
    min-width: 150px;
    width: 25%;
}

.pricing-rates-col-slot {
    text-align: center;
    min-width: 70px;
    width: 10.7%;
}

/* Table Body */
.pricing-rates-table-body {
    display: table-row-group;
    background-color: #fff;
}

.pricing-rates-table-row {
    display: table-row;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.pricing-rates-table-row:hover {
    background-color: #fafafa;
}

.pricing-rates-table-row:last-child {
    border-bottom: none;
}

/* Table Cells */
.pricing-rates-cell {
    display: table-cell;
    padding: 14px 12px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    border-right: 1px solid #f0f0f0;
    vertical-align: middle;
}

.pricing-rates-cell:last-child {
    border-right: none;
}

.pricing-rates-cell-location {
    font-weight: 600;
    color: #fff;
    text-align: left;
    padding: 14px 12px;
    background-color: #000000;
    border-right: 2px solid #AF0808;
    min-width: 150px;
    width: 25%;
}

.pricing-rates-cell-slot {
    font-weight: 500;
    color: #2c3e50;
    min-width: 70px;
    width: 10.7%;
}

/* Incall note */
.pricing-rates-incall-note {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: #f5f5f5;
    border-left: 4px solid #2c3e50;
    font-size: 13px;
    color: #fff;
    line-height: 1.6;
}

/* No data message */
.pricing-rates-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #fff;
    font-size: 16px;
    background-color: #f9f9f9;
    border-radius: 4px;
    animation: fadeIn 0.8s ease-in-out forwards;
}

/* ===== TABLET RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .pricing-rates-wrapper {
        padding: 15px;
    }

    .pricing-rates-table-container {
        font-size: 13px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    .pricing-rates-header-cell {
        padding: 12px 8px;
        font-size: 12px;
    }

    .pricing-rates-cell {
        padding: 11px 8px;
        font-size: 13px;
    }

    .pricing-rates-col-location {
        min-width: 120px;
    }

    .pricing-rates-col-slot {
        min-width: 65px;
    }

    .pricing-rates-cell-location {
        min-width: 120px;
    }

    .pricing-rates-cell-slot {
        min-width: 65px;
    }

    .pricing-rates-title {
        font-size: 20px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .pricing-rates-section {
        margin-bottom: 30px;
    }
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    .pricing-rates-wrapper {
        padding: 10px;
    }

    .pricing-rates-title {
        font-size: 18px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    /* Mobile - Card layout */
    .pricing-rates-table-container {
        display: block;
        border-collapse: separate;
        border-spacing: 0;
    }

    .pricing-rates-table-header {
        display: none;
    }

    .pricing-rates-table-body {
        display: block;
    }

    .pricing-rates-table-row {
        display: block;
        border: 1px solid #e0e0e0;
        margin-bottom: 15px;
        border-radius: 4px;
        overflow: hidden;
        background-color: #fff;
    }

    .pricing-rates-table-row:last-child {
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 0;
    }

    /* Location cell as card heading */
    .pricing-rates-cell-location {
        display: block;
        background-color: #000000;
        border-right: none;
        border-bottom: 2px solid #AF0808;
        text-align: left;
        padding: 12px 15px;
        min-width: auto;
        width: 100%;
    }

    .pricing-rates-cell-location strong {
        color: #fff;
        font-size: 14px;
        font-weight: 600;
    }

    .pricing-rates-cell-location::before {
        display: none;
    }

    /* Price cells - time and rate on same line */
    .pricing-rates-cell-slot {
        display: flex;
        align-items: center;
        padding: 10px 15px;
        color: #2c3e50;
        font-weight: 500;
        min-width: auto;
        width: 100%;
        border-right: none;
        border-bottom: none;
        font-size: 13px;
        position: relative;
    }

    .pricing-rates-cell-slot::before {
        content: attr(data-label);
        font-weight: 600;
        color: #2c3e50;
        flex-shrink: 0;
        min-width: 90px;
        text-align: left;
        display: block;
    }

    .pricing-rates-cell-slot::after {
        content: " ";
        flex-grow: 1;
    }

    .pricing-rates-currency-note {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .pricing-rates-intro {
        margin-bottom: 15px;
    }

    .pricing-rates-intro p {
        font-size: 13px;
    }

    .pricing-rates-section {
        margin-bottom: 25px;
    }

    .pricing-rates-incall-note {
        font-size: 12px;
        margin-top: 12px;
        padding: 10px 12px;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 360px) {
    .pricing-rates-wrapper {
        padding: 8px;
    }

    .pricing-rates-title {
        font-size: 16px;
    }

    .pricing-rates-header-cell {
        padding: 10px 6px;
        font-size: 10px;
    }

    .pricing-rates-cell {
        padding: 9px 6px;
        font-size: 11px;
    }

    .pricing-rates-cell-location {
        min-width: 80px;
        font-size: 11px;
    }

    .pricing-rates-col-location {
        min-width: 80px;
    }

    .pricing-rates-col-slot {
        min-width: 55px;
    }

    .pricing-rates-section {
        margin-bottom: 20px;
    }

    @media (max-width: 360px) {
        .pricing-rates-table-row {
            margin-bottom: 12px;
        }
    }
}

/* ===== ANIMATION UTILITIES ===== */
@media (prefers-reduced-motion: reduce) {
    .pricing-rates-wrapper,
    .pricing-rates-intro,
    .pricing-rates-currency-note,
    .pricing-rates-section,
    .pricing-rates-no-data {
        animation: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .pricing-rates-table-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .pricing-rates-wrapper,
    .pricing-rates-intro,
    .pricing-rates-currency-note,
    .pricing-rates-section {
        animation: none;
    }
}
