/* Size Guide Popup Styles */

/* Size guide link styling */
.size-guide-link {
    color: #6B7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: normal;
    cursor: pointer;
    margin-left: auto;
}

.size-guide-link:hover {
    color: #374151;
    text-decoration: none;
}

/* Selector header layout */
.selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.selector-header h5 {
    margin: 0;
}

/* Size Guide Popup */
.size-guide-popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.size-guide-popup.active {
    display: block;
}

.size-guide-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.size-guide-popup .popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.size-guide-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #E5E7EB;
    background-color: #F9FAFB;
}

.size-guide-popup .popup-header h2 {
    margin: 0;
    font-family: var(--font-heading, 'Gilda Display', serif);
    font-size: 1.5rem;
    color: #1F2937;
}

.size-guide-popup .popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #6B7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.size-guide-popup .popup-close:hover {
    background-color: #F3F4F6;
    color: #1F2937;
}

.size-guide-popup .popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

/* Size Guide Content Styling */
.size-guide-content {
    font-family: var(--font-body, 'Inter', sans-serif);
}

.size-guide-tabs {
    display: flex;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 24px;
}

.size-guide-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6B7280;
    transition: all 0.2s;
}

.size-guide-tab:hover {
    color: #374151;
    border-bottom-color: #D1D5DB;
}

.size-guide-tab.active {
    color: #1F2937;
    border-bottom-color: #1F2937;
}

.size-guide-tab-content {
    display: none;
}

.size-guide-tab-content.active {
    display: block;
}

/* Product measurements section */
.size-guide-measurements {
    margin-bottom: 32px;
}

.size-guide-measurements h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1F2937;
}

.size-guide-measurements p {
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.measurement-diagram {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 32px;
    background-color: #F9FAFB;
    padding: 24px;
    border-radius: 8px;
}

.diagram-image {
    flex: 0 0 200px;
}

.diagram-image img {
    width: 100%;
    height: auto;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.measurement-instructions {
    flex: 1;
}

.measurement-item {
    padding-bottom: 16px;
    border-bottom: 1px solid #F3F4F6;
}

.measurement-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.measurement-label {
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.measurement-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #EF4444;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

.measurement-description {
    color: #6B7280;
    font-size: 0.8rem;
}

/* Size chart section */
.size-chart-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1F2937;
}

.size-chart-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    cursor: pointer;
    color: #1F2937;
    font-weight: 500;
}

.size-chart-toggle .toggle-icon {
    transition: transform 0.2s;
    color: #6B7280;
}

.size-chart-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

.size-chart-units {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.unit-tab {
    padding: 8px 16px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    transition: all 0.2s;
}

.unit-tab:hover {
    background: #F3F4F6;
    color: #374151;
}

.unit-tab.active {
    background: #1F2937;
    color: white;
    border-color: #1F2937;
}

/* Unit table containers */
.unit-table {
    margin-bottom: 16px;
}

.unit-table[style*="display: none"] {
    display: none !important;
}

.size-chart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.size-chart-table th,
.size-chart-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.size-chart-table th {
    background-color: #F9FAFB;
    font-weight: 600;
    color: #1F2937;
}

.size-chart-table td {
    color: #6B7280;
}

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

.size-chart-note {
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 16px;
    font-style: italic;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Loading state */
.size-guide-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #6B7280;
}

.size-guide-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-top-color: #1F2937;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-guide-popup .popup-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .size-guide-popup .popup-content {
        padding: 8px 16px;
    }
    
    .measurement-diagram {
        flex-direction: column;
        gap: 16px;
    }
    
    .diagram-image {
        flex: none;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .size-guide-tabs {
        flex-wrap: wrap;
    }
    
    .size-guide-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .size-chart-table {
        font-size: 12px;
    }
    
    .size-chart-table th,
    .size-chart-table td {
        padding: 8px 12px;
    }
    
    .size-chart-units {
        gap: 8px;
    }
    
    .unit-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
}/* Size Guide Popup Styles */

/* Size guide link styling */
.size-guide-link {
    color: #1164a9;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: normal;
    cursor: pointer;
    margin-left: auto;
}

.size-guide-link:hover {
    color: #374151;
    text-decoration: underline;
}

/* Selector header layout */
.selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.selector-header h5 {
    margin: 0;
}

/* Size Guide Popup */
.size-guide-popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.size-guide-popup.active {
    display: block;
}

.size-guide-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-out;
}

.size-guide-popup .popup-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.size-guide-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #E5E7EB;
    background-color: #F9FAFB;
}

.size-guide-popup .popup-header h2 {
    margin: 0;
    font-family: var(--font-heading, 'Gilda Display', serif);
    font-size: 1.5rem;
    color: #1F2937;
}

.size-guide-popup .popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #6B7280;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.size-guide-popup .popup-close:hover {
    background-color: #F3F4F6;
    color: #1F2937;
}

.size-guide-popup .popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

/* Size Guide Content Styling */
.size-guide-content {
    font-family: var(--font-body, 'Inter', sans-serif);
}

.size-guide-tabs {
    display: flex;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 24px;
}

.size-guide-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6B7280;
    transition: all 0.2s;
}

.size-guide-tab:hover {
    color: #374151;
    border-bottom-color: #D1D5DB;
}

.size-guide-tab.active {
    color: #1F2937;
    border-bottom-color: #1F2937;
}

.size-guide-tab-content {
    display: none;
}

.size-guide-tab-content.active {
    display: block;
}

/* Product measurements section */
.size-guide-measurements {
    margin-bottom: 32px;
}

.size-guide-measurements h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1F2937;
}

.size-guide-measurements p {
    color: #6B7280;
    margin-bottom: 16px;
    line-height: 1.6;
}

.measurement-diagram {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.diagram-image {
    flex: 0 0 200px;
}

.diagram-image img {
    width: 100%;
    height: auto;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.measurement-instructions {
    flex: 1;
}

.measurement-item {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #F3F4F6;
}

.measurement-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.measurement-label {
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.measurement-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #EF4444;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
}

.measurement-description {
    color: #6B7280;
    line-height: 1.5;
}

/* Size chart section */
.size-chart-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1F2937;
}

.size-chart-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    cursor: pointer;
    color: #1F2937;
    font-weight: 500;
}

.size-chart-toggle .toggle-icon {
    transition: transform 0.2s;
    color: #6B7280;
}

.size-chart-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

.size-chart-units {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.unit-tab {
    padding: 8px 16px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    transition: all 0.2s;
}

.unit-tab:hover {
    background: #F3F4F6;
    color: #374151;
}

.unit-tab.active {
    background: #1F2937;
    color: white;
    border-color: #1F2937;
}

.size-chart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.size-chart-table th,
.size-chart-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.size-chart-table th {
    background-color: #F9FAFB;
    font-weight: 600;
    color: #1F2937;
}

.size-chart-table td {
    color: #6B7280;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Loading state */
.size-guide-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #6B7280;
}

.size-guide-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #E5E7EB;
    border-top-color: #1F2937;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-guide-popup .popup-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .size-guide-popup .popup-content {
        padding: 8px 16px;
    }
    
    .measurement-diagram {
        flex-direction: column;
        gap: 16px;
    }
    
    .diagram-image {
        flex: none;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .size-guide-tabs {
        flex-wrap: wrap;
    }
    
    .size-guide-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .size-chart-table {
        font-size: 12px;
    }
    
    .size-chart-table th,
    .size-chart-table td {
        padding: 8px 12px;
    }
}