/* Ring Size Guide Frontend Styles - VERTU Style */

/* Size Guide Button - VERTU Style */
.rsg-button-container {
    margin: 20px 0;
    text-align: center;
    clear: both;
}

/* Position-specific button adjustments */
.woocommerce div.product .rsg-button-container {
    width: 100%;
    display: block;
}

/* After title positioning */
.product_title + .rsg-button-container {
    margin: 15px 0 25px 0;
    text-align: left;
}

/* After price positioning */
.price + .rsg-button-container,
.woocommerce-price-suffix + .rsg-button-container {
    margin: 15px 0;
    text-align: left;
}

/* After add to cart form */
.single_add_to_cart_button + .rsg-button-container,
.cart + .rsg-button-container {
    margin: 20px 0;
}

/* Before/after tabs positioning */
.woocommerce-tabs + .rsg-button-container,
.rsg-button-container + .woocommerce-tabs {
    margin: 30px 0;
}

/* Floating button option */
.rsg-button-container.floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    margin: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.rsg-button-container.floating .rsg-size-guide-btn {
    border-radius: 50px;
    padding: 12px 24px;
    min-width: auto;
}

.rsg-size-guide-btn {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 14px 32px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-family: 'Arial', sans-serif;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.rsg-size-guide-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    color: #000000;
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.rsg-size-guide-btn:active {
    transform: translateY(0);
}

.rsg-size-guide-btn::before {
    content: '📏';
    margin-right: 10px;
    font-size: 16px;
}

/* Modal - VERTU Black & White Style */
.rsg-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: rsg-fade-in 0.4s ease;
    backdrop-filter: blur(10px);
}

.rsg-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes rsg-fade-in {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

/* Modal Content - VERTU Style */
.rsg-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    margin: auto;
    background: #000000;
    border: 2px solid #ffffff;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    animation: rsg-slide-up 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes rsg-slide-up {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Modal Header - VERTU Style */
.rsg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #000000;
    color: #ffffff;
    border-bottom: 1px solid #333333;
}

.rsg-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Arial', sans-serif;
    color: white;
}

.rsg-close {
    background: none;
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.rsg-close:hover {
    background: #ffffff;
    color: #000000;
}

/* Image Viewer - VERTU Style */
.rsg-image-viewer {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #333333;
}

/* Main Image - Enhanced */
.rsg-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    filter: brightness(1.1) contrast(1.05);
}

.rsg-main-image:active {
    cursor: grabbing;
}

.rsg-main-image.zoomed {
    cursor: grab;
}

/* Navigation Buttons - VERTU Style */
.rsg-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: 2px solid #ffffff;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-weight: bold;
}

.rsg-nav-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-50%) scale(1.1);
}

.rsg-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.rsg-nav-btn.prev {
    left: 20px;
}

.rsg-nav-btn.next {
    right: 20px;
}

.rsg-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
    border-color: #666666;
    color: #666666;
}

.rsg-nav-btn:disabled:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #666666;
    transform: translateY(-50%);
}

/* Zoom Controls - VERTU Style */
.rsg-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.rsg-zoom-btn {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: 2px solid #ffffff;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.rsg-zoom-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: scale(1.1);
}

.rsg-zoom-btn:active {
    transform: scale(0.95);
}

/* Image Counter - VERTU Style */
.rsg-image-counter {
    position: absolute;
      top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 5px 10px;
    border: 1px solid #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 10;
}

/* Thumbnails - VERTU Style */
.rsg-thumbnails {
    display: flex;
    padding: 20px;
    gap: 15px;
    overflow-x: auto;
    background: #000000;
    border-top: 1px solid #333333;
    max-height: 120px;
}

.rsg-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.rsg-thumbnails::-webkit-scrollbar-track {
    background: #333333;
}

.rsg-thumbnails::-webkit-scrollbar-thumb {
    background: #ffffff;
}

.rsg-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}

.rsg-thumbnail {
    min-width: 80px;
    height: 80px;
    cursor: pointer;
    border: 2px solid transparent;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: brightness(0.8);
}

.rsg-thumbnail:hover {
    border-color: #ffffff;
    transform: scale(1.05);
    filter: brightness(1);
}

.rsg-thumbnail.active {
    border-color: #ffffff;
    filter: brightness(1);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Loading State - VERTU Style */
.rsg-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #000000;
    flex-direction: column;
}

.rsg-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #333333;
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: rsg-spin 1s linear infinite;
    margin-bottom: 20px;
}

.rsg-loading::after {
    content: "LOADING...";
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 600;
}

@keyframes rsg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .rsg-modal-content {
        max-width: 98vw;
        max-height: 98vh;
        margin: 5px;
    }
    
    .rsg-modal-header {
        padding: 15px 20px;
    }
    
    .rsg-modal-title {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .rsg-image-viewer {
        height: 65vh;
        min-height: 350px;
    }
    
    .rsg-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .rsg-nav-btn.prev {
        left: 15px;
    }
    
    .rsg-nav-btn.next {
        right: 15px;
    }
    
    .rsg-zoom-controls {
        bottom: 15px;
        right: 15px;
    }
    
    .rsg-zoom-btn {
      width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .rsg-thumbnails {
        padding: 15px;
        max-height: 100px;
    }
    
    .rsg-thumbnail {
        min-width: 60px;
        height: 60px;
    }
    
    .rsg-size-guide-btn {
        padding: 12px 24px;
        font-size: 13px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .rsg-modal-header {
        padding: 12px 15px;
    }
    
    .rsg-modal-title {
        font-size: 14px;
    }
    
    .rsg-image-viewer {
        height: 55vh;
        min-height: 300px;
    }
    
    .rsg-thumbnails {
        padding: 10px;
        gap: 10px;
    }
    
    .rsg-thumbnail {
        min-width: 50px;
        height: 50px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .rsg-nav-btn:hover,
    .rsg-zoom-btn:hover,
    .rsg-thumbnail:hover,
    .rsg-close:hover,
    .rsg-size-guide-btn:hover {
        transform: none;
        background-color: inherit;
        border-color: inherit;
        color: inherit;
    }
    
    .rsg-nav-btn:active,
    .rsg-zoom-btn:active,
    .rsg-close:active,
    .rsg-size-guide-btn:active {
        opacity: 0.7;
    }
}

/* Accessibility */
.rsg-modal:focus {
    outline: none;
}

.rsg-main-image:focus,
.rsg-nav-btn:focus,
.rsg-zoom-btn:focus,
.rsg-close:focus,
.rsg-thumbnail:focus,
.rsg-size-guide-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Hide scrollbars */
.rsg-image-viewer {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rsg-image-viewer::-webkit-scrollbar {
    display: none;
} 