﻿/**
 * DIAMOND MODAL MODERNIZATION - PHASE 1, 2 & 3
 * =============================================
 *
 * Phase 1: Responsive Modal Overlay System
 * - Mobile (< 768px): Full-screen overlay
 * - Tablet (768-1439px): Bottom-sheet (60% height)
 * - Desktop (1440px+): Side panel (35% width)
 *
 * Phase 2: Tab System with Media Priority
 * - Actual Image first (loads immediately)
 * - 360Â° Video secondary (preloads in background)
 * - Certificate view (tertiary)
 * - Sample image fallback
 *
 * Phase 3: Design System Alignment (2025-01-10)
 * - Typography: Match B2C Jewels design system (28px titles, #0088cc prices)
 * - Colors: Exact hex matches from detail page analysis
 * - Borders: 4px buttons, 3px form fields
 * - Spacing: 4px grid alignment
 * - Shadows: Softened, brand-blue focus states
 * - Transitions: 200ms standard
 */

/* ============================================================================
   MODAL BACKDROP
   ============================================================================ */

.diamond-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* CORRECTED: Was 0.2, now matches site standard */
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-out;
    z-index: 1000;
}

.diamond-modal-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================================
   GRID DIMMED STATE (when modal open)
   ============================================================================ */

#tabs-container.modal-open {
    opacity: 0.8;
    pointer-events: none;
}

/* ============================================================================
   GLOBAL MODAL STYLES (All Breakpoints)
   ============================================================================ */

/* ============================================================================
   MOBILE MODAL (< 768px) - Full Screen Overlay
   ============================================================================ */

@media (max-width: 767px) {
    .diamond-modal {
        position: fixed;
        top: 60px; /* HEIGHT FIX: Changed from 0 to clear B2C Jewels logo header */
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        transform: translateX(100%);
        transition: transform 300ms ease-out;
        z-index: 1001;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .diamond-modal.open {
        transform: translateX(0);
    }

    .diamond-modal-header {
        position: sticky;
        top: 0;
        background: #fff;
        border-bottom: 1px solid #ddd;
        padding: 8px 16px; /* OPTIMIZED: Reduced from 12px to save 8px vertical space */
        display: flex;
        justify-content: space-between;
        align-items: center;
        z-index: 10;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .diamond-modal-title {
        font-size: 28px; /* CORRECTED: Was 16px, now matches site H1 */
        font-weight: 400; /* CORRECTED: Was 600, now matches site standard */
        color: #30a8dc; /* CORRECTED: Was #424242, now matches brand blue for titles */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        line-height: 39.2px; /* Added: Matches site H1 line-height */
        margin: 0;
        flex: 1;
    }

    .diamond-modal-close {
        background: none;
        border: none;
        font-size: 24px; /* CORRECTED: Was 28px, reduced for better proportion */
        color: #666666; /* CORRECTED: Exact hex match */
        cursor: pointer;
        padding: 0;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 200ms, color 200ms;
    }

    .diamond-modal-close:hover {
        background: #f5f5f5;
        color: #333333; /* CORRECTED: Exact hex match */
    }

    .diamond-modal-close:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
    }

    .diamond-modal-body {
        padding: 12px 16px 510px 16px; /* PRICE FIX: Increased to 510px to fix 259px overlap - price now fully visible */
        min-height: calc(100vh - 60px);
        -webkit-font-smoothing: antialiased; /* Added: Crisp text rendering */
        -moz-osx-font-smoothing: grayscale;
    }

    /* Tabs Mobile */
    .diamond-modal-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 12px; /* OPTIMIZED: Reduced from 16px to save 4px */
        border-bottom: 2px solid #dddddd; /* CORRECTED: Was #e0e0e0, exact match */
        padding-bottom: 0;
    }

    .diamond-modal-tab {
        flex: 1;
        padding: 10px 8px; /* OPTIMIZED: Reduced from 12px to save 4px vertical */
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        font-size: 14px;
        font-weight: 500;
        color: #666666; /* CORRECTED: Exact hex match */
        cursor: pointer;
        transition: all 200ms;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        position: relative;
        margin-bottom: -2px;
    }

    .diamond-modal-tab.active {
        color: #30a8dc;
        border-bottom-color: #30a8dc;
        font-weight: 600; /* Added: Increased weight for active state */
    }

    .diamond-modal-tab:hover:not(.active) {
        color: #333333; /* CORRECTED: Exact hex match */
        background: rgba(48, 168, 220, 0.05); /* CORRECTED: Brand blue tint on hover */
    }

    .diamond-modal-tab:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
    }

    .diamond-modal-tab-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        background: #4caf50;
        color: #fff;
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 10px;
        font-weight: 600;
    }

    /* Tab Content Mobile */
    .diamond-modal-tab-content {
        display: none;
    }

    .diamond-modal-tab-content.active {
        display: block;
        animation: fadeIn 200ms ease-in;
    }

    /* Smooth fade transition for tab switching */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Image Container Mobile */
    .diamond-modal-image-container {
        width: 100%;
        height: 360px; /* HEIGHT FIX: Increased from 300px (+60px taller) - uses freed vertical space for better diamond visibility */
        position: relative !important; /* CRITICAL: Force relative positioning for absolute-positioned children */
        background: #f9f9f9;
        border-radius: 4px; /* CORRECTED: Was 8px, now matches site standard */
        overflow: hidden;
        margin-bottom: 4px; /* HEIGHT FIX: Reduced from 12px (-8px) - eliminates white space below image */
        display: flex; /* Center-aligned approach (same as 360Â° video tab) */
        align-items: center;
        justify-content: center;
    }

    .diamond-modal-image {
        /* Hybrid approach: JavaScript sets scaled width/height, flexbox centers */
        display: block !important;
        /* NO max-width/max-height - JS sets exact scaled dimensions */
        /* Flexbox container centers automatically */
        opacity: 1;
    }

    /* Image container overflow control - ZERO LAYOUT SHIFT */
    .diamond-modal-image-container {
        overflow: hidden !important; /* Prevent content overflow */
    }

    /* Ensure container dimensions don't change on hover - ZERO LAYOUT SHIFT */
    .diamond-modal-image-container:hover {
        width: 400px !important; /* PHASE 1B: Lock width to prevent layout shift */
        height: 400px !important; /* PHASE 1B: Updated from 220px to match new container height */
    }

    .diamond-modal-image-loading {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #666; /* Match 360 tab */
        font-size: 14px;
        display: flex; /* Match 360 tab - flexbox layout */
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Specs Mobile */
    .diamond-modal-specs {
        display: flex;
        flex-direction: column;
        gap: 4px; /* HEIGHT FIX: Reduced from 8px (-32px total across 8 gaps) - tighter vertical spacing */
    }

    .diamond-modal-spec-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0; /* HEIGHT FIX: Reduced from 8px (-36px total across 9 rows) - tighter row spacing */
        border-bottom: 1px solid #eeeeee; /* CORRECTED: Was #f0f0f0, exact match */
    }

    .diamond-modal-spec-row:last-child {
        border-bottom: none;
    }

    .diamond-modal-spec-label {
        font-size: 13px; /* HEIGHT FIX: Reduced from 14px - more compact text */
        line-height: 1.1; /* HEIGHT FIX: Tight line-height for compact layout */
        color: #666666; /* CORRECTED: Exact hex match */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        font-weight: 400;
    }

    .diamond-modal-spec-value {
        font-size: 14px; /* HEIGHT FIX: Reduced from 16px - more compact text */
        line-height: 1.1; /* HEIGHT FIX: Tight line-height for compact layout */
        font-weight: 600;
        color: #333333; /* CORRECTED: Exact hex match */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
    }

    /* Price Mobile */
    .diamond-modal-price {
        font-size: 24px;
        font-weight: 700;
        color: #0088cc; /* CORRECTED: Was #30a8dc, now darker blue for prices */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* Added with fallbacks */
        line-height: 38.4px; /* Added: Matches site standard */
        text-align: center;
        padding: 12px 0; /* HEIGHT FIX: Reduced from 16px (-8px total) - tighter spacing */
        border-top: 2px solid #dddddd; /* CORRECTED: Was #e0e0e0, exact match */
        border-bottom: 2px solid #dddddd;
        margin: 12px 0 135px 0; /* PRICE FIX: Increased bottom margin to 135px to push price above sticky footer - fixes overlap when scrolled to bottom */
    }

    /* Buttons Mobile - Sticky Footer with 2-Row Layout */
    .diamond-modal-actions {
        position: sticky; /* Always visible without scroll */
        bottom: 0; /* ARCHITECTURAL FIX: Stick to bottom of scroll area, clearance via body padding-bottom */
        display: flex;
        flex-direction: column;
        gap: 8px; /* Gap between rows */
        padding: 12px; /* OPTIMIZED: Reduced from 16px to save 8px total */
        margin: 0 -16px; /* Extend to modal edges */
        margin-bottom: -510px; /* PRICE FIX: Updated to -510px to match body padding-bottom */
        background: white; /* Solid background to cover content */
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); /* Subtle top shadow */
        z-index: 100;
    }

    /* Row 1: Add to Cart (full width) */
    .diamond-modal-actions-row-1 {
        display: flex;
        width: 100%;
    }

    /* Row 2: Compare + View Full Details (30% / 70% split) */
    .diamond-modal-actions-row-2 {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .diamond-modal-btn {
        padding: 12px 24px; /* CORRECTED: Was 14px 20px, now standardized */
        border: none;
        border-radius: 4px; /* CORRECTED: Was 6px, now matches site buttons */
        font-size: 16px;
        font-weight: 700; /* CORRECTED: Was 600, now 700 for buttons */
        cursor: pointer;
        transition: all 200ms;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        text-align: center;
        text-decoration: none;
        display: inline-flex; /* FIXED: Changed from inline-block to inline-flex for proper centering */
        justify-content: center; /* FIXED: Ensures horizontal centering */
        align-items: center; /* FIXED: Ensures vertical centering */
        text-transform: none; /* Added: No uppercase on buttons */
    }

    /* Row 1 button: Full width */
    .diamond-modal-actions-row-1 .diamond-modal-btn {
        flex: 1;
    }

    /* Row 2 button: Compare - 30% width */
    .diamond-modal-compare-btn {
        flex: 0 0 30%;
        padding: 12px 8px; /* Tighter padding for compact button */
        font-size: 14px;
        background: #ffffff;
        border: 2px solid #30a8dc;
        color: #30a8dc;
        font-weight: 600;
    }

    .diamond-modal-compare-btn:hover {
        background: #30a8dc;
        color: #fff;
    }

    .diamond-modal-compare-btn.added {
        background: #4caf50 !important;
        border-color: #4caf50 !important;
        color: #fff !important;
    }

    /* Row 2 button: View Full Details - 70% width */
    .diamond-modal-actions-row-2 .diamond-modal-btn-secondary {
        flex: 1; /* Takes remaining 70% */
        padding: 12px 16px;
        font-size: 14px;
    }

    .diamond-modal-btn-primary {
        background: #30a8dc;
        color: #ffffff; /* CORRECTED: Exact hex match */
    }

    .diamond-modal-btn-primary:hover {
        background: #2897ca; /* CORRECTED: Was #4caf50, now darker blue hover */
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(48, 168, 220, 0.3); /* CORRECTED: Brand blue shadow */
    }

    .diamond-modal-btn-secondary {
        background: #ffffff; /* CORRECTED: Exact hex match */
        color: #30a8dc;
        border: 2px solid #30a8dc;
        font-weight: 600; /* Secondary buttons slightly lighter */
    }

    .diamond-modal-btn-secondary:hover {
        background: #f0f8fc;
        border-color: #2897ca; /* Added: Darker border on hover */
    }

    .diamond-modal-btn:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
        box-shadow: 0 0 0 3px rgba(48, 168, 220, 0.1);
    }
}

/* ============================================================================
   TABLET MODAL (768px - 1439px) - Bottom Sheet
   ============================================================================ */

@media (min-width: 768px) and (max-width: 1439px) {
    .diamond-modal {
        position: fixed;
        bottom: -70vh; /* CHAT FIX: Hidden below viewport (replaced transform animation to eliminate containing block) */
        left: 0;
        right: 0;
        height: 70vh; /* Increased from 60vh for larger image + visible buttons */
        max-height: 680px; /* OPTIMIZED: Reduced from 700px to save 20px vertical space */
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        transition: bottom 300ms ease-out; /* CHAT FIX: Animate bottom instead of transform (no containing block created) */
        z-index: 1001;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .diamond-modal.open {
        bottom: 0; /* CHAT FIX: Slide up to viewport bottom (no transform = no containing block = chat stays viewport-fixed) */
    }

    .diamond-modal-header {
        padding: 12px 20px; /* OPTIMIZED: Reduced vertical from 16px to save 8px total */
        border-bottom: 1px solid #dddddd; /* CORRECTED: Was #e0e0e0, exact match */
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }

    .diamond-modal-title {
        font-size: 28px; /* CORRECTED: Was 18px, now matches site H1 */
        font-weight: 400; /* CORRECTED: Was 600, now matches site standard */
        color: #30a8dc; /* CORRECTED: Was #424242, now brand blue */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        line-height: 39.2px; /* Added: Matches site H1 line-height */
        margin: 0;
        flex: 1;
    }

    .diamond-modal-header-actions {
        display: flex;
        gap: 12px;
        align-items: center;
    }

    /* TABLET: Compare button moved to footer - hide header button */
    .diamond-modal-header-actions .diamond-modal-compare-btn {
        display: none; /* Moved to footer in 3-button row layout */
    }

    .diamond-modal-compare-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .diamond-modal-close {
        background: none;
        border: none;
        font-size: 32px;
        color: #666;
        cursor: pointer;
        padding: 0;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 200ms, color 200ms;
    }

    .diamond-modal-close:hover {
        background: #f5f5f5;
        color: #333;
    }

    .diamond-modal-body {
        padding: 16px 20px 0 20px; /* STICKY FIX: Reduced bottom from 180px to 0 - sticky positioning (bottom: 80px) handles spacing, no offset tricks needed */
        overflow-y: auto;
        overflow-x: hidden; /* Prevent horizontal scroll on tablet */
        flex: 1;
        -webkit-overflow-scrolling: touch;
        -webkit-font-smoothing: antialiased; /* Added: Crisp text rendering */
        -moz-osx-font-smoothing: grayscale;
    }

    /* Horizontal Layout for Tablet */
    .diamond-modal-content-wrapper {
        display: flex;
        gap: 24px;
        min-height: 100%;
    }

    .diamond-modal-left {
        flex: 0 0 360px; /* OPTIMIZED: Increased from 280px to 360px (+29% larger) for more prominent diamond visuals */
        max-width: 360px; /* CRITICAL: Enforce width limit to prevent child content from expanding parent */
        display: flex;
        flex-direction: column;
    }

    .diamond-modal-right {
        flex: 1;
        min-width: 0; /* Allow flex item to shrink below content size */
        display: flex;
        flex-direction: column;
    }

    /* Tabs Tablet */
    .diamond-modal-tabs {
        display: flex;
        gap: 4px;
        margin-bottom: 8px; /* OPTIMIZED: Reduced from 12px to save 4px */
        background: #f2f2f2; /* CORRECTED: Was #f5f5f5, exact match */
        border-radius: 4px; /* CORRECTED: Was 8px, now matches site */
        padding: 4px;
    }

    .diamond-modal-tab {
        flex: 1;
        padding: 8px 12px; /* OPTIMIZED: Reduced vertical from 10px to save 4px total */
        background: transparent;
        border: none;
        border-radius: 4px; /* CORRECTED: Was 6px, now matches site */
        font-size: 13px; /* Reduced from 14px for better fit */
        font-weight: 500;
        color: #666666; /* CORRECTED: Exact hex match */
        cursor: pointer;
        transition: all 200ms;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        white-space: nowrap; /* Prevent text wrapping */
        overflow: hidden; /* Hide overflow text */
        text-overflow: ellipsis; /* Show ellipsis for long text */
    }

    .diamond-modal-tab.active {
        background: #ffffff; /* CORRECTED: Exact hex match */
        color: #30a8dc;
        font-weight: 600; /* Added: Increased weight for active state */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .diamond-modal-tab:hover:not(.active) {
        color: #333333; /* CORRECTED: Exact hex match */
        background: rgba(255,255,255,0.5);
    }

    .diamond-modal-tab:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
    }

    .diamond-modal-tab-badge {
        display: inline-block;
        background: #4caf50;
        color: #fff;
        font-size: 9px;
        padding: 2px 5px;
        border-radius: 8px;
        margin-left: 4px;
        font-weight: 600;
    }

    /* Image Container Tablet */
    .diamond-modal-image-container {
        width: 100%;
        /* height removed: Conflicts with line 1428 which sets 400px !important - defer to that rule */
        position: relative !important; /* CRITICAL: Force relative positioning for absolute-positioned children */
        background: #f9f9f9;
        border-radius: 4px; /* CORRECTED: Was 8px, now matches site */
        overflow: hidden !important; /* Prevent content overflow */
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* CRITICAL: Lock dimensions on hover - ZERO LAYOUT SHIFT (Tablet) */
    .diamond-modal-image-container:hover {
        width: 400px !important; /* PHASE 1B: Lock width to prevent layout shift */
        height: 400px !important; /* PHASE 1B: Updated from 360px to match new container height */
    }

    .diamond-modal-image {
        /* Hybrid approach: JavaScript sets scaled width/height, flexbox centers */
        display: block !important;
        /* NO max-width/max-height - JS sets exact scaled dimensions */
        /* Flexbox container centers automatically */
        opacity: 1;
    }

    /* Tab Content */
    .diamond-modal-tab-content {
        display: none;
    }

    .diamond-modal-tab-content.active {
        display: block;
    }

    /* Specs Tablet */
    .diamond-modal-specs {
        display: grid;
        grid-template-columns: 1fr 1fr; /* EQUAL 50/50 columns for balanced 2-column layout */
        gap: 12px; /* OPTIMIZED: Reduced from 16px to save 12px total */
        padding: 12px 0; /* OPTIMIZED: Reduced from 16px to save 8px total */
        max-width: 100%; /* Prevent grid from expanding parent */
    }

    .diamond-modal-spec-row {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .diamond-modal-spec-label {
        font-size: 14px; /* CORRECTED: Was 12px, now matches mobile/desktop */
        color: #666666; /* CORRECTED: Was #999, now consistent */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        text-transform: none; /* CORRECTED: Remove uppercase */
        letter-spacing: normal; /* CORRECTED: Remove extra spacing */
        font-weight: 400;
    }

    .diamond-modal-spec-value {
        font-size: 16px;
        font-weight: 600;
        color: #333333; /* CORRECTED: Exact hex match */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
    }

    /* Price Tablet */
    .diamond-modal-price {
        font-size: 28px;
        font-weight: 700;
        color: #0088cc; /* CORRECTED: Was #30a8dc, now darker blue for prices */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* Added with fallbacks */
        line-height: 38.4px; /* Added: Matches site standard */
        text-align: center; /* ALIGNMENT FIX: Center price for consistency with mobile/desktop and e-commerce best practice */
        margin: 12px 0 135px 0; /* PRICE FIX: Increased bottom margin to 135px to push price above sticky footer - fixes overlap when scrolled to bottom (same as mobile fix) */
    }

    /* Actions Tablet - STICKY FOOTER with 3-Button Row */
    .diamond-modal-actions {
        position: sticky; /* Always visible - no scroll needed */
        bottom: 0; /* ARCHITECTURAL FIX: Stick to bottom of scroll area, clearance via body padding-bottom */
        display: flex;
        gap: 12px;
        margin: 0 -20px 0 -20px; /* STICKY FIX: Removed -180px bottom margin that was pulling sticky footer upward, conflicting with bottom: 80px positioning */
        padding: 16px; /* OPTIMIZED: Reduced from 20px to save 8px total */
        background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.95) 15%, white 30%, white); /* Gradient fade for smooth transition */
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08); /* Subtle shadow for depth */
        z-index: 100; /* Above other content */
    }

    /* Tablet: Hide row wrappers - display buttons as direct flex children */
    .diamond-modal-actions-row-1,
    .diamond-modal-actions-row-2 {
        display: contents; /* Remove row divs from layout, make buttons direct children */
    }

    /* 3 buttons in a row: Compare, Add to Cart, View Full Details */
    .diamond-modal-btn {
        flex: 1; /* Equal width distribution */
        padding: 12px 16px; /* OPTIMIZED: Reduced horizontal padding for 3-button fit */
        border: none;
        border-radius: 4px; /* CORRECTED: Was 6px, now matches site */
        font-size: 14px; /* OPTIMIZED: Reduced from 16px for 3-button fit */
        font-weight: 700; /* CORRECTED: Was 600, now 700 for buttons */
        cursor: pointer;
        transition: all 200ms;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        text-align: center;
        text-decoration: none;
        display: inline-flex; /* FIXED: Changed from inline-block to inline-flex for proper centering */
        justify-content: center; /* FIXED: Ensures horizontal centering */
        align-items: center; /* FIXED: Ensures vertical centering */
        text-transform: none; /* Added: No uppercase on buttons */
    }

    /* Compare button - Position 1 (Left) */
    .diamond-modal-actions .diamond-modal-compare-btn {
        order: 1;
        flex: 1;
        background: #ffffff;
        border: 2px solid #30a8dc;
        color: #30a8dc;
        font-weight: 600;
    }

    .diamond-modal-actions .diamond-modal-compare-btn:hover {
        background: #30a8dc;
        color: #fff;
    }

    .diamond-modal-actions .diamond-modal-compare-btn.added {
        background: #4caf50 !important;
        border-color: #4caf50 !important;
        color: #fff !important;
    }

    /* Add to Cart button - Position 2 (Middle) */
    .diamond-modal-btn-primary {
        order: 2;
        background: #30a8dc;
        color: #ffffff; /* CORRECTED: Exact hex match */
    }

    .diamond-modal-btn-primary:hover {
        background: #2897ca; /* CORRECTED: Was #4caf50, now darker blue */
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(48, 168, 220, 0.3); /* CORRECTED: Brand blue shadow */
    }

    /* View Full Details button - Position 3 (Right) */
    .diamond-modal-btn-secondary {
        order: 3;
        background: #ffffff; /* CORRECTED: Exact hex match */
        color: #30a8dc;
        border: 2px solid #30a8dc;
        font-weight: 600; /* Secondary buttons slightly lighter */
    }

    .diamond-modal-btn-secondary:hover {
        background: #f0f8fc;
        border-color: #2897ca; /* Added: Darker border on hover */
    }

    .diamond-modal-btn:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
        box-shadow: 0 0 0 3px rgba(48, 168, 220, 0.1);
    }
}

/* ============================================================================
   DESKTOP MODAL (1440-1799px) - Side Panel with Grid Shrink
   ============================================================================ */

@media (min-width: 1440px) and (max-width: 1799px) {
    /* Diamond-specific: Increase container width for better modal/grid split */
    body.diamond-search-page .container {
        max-width: 1800px !important;
    }

    /* Grid shrinks to 65% when modal open */
    #tabs-container.modal-open {
        width: 65% !important;
        transition: width 300ms ease-out;
    }

    .diamond-modal {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 35%;
        max-width: 500px;
        background: #fff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 300ms ease-out;
        z-index: 1001;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .diamond-modal.open {
        transform: translateX(0);
    }

    .diamond-modal-header {
        padding: 18px 24px;
        border-bottom: 1px solid #dddddd; /* CORRECTED: Was #e0e0e0, exact match */
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }

    .diamond-modal-title {
        font-size: 28px; /* CORRECTED: Was 20px, now matches site H1 */
        font-weight: 400; /* CORRECTED: Was 600, now matches site standard */
        color: #30a8dc; /* CORRECTED: Was #424242, now brand blue */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        line-height: 39.2px; /* Added: Matches site H1 line-height */
        margin: 0;
        flex: 1;
    }

    .diamond-modal-close {
        background: none;
        border: none;
        font-size: 36px;
        color: #666;
        cursor: pointer;
        padding: 0;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 200ms, color 200ms;
    }

    .diamond-modal-close:hover {
        background: #f5f5f5;
        color: #333;
    }

    .diamond-modal-body {
        padding: 16px;
        padding-bottom: 180px;
        overflow-y: auto;
        flex: 1;
        -webkit-font-smoothing: antialiased; /* Added: Crisp text rendering */
        -moz-osx-font-smoothing: grayscale;
    }

    /* Tabs Desktop */
    .diamond-modal-tabs {
        display: flex;
        gap: 4px;
        margin-bottom: 16px;
        background: #f2f2f2; /* CORRECTED: Was #f5f5f5, exact match */
        border-radius: 4px; /* CORRECTED: Was 8px, now matches site */
        padding: 4px;
    }

    .diamond-modal-tab {
        flex: 1;
        padding: 12px 16px;
        background: transparent;
        border: none;
        border-radius: 4px; /* CORRECTED: Was 6px, now matches site */
        font-size: 16px !important;
        font-weight: 500;
        color: #666666; /* CORRECTED: Exact hex match */
        cursor: pointer;
        transition: all 200ms;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
    }

    .diamond-modal-tab.active {
        background: #ffffff; /* CORRECTED: Exact hex match */
        color: #30a8dc;
        font-weight: 600; /* Added: Increased weight for active state */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .diamond-modal-tab:hover:not(.active) {
        color: #333333; /* CORRECTED: Exact hex match */
        background: rgba(255,255,255,0.5);
    }

    .diamond-modal-tab:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
    }

    .diamond-modal-tab-badge {
        display: inline-block;
        background: #4caf50;
        color: #fff;
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 10px;
        margin-left: 6px;
        font-weight: 600;
    }

    /* Image Container Desktop */
    .diamond-modal-image-container {
        width: 100%;
        height: 400px;
        position: relative !important; /* CRITICAL: Force relative positioning for absolute-positioned children */
        background: #f9f9f9;
        border-radius: 4px; /* CORRECTED: Was 8px, now matches site */
        overflow: hidden !important; /* Prevent content overflow */
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* CRITICAL: Lock dimensions on hover - ZERO LAYOUT SHIFT (Desktop) */
    .diamond-modal-image-container:hover {
        width: 400px !important; /* PHASE 1B: Lock width to prevent layout shift */
        height: 400px !important; /* Lock height - no expansion */
    }

    .diamond-modal-image {
        /* Hybrid approach: JavaScript sets scaled width/height, flexbox centers */
        display: block !important;
        /* NO max-width/max-height - JS sets exact scaled dimensions */
        /* Flexbox container centers automatically */
        opacity: 1;
    }

    .diamond-modal-image-loading {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #666; /* Match 360 tab */
        font-size: 14px;
        display: flex; /* Match 360 tab - flexbox layout */
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Tab Content */
    .diamond-modal-tab-content {
        display: none;
    }

    .diamond-modal-tab-content.active {
        display: block;
    }

    /* Specs Desktop - 2-Column Grid (exact match to tablet) */
    .diamond-modal-specs {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* EQUAL 50/50 columns for balanced 2-column layout */
        gap: 12px !important;
        padding: 12px 0;
        max-width: 100%;
    }

    .diamond-modal-spec-row {
        display: flex !important;
        flex-direction: column !important; /* Vertical stack: label on top, value below */
        gap: 4px !important;
    }

    .diamond-modal-spec-label {
        font-size: 14px;
        color: #666666;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
        font-weight: 400;
        text-transform: none;
        letter-spacing: normal;
    }

    .diamond-modal-spec-value {
        font-size: 16px;
        font-weight: 600; /* Bold values like tablet */
        color: #333333;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    /* Price Desktop */
    .diamond-modal-price {
        font-size: 32px;
        font-weight: 700;
        color: #0088cc; /* CORRECTED: Was #30a8dc, now darker blue for prices */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* Added with fallbacks */
        line-height: 38.4px; /* Added: Matches site standard */
        text-align: center;
        padding: 16px 0;
        border-top: 2px solid #dddddd; /* CORRECTED: Was #e0e0e0, exact match */
        border-bottom: 2px solid #dddddd;
        margin: 16px 0;
    }

    /* Actions Desktop - 3-Button Stacked Layout */
    .diamond-modal-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px 0 0 0;
        margin-bottom: 20px; /* Additional clearance for chat widget */
    }

    /* CRITICAL: Remove row wrappers from layout at desktop */
    .diamond-modal-actions-row-1,
    .diamond-modal-actions-row-2 {
        display: contents; /* Makes buttons direct flex children */
    }

    /* 3 stacked buttons: Compare, Add to Cart, View Full Details */
    .diamond-modal-btn {
        width: 100%;
        max-width: 100%; /* Prevent overflow */
        padding: 14px 16px; /* FIXED: Reduced horizontal padding from 24px to 16px to prevent text truncation */
        border: none;
        border-radius: 4px; /* CORRECTED: Was 6px, now matches site */
        font-size: 16px;
        font-weight: 700; /* CORRECTED: Was 600, now 700 for buttons */
        cursor: pointer;
        transition: all 200ms;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* CORRECTED with fallbacks */
        text-align: center;
        text-decoration: none;
        display: inline-flex; /* FIXED: Changed from inline-block to inline-flex for proper centering */
        justify-content: center; /* FIXED: Ensures horizontal centering */
        align-items: center; /* FIXED: Ensures vertical centering */
        text-transform: none; /* Added: No uppercase on buttons */
    }

    /* Compare button - Position 1 (Top) */
    .diamond-modal-actions .diamond-modal-compare-btn {
        order: 1;
        width: 100%;
        background: #ffffff;
        border: 2px solid #30a8dc;
        color: #30a8dc;
        font-weight: 600;
    }

    .diamond-modal-actions .diamond-modal-compare-btn:hover {
        background: #30a8dc;
        color: #fff;
    }

    .diamond-modal-actions .diamond-modal-compare-btn.added {
        background: #4caf50 !important;
        border-color: #4caf50 !important;
        color: #fff !important;
    }

    /* Add to Cart button - Position 2 (Middle) */
    .diamond-modal-btn-primary {
        order: 2;
        background: #30a8dc;
        color: #ffffff; /* CORRECTED: Exact hex match */
    }

    .diamond-modal-btn-primary:hover {
        background: #2897ca; /* CORRECTED: Was #4caf50, now darker blue */
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(48, 168, 220, 0.3); /* CORRECTED: Brand blue shadow */
    }

    /* View Full Details button - Position 3 (Bottom) */
    .diamond-modal-btn-secondary {
        order: 3;
        background: #ffffff; /* CORRECTED: Exact hex match */
        color: #30a8dc;
        border: 2px solid #30a8dc;
        font-weight: 600; /* Secondary buttons slightly lighter */
    }

    .diamond-modal-btn-secondary:hover {
        background: #f0f8fc;
        border-color: #2897ca; /* Added: Darker border on hover */
    }

    .diamond-modal-btn:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
        box-shadow: 0 0 0 3px rgba(48, 168, 220, 0.1);
    }
}

/* ============================================================================
   LARGE DESKTOP MODAL (1800px+) - Side Panel WITHOUT Grid Shrink
   Added: 2025-11-05
   On large screens (1920px+), modal (500px) doesn't overlap grid (1420px+ available)
   Grid stays full width, only dims for modal focus - no jarring shift
   ============================================================================ */

@media (min-width: 1800px) {
    /* Diamond-specific: Increase container width for better layout */
    body.diamond-search-page .container {
        max-width: 1800px !important;
    }

    /* Grid stays 100% width - NO SHRINK needed on large screens */
    #tabs-container.modal-open {
        width: 100% !important;  /* No width change - grid stays in place */
        opacity: 0.8;            /* Still dims to indicate modal focus */
        pointer-events: none;    /* Still disabled during modal interaction */
        transition: opacity 300ms ease-out;
    }

    .diamond-modal {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0; /* ARCHITECTURAL FIX: Full viewport height - clearance via content padding, not container cropping */
        width: 35%;
        max-width: 500px;
        background: #fff;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
        z-index: 1001;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .diamond-modal.open {
        transform: translateX(0);
    }

    .diamond-modal-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 200ms ease-out; /* CORRECTED: Was 300ms, now 200ms standard */
        z-index: 1000;
        pointer-events: none;
    }

    .diamond-modal-backdrop.visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Modal header, tabs, body styling */
    .diamond-modal-header {
        background: linear-gradient(135deg, #30a8dc 0%, #2897ca 100%); /* CORRECTED: End color updated */
        color: #ffffff; /* CORRECTED: Exact hex match */
        padding: 18px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        flex-shrink: 0;
    }

    .diamond-modal-title {
        margin: 0;
        font-size: 28px; /* CORRECTED: Was 20px, now matches site H1 */
        font-weight: 400; /* CORRECTED: Was 600, now matches site standard */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* Added with fallbacks */
        line-height: 39.2px; /* CORRECTED: Was 1.3, now exact match */
        color: #ffffff; /* Added: Explicit white for gradient header */
    }

    /* CRITICAL FIX: Override global !important rule to keep white text on blue gradient header */
    .diamond-modal-header .diamond-modal-title {
        color: #ffffff !important; /* White on blue gradient - higher specificity override */
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    }

    .diamond-modal-price {
        margin: 8px 0 0 0;
        font-size: 24px;
        font-weight: 700;
        color: #ffffff; /* CORRECTED: Exact hex match */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* Added with fallbacks */
    }

    /* CRITICAL FIX: Override global !important rule for price on gradient header */
    .diamond-modal-header .diamond-modal-price {
        color: #ffffff !important; /* White on blue gradient */
        opacity: 0.95; /* Slightly dimmed for visual hierarchy */
    }

    .diamond-modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff; /* CORRECTED: Exact hex match */
        font-size: 20px;
        transition: background 200ms ease;
        z-index: 1;
    }

    .diamond-modal-close:hover {
        background: rgba(255, 255, 255, 0.25); /* CORRECTED: Increase opacity on hover for gradient header */
        color: #ffffff; /* CORRECTED: Stay white on gradient header */
    }

    .diamond-modal-close:focus-visible {
        outline: 2px solid #ffffff; /* Added: White focus state on gradient header */
        outline-offset: 2px;
    }

    .diamond-modal-body {
        padding: 16px;
        overflow-y: auto;
        flex: 1;
        min-height: 0; /* FLEXBOX FIX: Allow shrinking below content size to enable overflow scrolling */
        -webkit-font-smoothing: antialiased; /* Added: Crisp text rendering */
        -moz-osx-font-smoothing: grayscale;
    }

    /* SPACER FIX: Guaranteed clearance for chat widget via pseudo-element */
    .diamond-modal-body::after {
        content: '';
        display: block;
        height: 250px; /* INCREASED: Chat widget clearance (80px) + large buffer (170px) to ensure buttons always visible above chat */
        flex-shrink: 0; /* Never collapse */
    }

    /* Tabs Desktop */
    .diamond-modal-tabs {
        display: flex;
        gap: 4px;
        margin-bottom: 20px;
        border-bottom: 2px solid #dddddd; /* CORRECTED: Was #e0e0e0, exact match */
    }

    .diamond-modal-tab {
        background: transparent;
        border: none;
        padding: 12px 16px; /* CORRECTED: Was 12px 20px, now aligned to 4px grid */
        font-size: 16px !important; /* CORRECTED: Was 15px, now consistent */
        font-weight: 500;
        color: #666666; /* CORRECTED: Exact hex match */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* Added with fallbacks */
        cursor: pointer;
        border-bottom: 3px solid transparent;
        transition: all 200ms ease;
        flex: 1;
    }

    .diamond-modal-tab:hover {
        color: #30a8dc;
        background: rgba(48, 168, 220, 0.05);
    }

    .diamond-modal-tab.active {
        color: #30a8dc;
        border-bottom-color: #30a8dc;
        font-weight: 600;
    }

    .diamond-modal-tab:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
    }

    .diamond-modal-tab-content {
        display: none;
    }

    .diamond-modal-tab-content.active {
        display: block;
    }

    /* DELETED CONFLICTING BARE CSS - Grid styles only in @media queries */

    /* Desktop button styles */
    .diamond-modal-actions {
        padding: 20px 24px; /* Standard padding */
        border-top: 1px solid #dddddd; /* CORRECTED: Was #e0e0e0, exact match */
        display: flex;
        flex-direction: column; /* FIXED: Vertical stack for large desktop */
        gap: 12px;
        background: #ffffff; /* CORRECTED: Exact hex match */
        flex-shrink: 0;
        /* Chat clearance handled by .diamond-modal::after pseudo-element spacer */
    }

    /* CRITICAL: Remove row wrappers from layout at large desktop */
    .diamond-modal-actions-row-1,
    .diamond-modal-actions-row-2 {
        display: contents; /* Makes buttons direct flex children */
    }

    .diamond-modal-btn {
        width: 100%; /* FIXED: Full width for vertical stack */
        padding: 12px 16px; /* FIXED: Reduced horizontal padding from 24px to 16px to prevent text truncation */
        font-size: 16px;
        font-weight: 700; /* CORRECTED: Was 600, now 700 for buttons */
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif; /* Added with fallbacks */
        border-radius: 4px;
        border: none;
        cursor: pointer;
        transition: all 200ms ease;
        text-transform: none; /* Added: No uppercase on buttons */
    }

    .diamond-modal-btn-primary {
        background: #30a8dc;
        color: #ffffff; /* CORRECTED: Exact hex match */
    }

    .diamond-modal-btn-primary:hover {
        background: #2897ca;
        box-shadow: 0 4px 12px rgba(48, 168, 220, 0.3);
        transform: translateY(-2px); /* Added: Subtle lift on hover */
    }

    .diamond-modal-btn-secondary {
        background: #ffffff; /* CORRECTED: Was #f5f5f5, now white */
        color: #30a8dc;
        border: 2px solid #30a8dc;
        font-weight: 600; /* Secondary buttons slightly lighter */
    }

    .diamond-modal-btn-secondary:hover {
        background: #f0f8fc;
        border-color: #2897ca; /* Added: Darker border on hover */
    }

    .diamond-modal-btn:focus-visible {
        outline: 2px solid #30a8dc; /* Added: Brand blue focus state */
        outline-offset: 2px;
        box-shadow: 0 0 0 3px rgba(48, 168, 220, 0.1);
    }

    /* ========================================================================
       Specs Grid Layout - 2-Column Grid (EQUAL 50/50)
       Added: 2025-11-20 - Missing CSS for large desktop viewport
       ======================================================================== */

    .diamond-modal-specs {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* EQUAL 50/50 columns for balanced 2-column layout */
        gap: 12px !important;
        padding: 12px 0;
        max-width: 100%;
    }

    .diamond-modal-spec-row {
        display: flex !important;
        flex-direction: column !important; /* Vertical stack: label on top, value below */
        gap: 4px !important;
    }

    .diamond-modal-spec-label {
        font-size: 14px;
        color: #666666;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
        font-weight: 400;
        text-transform: none;
        letter-spacing: normal;
    }

    .diamond-modal-spec-value {
        font-size: 16px;
        font-weight: 600;
        color: #333333;
        font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    }
}

/* ============================================================================
   360Â° VIDEO CONTAINER (SpriteSpin)
   ============================================================================ */

.diamond-360-container {
    width: 100%;
    height: 100%;
    max-width: 500px; /* Absolute ceiling - videos can't exceed this */
    max-height: 500px; /* Absolute ceiling - videos can't exceed this */
    position: relative;
    background: #f9f9f9; /* Match photo tab - NO BLACK SCREEN */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensure videos don't escape container */
}

/* Ensure iframes and videos constrain to container while preserving aspect ratio */
.diamond-360-container iframe,
.diamond-360-container video,
.diamond-modal-image-container iframe,
.diamond-modal-image-container video {
    /* DO NOT set width/height - let JavaScript control dimensions for transform: scale() */
    /* JavaScript sets iframe to native size (500px), then applies transform: scale() */
    /* This approach works universally for all 19 diamond video vendors */
    border: none !important;
    display: block !important;
}

/* RESPONSIVE VIDEO - Scale down to fit within modal's fixed height constraints
   Uses transform: scale() for proper containment */
.diamond-360-container.mainproductimageclass.has-video {
    position: relative !important; /* Needed for absolute positioned iframe */
    width: 100% !important;
    height: 100% !important; /* Fill parent height (220px mobile, 280px tablet, 320px desktop) */
    min-height: 0 !important; /* Override .mainproductimageclass min-height: 290px */
    margin-left: 0 !important; /* Override .mainproductimageclass margin-left: 21px */
    overflow: hidden !important; /* Critical - clips scaled content to container bounds */
    display: block !important; /* Block layout, NOT flex */
    background: #f9f9f9 !important; /* Maintain light background */
}

.diamond-360-container.mainproductimageclass.has-video iframe {
    border: none !important;
    /* position: absolute, width, height, transform set by JavaScript */
    /* Centering handled by transform: translate(-50%, -50%) in JS */
}

.diamond-360-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* width: 100%; REMOVED - let content determine width for proper centering */
    color: #666; /* Dark gray for light background (was #fff for black) */
    font-size: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.diamond-360-progress {
    width: 200px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1); /* Subtle dark track on light background */
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.diamond-360-progress-bar {
    height: 100%;
    background: #30a8dc;
    width: 0%;
    transition: width 200ms;
}

.spritespin-wrapper {
    width: 100% !important;
    height: 100% !important;
}

.spritespin-canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================================================
   LOADING SPINNER
   ============================================================================ */

.diamond-modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(48, 168, 220, 0.2); /* Light blue for light background */
    border-top-color: #30a8dc; /* Brand blue for spinning indicator */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.diamond-modal:focus-visible {
    outline: 3px solid #30a8dc;
    outline-offset: -3px;
}

.diamond-modal-tab:focus-visible,
.diamond-modal-btn:focus-visible,
.diamond-modal-close:focus-visible {
    outline: 2px solid #30a8dc;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================================
   TAB TEXT OVERFLOW PROTECTION - 2025-01-10
   Prevent tab text from clipping at any viewport size
   ============================================================================ */

.diamond-modal-tab {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ============================================================================
   CRITICAL FIXES - 2025-01-10
   Fix layout shifts, improve grid, add !important for browser cache issues
   ============================================================================ */

/* FIX 1: Prevent Tab Content Layout Shifts - Fixed Heights WITHOUT Scrollbars */
.diamond-modal-tab-content {
    height: 400px !important; /* FIXED HEIGHT prevents layout shift */
    overflow: hidden !important; /* No scrollbars - images/videos/PDFs fill container */
}

/* Mobile: Smaller fixed height */
@media (max-width: 767px) {
    .diamond-modal-tab-content {
        height: 400px !important; /* PHASE 1B: Increased from 350px to accommodate 400px image container */
        overflow: hidden !important; /* No scrollbars */
    }

    .diamond-modal-image-container {
        width: 400px !important; /* PHASE 1B: Fixed width for consistent sizing */
        height: 400px !important; /* PHASE 1B: Updated from 360px to 400px for consistent mobile video/image sizing */
        margin: 0 auto !important; /* Center the container */
    }
}

/* Tablet: Medium fixed height */
@media (min-width: 768px) and (max-width: 1439px) {
    .diamond-modal-tab-content {
        height: 480px !important; /* Increased from 380px to accommodate 400px image + tabs */
        overflow: hidden !important; /* No scrollbars */
    }

    .diamond-modal-image-container {
        width: 400px !important; /* PHASE 1B: Fixed width for consistent sizing */
        height: 400px !important; /* Increased from 280px (+43% larger) */
        margin: 0 auto !important; /* Center the container */
    }
}

/* Desktop: Larger fixed height */
@media (min-width: 1440px) {
    .diamond-modal-tab-content {
        height: 400px !important; /* Consistent desktop height */
        overflow: hidden !important; /* No scrollbars */
    }

    .diamond-modal-image-container {
        width: 400px !important; /* PHASE 1B: Fixed width for consistent sizing */
        height: 400px !important; /* FIXED: Match parent tab-content container (400px) - prevents overflow */
        margin: 0 auto !important; /* Center the container */
        overflow: hidden !important; /* Prevent content overflow */
    }

    /* CRITICAL: Lock dimensions on hover - ZERO LAYOUT SHIFT (Desktop 400px) */
    .diamond-modal-image-container:hover {
        width: 400px !important; /* PHASE 1B: Lock width to prevent layout shift */
        height: 400px !important; /* Lock height - no expansion */
    }
}

/* DELETED DUPLICATE MOBILE DEFINITION - Base mobile CSS at lines 262-294 handles mobile layout */
/* Removed conflicting @media (max-width: 767px) block that was overriding original flexbox layout */

/* FIX 3: Add !important to Critical Typography (Override Cache/Specificity) */
.diamond-modal-title {
    font-size: 28px !important;
    font-weight: 400 !important;
    color: #30a8dc !important;
    font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 39.2px !important;
}

.diamond-modal-price {
    color: #0088cc !important;
    font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.diamond-modal-btn {
    border-radius: 4px !important;
    font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 700 !important;
    transition: all 200ms !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.diamond-modal-btn-primary {
    background: #30a8dc !important;
    color: #ffffff !important;
}

.diamond-modal-btn-primary:hover {
    background: #2897ca !important;
    box-shadow: 0 4px 12px rgba(48, 168, 220, 0.3) !important;
    transform: translateY(-2px) !important;
}

.diamond-modal-tab {
    font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif !important;
    border-radius: 4px !important;
}

.diamond-modal-tab.active {
    font-weight: 600 !important;
}

/* FIX 4: Ensure Smooth Tab Transitions */
.diamond-modal-tab-content {
    opacity: 1 !important;
    transition: opacity 200ms ease-in-out !important;
}

.diamond-modal-tab-content:not(.active) {
    display: none !important;
    opacity: 0 !important;
}

/* FIX 5: Border/Shadow Corrections with !important */
.diamond-modal-image-container {
    border-radius: 4px !important;
}

.diamond-modal-tabs {
    background: #f2f2f2 !important;
    border-radius: 4px !important;
}

@media (min-width: 768px) and (max-width: 1439px) {
    .diamond-modal-tabs {
        background: #f2f2f2 !important;
    }
}

@media (min-width: 1440px) {
    .diamond-modal-tabs {
        background: #f2f2f2 !important;
    }
}

/* END CRITICAL FIXES */

/* ============================================================================
   360Â° VIDEO REQUEST FORM STYLES - Extracted from JavaScript
   Replaces all inline styles with proper CSS classes
   ============================================================================ */

/* Form Container */
.diamond-video-form-container {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
}

/* Form Intro Text */
.diamond-video-form-intro {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.diamond-video-form-intro strong {
    color: #30a8dc;
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
}

/* Field Wrapper */
.diamond-video-form-field-wrapper {
    width: 100%;
    margin: 8px 0;
    clear: both;
    overflow: hidden;
}

/* Form Labels */
.diamond-video-form-label {
    width: 38%;
    float: left;
    text-align: right;
    color: #30a8dc;
    padding: 8px 2% 8px 0;
    font-size: 14px;
    font-weight: 500;
}

/* Form Input Fields */
.diamond-video-form-input,
.diamond-video-form-textarea {
    width: 53%;
    float: left;
    color: #424242;
    padding: 8px 3%;
    border: 1px solid #bfbfbf;
    font-size: 14px;
    border-radius: 3px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.diamond-video-form-input:focus,
.diamond-video-form-textarea:focus {
    border-color: #30a8dc !important;
    box-shadow: 0 0 0 3px rgba(48, 168, 220, 0.1) !important;
    outline: none;
}

.diamond-video-form-input:blur,
.diamond-video-form-textarea:blur {
    border-color: #bfbfbf;
    box-shadow: none;
}

.diamond-video-form-textarea {
    resize: vertical;
}

/* Submit Button */
.diamond-video-form-submit {
    background: #30a8dc;
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 5px;
    width: 100%;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 16px;
    transition: all 200ms;
}

.diamond-video-form-submit:hover {
    background: #2a9bd3 !important;
    box-shadow: 0 4px 12px rgba(48, 168, 220, 0.3) !important;
    transform: translateY(-1px) !important;
}

.diamond-video-form-submit:active {
    transform: translateY(0) !important;
}

/* Privacy Note */
.diamond-video-form-privacy {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #30a8dc;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .diamond-video-form-label {
        width: 100%;
        text-align: left;
        float: none;
        margin-bottom: 4px;
        padding: 0;
    }

    .diamond-video-form-input,
    .diamond-video-form-textarea {
        width: 100%;
        float: none;
        padding: 8px 12px;
    }
}

/* Status Message Styling */
.diamond-video-status-message {
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.diamond-video-status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.diamond-video-status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================================================
   360Â° VIDEO FORM COMPACT DESIGN - FIT WITHOUT SCROLLING
   Date: 2025-11-11

   PROBLEM: Form height (~427px) exceeds modal tab container heights:
   - Mobile: 350px container
   - Tablet: 380px container
   - Desktop: 400px container

   SOLUTION: Reduce form element sizes/spacing to fit in ~323px:
   - Icon: 80px â†’ 60px
   - Heading: 22px â†’ 18px
   - Description: 14px â†’ 13px (tighter line-height)
   - Padding: 24px â†’ 16px
   - Field spacing: 8px â†’ 4px
   - Labels: 14px â†’ 13px
   - Inputs: 8px padding â†’ 6px padding
   - Textarea: default â†’ 60px min-height
   - Button: 12px padding â†’ 10px padding
   - Privacy note: 12px â†’ 11px

   RESULT: Form fits completely in all containers WITHOUT scrolling:
   - Mobile 350px: âœ… (323px form + 27px margin)
   - Tablet 380px: âœ… (323px form + 57px margin)
   - Desktop 400px: âœ… (323px form + 77px margin)
   ============================================================================ */

/* Compact container */
.diamond-modal-tab-content .diamond-video-request-form,
.diamond-modal-tab-content .diamond-video-form-container {
    padding: 16px !important; /* Reduced from 24px */
    max-width: 100% !important; /* Use full width */
}

/* Compact icon - Reduced from 80px to 60px */
.diamond-modal-tab-content .diamond-video-request-form > div:first-child {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 12px !important; /* Reduced from 20px */
    font-size: 28px !important; /* Reduced from 36px */
    border-width: 2px !important;
}

/* Compact heading - Reduced from 22px to 18px */
.diamond-modal-tab-content .diamond-video-request-form h4 {
    font-size: 18px !important;
    margin-bottom: 6px !important; /* Reduced from 8px */
    line-height: 1.3 !important; /* Tighter spacing */
}

/* Compact description - Reduced from 14px to 13px */
.diamond-modal-tab-content .diamond-video-request-form > p:first-of-type,
.diamond-modal-tab-content .diamond-video-form-intro {
    font-size: 13px !important;
    margin-bottom: 16px !important; /* Reduced from 24px */
    line-height: 1.4 !important; /* Tighter spacing */
}

/* Reduce field spacing - 8px to 4px */
.diamond-modal-tab-content .diamond-video-form-field-wrapper {
    margin: 4px 0 !important;
}

/* Compact labels - Reduced from 14px to 13px */
.diamond-modal-tab-content .diamond-video-form-label {
    padding: 6px 2% 6px 0 !important; /* Reduced from 8px */
    font-size: 13px !important;
}

/* Compact inputs - Reduced padding from 8px to 6px */
.diamond-modal-tab-content .diamond-video-form-input,
.diamond-modal-tab-content .diamond-video-form-textarea {
    padding: 6px 3% !important;
    font-size: 13px !important; /* Reduced from 14px */
}

/* Shorter textarea - Constrained height */
.diamond-modal-tab-content .diamond-video-form-textarea {
    min-height: 60px !important;
    max-height: 80px !important; /* Prevent excessive growth */
}

/* Compact button - Reduced padding from 12px to 10px */
.diamond-modal-tab-content .diamond-video-form-submit {
    padding: 10px 24px !important;
    font-size: 14px !important; /* Reduced from 15px */
    margin-top: 12px !important; /* Reduced from 16px */
}

/* Compact privacy note - Reduced from 12px to 11px */
.diamond-modal-tab-content .diamond-video-form-privacy,
.diamond-modal-tab-content .diamond-video-request-form > p:last-of-type {
    margin-top: 8px !important; /* Reduced from 12px */
    padding: 8px !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
}

/* Status message compact */
.diamond-modal-tab-content .diamond-video-status-message {
    padding: 8px !important; /* Reduced from 12px */
    margin: 8px 0 !important; /* Reduced from 12px */
    font-size: 12px !important; /* Reduced from 14px */
}

/* END 360Â° VIDEO REQUEST FORM STYLES */

/* =================================================================
   CERTIFICATE PDF VIEWER STYLES
   ================================================================= */

/* PDF Container - 400px to match other tabs */
.diamond-modal-pdf-container {
    width: 100%;
    height: 400px !important;
    overflow: hidden;
    background: #525659; /* Dark gray for PDF viewer background */
    position: relative;
    display: flex;
    flex-direction: column;
}

/* PDF Canvas Wrapper - Scrollable area for zoomed PDF */
.diamond-modal-pdf-canvas-wrapper {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #525659;
}

/* PDF Canvas - Allow zoom beyond container width */
.diamond-modal-pdf-canvas-wrapper canvas {
    /* No max-width - canvas can exceed container when zoomed (wrapper has overflow:auto for scrollbars) */
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* PDF Controls Bar */
.diamond-modal-pdf-controls {
    background: #f5f5f5;
    border-top: 1px solid #dddddd;
    padding: 8px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font-size: 14px;
    color: #424242;
}

/* PDF Control Buttons */
.diamond-modal-pdf-controls button {
    padding: 6px 12px;
    background: #30a8dc;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 200ms ease;
    min-width: 80px;
}

.diamond-modal-pdf-controls button:hover:not(:disabled) {
    background: #2897ca;
}

.diamond-modal-pdf-controls button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* PDF Zoom Level Display */
.diamond-modal-pdf-controls span[id*="zoom-level"] {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: #424242;
}

/* PDF Loading Spinner */
.pdf-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
}

.pdf-loading-spinner .diamond-modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* PDF Error Message */
.pdf-error-message {
    padding: 40px 20px;
    text-align: center;
    color: #d32f2f;
}

.pdf-error-message a {
    color: #30a8dc;
    text-decoration: underline;
    margin-top: 12px;
    display: inline-block;
}

.pdf-error-message a:hover {
    color: #2897ca;
}

/* END CERTIFICATE PDF VIEWER STYLES */

/* ============================================================================
   PROFESSIONAL MEDIA REQUEST FORMS (Photo / Video / Certificate)
   Unified design for all "not available" states with responsive layouts
   ============================================================================ */

/* Container - Light background with full height/width usage */
.modal-media-request {
    background: #fafafa;
    padding: 8px; /* Reduced from 16px for mobile to fit 220px container */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Heading */
.modal-media-heading {
    font-size: 16px;
    color: #303030;
    font-weight: 700;
    text-align: center;
    margin: 0 0 8px 0;
}

/* Description - Responsive visibility */
.modal-media-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    text-align: center;
    margin: 0 0 12px 0;
}

/* Hide full description on mobile, show short */
.modal-media-description-full {
    display: none;
}

.modal-media-description-short {
    display: block;
}

/* Form Container - White box */
.modal-media-form-container {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 16px;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Form - Vertical stack */
.modal-media-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Form Fields */
.modal-form-field {
    width: 100%;
}

/* Hide message field on mobile */
.modal-form-field-message {
    display: none;
}

/* Labels - Brand blue with required asterisk */
.modal-form-label {
    color: #30a8dc;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
    text-align: left;
}

.modal-form-required {
    color: #d9534f;
}

/* Input Fields */
.modal-form-input,
.modal-form-textarea {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 14px;
    color: #333333;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.modal-form-input::placeholder,
.modal-form-textarea::placeholder {
    color: #999999;
    font-style: italic;
}

.modal-form-input:focus,
.modal-form-textarea:focus {
    border-color: #30a8dc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(48, 168, 220, 0.1);
}

.modal-form-textarea {
    min-height: 72px;
    resize: vertical;
}

/* Submit Button - Full width mobile */
.modal-form-button {
    background: #30a8dc;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-transform: none;
    box-shadow: 0 2px 4px rgba(48, 168, 220, 0.3);
    transition: all 0.2s ease;
    margin-top: 4px;
}

.modal-form-button:hover {
    background: #2897ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(48, 168, 220, 0.4);
}

.modal-form-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(48, 168, 220, 0.3);
}

/* Privacy Note - Hide on mobile */
.modal-form-privacy {
    font-size: 12px;
    color: #999999;
    text-align: center;
    margin-top: 8px;
    display: none;
}

.modal-form-privacy-icon {
    font-size: 14px;
}

/* ============================================================================
   MOBILE STYLES (< 768px) - Enhanced content reduction
   Reduces form content to fit in 220px mobile container
   ============================================================================ */
@media (max-width: 767px) {
    /* Reduce form container padding to save vertical space */
    .modal-media-form-container {
        padding: 8px !important; /* Reduced from 16px, saves ~16px */
    }

    /* Reduce input padding for more compact layout */
    .modal-form-input {
        padding: 8px 12px !important; /* Reduced from 10px 12px, saves ~4px */
    }

    /* Reduce button padding for more compact layout */
    .modal-form-button {
        padding: 8px 16px !important; /* Reduced from 10px 20px, saves ~4px */
    }
}

/* ============================================================================
   TABLET STYLES (768px - 1439px) - 280px container height
   ============================================================================ */
@media (min-width: 768px) and (max-width: 1439px) {
    .modal-media-request {
        padding: 12px; /* Reduced from 24px to fit 280px container */
    }

    .modal-media-heading {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .modal-media-description {
        margin-bottom: 16px;
    }

    /* Show short description */
    .modal-media-description-short {
        display: block;
    }

    .modal-media-description-full {
        display: none;
    }

    .modal-media-form-container {
        padding: 20px;
    }

    .modal-media-form {
        gap: 10px;
    }

    .modal-form-button {
        width: 100%;
        margin-top: 4px;
    }

    /* Show privacy note on tablet */
    .modal-form-privacy {
        display: block;
    }
}

/* ============================================================================
   DESKTOP STYLES (1440px+) - 500px container height maximum
   ============================================================================ */
@media (min-width: 1440px) {
    .modal-media-request {
        padding: 16px; /* Reduced from 32px to save 32px vertical space */
    }

    .modal-media-heading {
        font-size: 18px; /* Reduced from 20px */
        margin-bottom: 8px; /* Reduced from 12px */
    }

    .modal-media-description {
        margin-bottom: 12px; /* Reduced from 20px */
    }

    /* Show full description on desktop */
    .modal-media-description-full {
        display: block;
    }

    .modal-media-description-short {
        display: none;
    }

    .modal-media-form-container {
        padding: 12px; /* Reduced from 20px */
        max-width: 420px; /* Reduced from 480px */
    }

    .modal-media-form {
        gap: 8px; /* Reduced from 12px */
    }

    /* Hide message field on desktop to save ~112px */
    .modal-form-field-message {
        display: none; /* Changed from block - users can reply to email */
    }

    .modal-form-button {
        width: auto;
        padding: 10px 24px; /* Reduced from 12px 32px */
        font-size: 14px; /* Reduced from 16px */
        margin-top: 8px;
    }

    /* Show privacy note on desktop */
    .modal-form-privacy {
        display: block;
        margin-top: 10px; /* Reduced from 12px */
    }
}

/* END PROFESSIONAL MEDIA REQUEST FORMS */

/* ============================================================================
   TOAST NOTIFICATIONS - Compare Success Messages
   ============================================================================ */

.diamond-modal-toast {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 1002;
    animation: slideInDown 300ms ease-out;
    font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.diamond-modal-toast-icon {
    font-size: 18px;
}

.diamond-modal-toast-message {
    line-height: 1.4;
}

@keyframes slideInDown {
    from {
        transform: translate(-50%, -20px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -20px);
        opacity: 0;
    }
}

/* ============================================================================
   FLOATING COMPARISON BAR - Persistent Compare Counter
   ============================================================================ */

.diamond-comparison-bar {
    position: fixed;
    bottom: 120px; /* Above chat widget */
    left: 0;
    right: 0;
    background: #30a8dc;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    z-index: 999;
    animation: slideInUp 300ms ease-out;
    font-family: 'Lato-Regular', 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (min-width: 768px) {
    .diamond-comparison-bar {
        bottom: 140px; /* Additional clearance on tablet */
    }
}

.diamond-comparison-count {
    font-weight: 600;
    font-size: 15px;
}

.diamond-comparison-view-btn {
    background: white;
    color: #30a8dc;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 200ms;
}

.diamond-comparison-view-btn:hover {
    background: #f0f8fc;
    transform: translateY(-1px);
}

.diamond-comparison-clear-btn {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 200ms;
}

.diamond-comparison-clear-btn:hover {
    background: rgba(255,255,255,0.1);
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
