/**
 * Frontend Modal Styles
 *
 * @package WC_Size_Chart_Manager
 */

/* Button Styles */
.wc-size-chart-button {
    display: inline-block !important;
    margin: 10px 0 !important;
    padding: 10px 20px !important;
    background-color: #333 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
}

.wc-size-chart-button:hover {
    background-color: #555 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.wc-size-chart-button:active {
    transform: translateY(0) !important;
}

/* Modal Overlay */
.wc-size-chart-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 9999;
}

/* Modal */
.wc-size-chart-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 20px 60px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    max-width: 900px;
    padding: 40px;
    line-height: 1.6;
    z-index: 10000;
    animation: wc-slide-in 0.3s ease;
}

/* Close Button */
.wc-size-chart-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.wc-size-chart-close:hover,
.wc-size-chart-close:focus {
    color: #333;
}

/* Titles */
.wc-size-chart-modal h2,
.wc-size-chart-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

/* Table Styles */
.wc-size-chart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.wc-size-chart-table th,
.wc-size-chart-table td {
    border: 1px solid #d5d5d5;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    word-break: normal;
    overflow-wrap: break-word;
}

.wc-size-chart-table th {
    background-color: #ececec;
    font-weight: bold;
    color: #333;
}

.wc-size-chart-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.wc-size-chart-table tr:hover {
    background-color: #f0f0f0;
}

/* Tabs */
.wc-size-chart-tabs {
    margin: 20px 0;
}

.wc-size-chart-tab-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.wc-size-chart-tab {
    margin: 0;
    padding: 0;
}

.wc-size-chart-tab a {
    display: inline-block;
    padding: 12px 20px;
    font-size: 15px;
    line-height: 1.4;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wc-size-chart-tab a:hover {
    color: #333;
}

.wc-size-chart-tab.active a {
    color: #0073aa;
    border-bottom-color: #0073aa;
    font-weight: bold;
}

/* Tab Content */
.wc-size-chart-content {
    position: relative;
}

.wc-size-chart-panel {
    display: none;
    animation: wc-fade-in 0.3s ease;
}

.wc-size-chart-panel.active {
    display: block;
}

/* Hide duplicate titles in tabbed view */
.wc-size-chart-tabs .wc-size-chart-panel h2,
.wc-size-chart-tabs .wc-size-chart-panel h3,
.wc-size-chart-tabs .wc-size-chart-panel .wc-size-chart-title {
    display: none;
}

/* Notes */
.wc-size-chart-note {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-left: 3px solid #0073aa;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.wc-size-chart-description {
    margin: 10px 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

/* Animations */
@keyframes wc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wc-slide-in {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-size-chart-modal {
        width: 95%;
        max-width: 95%;
        padding: 24px;
        max-height: 95vh;
    }

    .wc-size-chart-table th,
    .wc-size-chart-table td {
        padding: 6px;
        font-size: 13px;
    }

    .wc-size-chart-tab-list {
        flex-direction: column;
    }

    .wc-size-chart-tab a {
        display: block;
        border-bottom: none;
        border-left: 3px solid transparent;
        padding: 10px 10px 10px 20px;
    }

    .wc-size-chart-tab.active a {
        border-left-color: #0073aa;
        border-bottom: none;
    }

    .wc-size-chart-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wc-size-chart-modal {
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
        top: 0;
        transform: translate(0, 0);
    }

    .wc-size-chart-modal-overlay {
        animation: none;
    }

    .wc-size-chart-table {
        font-size: 12px;
    }

    .wc-size-chart-table th,
    .wc-size-chart-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
}
