/**
 * Size Guide Popup Styles
 * Version: 1.4.0
 */

/* Size guide wrapper */
.sgp-size-guide-wrapper {
    margin: 15px 0;
}

/* Size guide link button */
.sgp-custom-link-popup {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.sgp-custom-link-popup:hover {
    background-color: #555;
    color: #fff !important;
    text-decoration: none;
}

.sgp-custom-link-popup:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Popup container */
#sgp-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Popup content */
#sgp-popup-content {
    position: relative;
    background-color: #fff;
    max-height: 90vh;
    width: 100%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Close button */
#sgp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 1000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

#sgp-popup-close:hover {
    background-color: #e0e0e0;
    color: #333;
    transform: scale(1.1);
}

#sgp-popup-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Content wrapper */
#sgp-wrapper-img {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 60px 30px 30px;
    box-sizing: border-box;
}

/* Section spacing */
#sgp-wrapper-img .sgp-img-description:not(:first-of-type) {
    margin-top: 40px;
}

/* Title text */
.sgp-img-title-text {
    font-size: 18px;
    color: #333;
    text-align: center;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.sgp-img-title-text h2,
h2.sgp-img-title-text {
    font-size: 22px;
    font-weight: 600;
    color: #2b2b2b;
    margin: 10px 0;
}

h3.sgp-img-title-text {
    font-size: 20px;
    font-weight: 600;
    color: #2b2b2b;
    margin: 20px 0 5px;
}

.sgp-popup-description {
    max-width: 520px;
}

/* Description images */
.sgp-img-description {
    height: 160px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Size chart images */
.sgp-size-img {
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive design */
@media only screen and (max-width: 768px) {
    #sgp-container {
        padding: 10px;
    }
    
    #sgp-popup-content {
        max-width: 95vw;
        max-height: 85vh;
        margin: 0;
    }
    
    #sgp-wrapper-img {
        padding: 50px 20px 20px;
        gap: 15px;
    }
    
    .sgp-img-description {
        height: 120px;
    }
    
    .sgp-size-img {
        max-width: 90%;
    }
    
    .sgp-img-title-text {
        font-size: 16px;
    }
    
    .sgp-img-title-text h2,
    h2.sgp-img-title-text {
        font-size: 20px;
    }
    
    #sgp-popup-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
}

@media only screen and (max-width: 480px) {
    #sgp-wrapper-img {
        padding: 45px 15px 15px;
        gap: 12px;
    }
    
    .sgp-img-description {
        height: 100px;
    }
    
    .sgp-img-title-text {
        font-size: 14px;
    }
    
    .sgp-img-title-text h2,
    h2.sgp-img-title-text {
        font-size: 18px;
    }
    
    .sgp-custom-link-popup {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    #sgp-container {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sgp-custom-link-popup {
        border: 2px solid currentColor;
    }
    
    #sgp-popup-content {
        border: 3px solid #000;
    }
    
    #sgp-popup-close {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sgp-custom-link-popup,
    #sgp-popup-close {
        transition: none;
    }
}