/* Size Chart Frontend Styles */

/* Size Chart Link */
.wc-size-chart-link-wrapper {
    display: inline-block;
    margin: 10px 0;
}

.wc-size-chart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2c3e30;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #2c3e30;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.wc-size-chart-link:hover {
    background: #2c3e30;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(44, 62, 48, 0.2);
}

.wc-size-chart-link .size-chart-icon {
    font-size: 16px;
    line-height: 1;
}

.wc-size-chart-link .size-chart-text {
    line-height: 1;
}

/* Popup Overlay */
.wc-size-chart-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-size-chart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* Popup Modal */
.wc-size-chart-modal {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.wc-size-chart-modal.active {
    opacity: 1;
    transform: scale(1);
}

/* Popup Header */
.wc-size-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 2px solid #2c3e30;
    background: #f8f9f8;
}

.wc-size-chart-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e30;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-size-chart-title .size-chart-icon {
    font-size: 22px;
}

.wc-size-chart-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wc-size-chart-close:hover {
    background: #e0e0e0;
    color: #2c3e30;
}

/* Popup Content */
.wc-size-chart-content {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Size Chart Image */
.wc-size-chart-image-wrapper {
    margin-bottom: 25px;
    text-align: center;
}

.wc-size-chart-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Size Chart Table */
.wc-size-chart-table-wrapper {
    overflow-x: auto;
}

.wc-size-chart-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #2c3e30;
}

.wc-size-chart-table thead {
    background: #2c3e30;
    color: #fff;
}

.wc-size-chart-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wc-size-chart-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.wc-size-chart-table tbody tr:nth-child(even) {
    background: #f8f9f8;
}

.wc-size-chart-table tbody tr:hover {
    background: #e8f0e9;
}

.wc-size-chart-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    border: 1px solid #e0e0e0;
}

.wc-size-chart-table td:first-child {
    font-weight: 600;
    color: #2c3e30;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wc-size-chart-popup {
        padding: 10px;
    }

    .wc-size-chart-modal {
        max-height: 95vh;
        border-radius: 6px;
    }

    .wc-size-chart-header {
        padding: 15px;
    }

    .wc-size-chart-title {
        font-size: 18px;
    }

    .wc-size-chart-content {
        padding: 15px;
        max-height: calc(95vh - 80px);
    }

    .wc-size-chart-table {
        font-size: 12px;
    }

    .wc-size-chart-table th,
    .wc-size-chart-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Stack table on very small screens */
    @media (max-width: 480px) {
        .wc-size-chart-table-wrapper {
            overflow-x: scroll;
            -webkit-overflow-scrolling: touch;
        }
    }
}

/* Scrollbar Styling */
.wc-size-chart-content::-webkit-scrollbar,
.wc-size-chart-table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.wc-size-chart-content::-webkit-scrollbar-track,
.wc-size-chart-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.wc-size-chart-content::-webkit-scrollbar-thumb,
.wc-size-chart-table-wrapper::-webkit-scrollbar-thumb {
    background: #2c3e30;
    border-radius: 4px;
}

.wc-size-chart-content::-webkit-scrollbar-thumb:hover,
.wc-size-chart-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #1f2b21;
}