/**
 * Video Verification Field Styles
 * Modern, responsive design for video recording interface
 * 
 * @package UserVerification
 * @since 1.4.4
 */

/* ==========================================================================
   Root Variables
   ========================================================================== */
:root {
    --uv-video-primary: #3b82f6;
    --uv-video-secondary: #6b7280;
    --uv-video-success: #10b981;
    --uv-video-error: #ef4444;
    --uv-video-warning: #f59e0b;
    --uv-video-background: #ffffff;
    --uv-video-surface: #f8fafc;
    --uv-video-border: #e5e7eb;
    --uv-video-text: #1f2937;
    --uv-video-text-muted: #6b7280;
    --uv-video-radius: 12px;
    --uv-video-radius-sm: 8px;
    --uv-video-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --uv-video-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --uv-video-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Video Verification Wrapper
   ========================================================================== */
.uv-video-verification-wrapper {
    background: var(--uv-video-background);
    border: 2px solid var(--uv-video-border);
    border-radius: var(--uv-video-radius);
    overflow: hidden;
    box-shadow: var(--uv-video-shadow);
    transition: var(--uv-video-transition);
    margin: 20px 0;
    position: relative;
    z-index: 1; /* Contain all video field elements */
}

.uv-video-verification-wrapper:hover:not(.uv-recording-active) {
    border-color: var(--uv-video-primary);
    box-shadow: var(--uv-video-shadow-lg);
    transition: var(--uv-video-transition);
}

/* Disable hover effects during recording to prevent stuck states */
.uv-video-verification-wrapper.uv-recording-active .uv-btn:hover,
.uv-video-verification-wrapper.uv-recording-active .uv-start-icon:hover,
.uv-video-verification-wrapper.uv-recording-active .uv-record-btn:hover,
.uv-video-verification-wrapper.uv-recording-active .uv-stop-btn:hover {
    transform: none !important;
    box-shadow: var(--uv-video-shadow) !important;
}

/* Layout isolation to prevent interference with other form fields */
.uv-video-verification-wrapper {
    contain: layout style;
    isolation: isolate;
}

/* Prevent layout shifts affecting other fields */
.uv-video-interface {
    contain: layout;
}

/* Force hardware acceleration for smooth animations */
.uv-btn, 
.uv-start-icon, 
.uv-record-btn, 
.uv-stop-btn {
    will-change: transform;
    transform: translateZ(0);
}

/* Reset will-change after hover to prevent memory issues */
.uv-btn:not(:hover), 
.uv-start-icon:not(:hover), 
.uv-record-btn:not(:hover), 
.uv-stop-btn:not(:hover) {
    will-change: auto;
}

/* Prevent body scroll issues when mobile recording is active */
body.uv-mobile-recording-active {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* Ensure form fields below video field are not affected by z-index issues */
.uv-video-verification-wrapper ~ * {
    position: relative;
    z-index: auto;
}

/* ==========================================================================
   Video Header
   ========================================================================== */
.uv-video-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--uv-video-primary), #4f46e5);
    color: white;
    border-bottom: 1px solid var(--uv-video-border);
}

.uv-video-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--uv-video-radius-sm);
}

.uv-video-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* ==========================================================================
   Video Interface Container
   ========================================================================== */
.uv-video-interface {
    position: relative;
    min-height: 400px;
    background: var(--uv-video-surface);
}

/* ==========================================================================
   Video States
   ========================================================================== */
.uv-video-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: var(--uv-video-transition);
}

/* ==========================================================================
   Initial State - Start Recording
   ========================================================================== */
.uv-start-recording-container {
    text-align: center;
    max-width: 400px;
}

.uv-start-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--uv-video-primary), #4f46e5);
    border-radius: 50%;
    color: white;
    margin-bottom: 24px;
    box-shadow: var(--uv-video-shadow);
    transition: var(--uv-video-transition);
}

.uv-start-icon:hover {
    transform: scale(1.05);
    box-shadow: var(--uv-video-shadow-lg);
    transition: var(--uv-video-transition);
}

.uv-start-icon:not(:hover) {
    transform: scale(1);
    transition: var(--uv-video-transition);
}

.uv-start-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--uv-video-text);
}

.uv-start-description {
    margin: 0 0 24px 0;
    color: var(--uv-video-text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   Recording State - Camera View
   ========================================================================== */
.uv-camera-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Quick Help Tooltip */
.uv-quick-help {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 20;
    opacity: 0;
    animation: fadeInOut 4s ease-in-out;
    pointer-events: none;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Face Guide */
.uv-face-guide {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    pointer-events: none; /* Allow clicks to pass through */
}

.uv-face-circle {
    position: relative;
    width: 200px;
    height: 240px;
    margin: 0 auto 12px;
}

.uv-face-outline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--uv-video-primary);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.8;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

.uv-face-instruction {
    color: var(--uv-video-primary);
    font-weight: 600;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 15px;
    box-shadow: var(--uv-video-shadow);
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(5px);
}

/* Video Preview */
.uv-video-preview {
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: var(--uv-video-radius);
    background: #000;
    box-shadow: var(--uv-video-shadow-lg);
    object-fit: cover;
}

/* Recording Controls */
.uv-recording-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: var(--uv-video-shadow-lg);
    backdrop-filter: blur(10px);
    z-index: 5; /* Lower z-index to prevent interference with form fields */
}

/* Timer Display */
.uv-timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: aliceblue;
  border-radius: 50px;
}

.uv-timer-circle {
    position: relative;
    width: 50px;
    height: 50px;
}

.uv-timer-progress {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    color: var(--uv-video-primary);
}

.uv-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 700;
    color: var(--uv-video-text);
}

/* Recording Buttons */
.uv-record-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--uv-video-error);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--uv-video-transition);
    box-shadow: var(--uv-video-shadow);
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

/* Recording button when in recording mode */
.uv-record-btn.uv-recording-active {
    background: #dc2626;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Button text alignment */
.uv-record-text {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1;
}

.uv-record-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--uv-video-shadow-lg);
    transition: var(--uv-video-transition);
}

.uv-record-btn:not(:hover) {
    transform: translateY(0);
    transition: var(--uv-video-transition);
}

/* Recording Icon Container */
.uv-record-icon {
    position: relative;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.uv-record-dot {
    width: 12px;
    height: 12px;
    background: rgb(31, 31, 31);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
    flex-shrink: 0; /* Prevent shrinking */
    margin: 0; /* Reset any margin */
}

.uv-stop-square {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 2px;
    flex-shrink: 0;
    margin: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.uv-stop-square {
    width: 12px;
    height: 12px;
    background: rgb(22, 22, 22);
    border-radius: 2px;
    flex-shrink: 0; /* Prevent shrinking */
    margin: 0; /* Reset any margin */
}

/* Instruction Text */
.uv-instruction-text {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 85%;
    z-index: 10;
}

.uv-text-bubble {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 20px;
    border-radius: var(--uv-video-radius);
    box-shadow: var(--uv-video-shadow);
    backdrop-filter: blur(10px);
    border: 2px solid var(--uv-video-primary);
}

.uv-instruction-content {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--uv-video-text);
    text-align: center;
    line-height: 1.4;
}

/* ==========================================================================
   Review State - Playback
   ========================================================================== */
.uv-review-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 20px;
    gap: 20px;
    min-height: 400px;
}

.uv-review-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--uv-video-text);
    order: 1;
}

.uv-playback-container {
    width: 100%;
    max-width: 480px;
    margin: 0;
    border-radius: var(--uv-video-radius);
    overflow: hidden;
    box-shadow: var(--uv-video-shadow-lg);
    order: 2;
}

.uv-video-playback {
    width: 100%;
    height: auto;
    max-height: 320px;
    background: #000;
    object-fit: cover;
    display: block;
}

.uv-review-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    order: 3;
    margin-top: 8px;
}

/* ==========================================================================
   Success State
   ========================================================================== */
.uv-success-container {
    text-align: center;
    max-width: 400px;
}

.uv-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--uv-video-success);
    border-radius: 50%;
    color: white;
    margin-bottom: 24px;
    box-shadow: var(--uv-video-shadow);
    animation: success-bounce 0.6s ease-out;
}

@keyframes success-bounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.uv-success-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--uv-video-success);
}

.uv-success-message {
    margin: 0;
    color: var(--uv-video-text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   Error State
   ========================================================================== */
.uv-error-container {
    text-align: center;
    max-width: 400px;
}

.uv-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--uv-video-error);
    border-radius: 50%;
    color: white;
    margin-bottom: 24px;
    box-shadow: var(--uv-video-shadow);
    animation: error-shake 0.6s ease-out;
}

@keyframes error-shake {
    0%, 20%, 40%, 60%, 80%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
}

.uv-error-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--uv-video-error);
}

.uv-error-message {
    margin: 0 0 24px 0;
    color: var(--uv-video-text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.uv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--uv-video-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--uv-video-transition);
    box-shadow: var(--uv-video-shadow);
    line-height: 1;
}

.uv-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--uv-video-shadow-lg);
    transition: var(--uv-video-transition);
}

.uv-btn:not(:hover) {
    transform: translateY(0);
    transition: var(--uv-video-transition);
}

.uv-btn:active {
    transform: translateY(0);
    box-shadow: var(--uv-video-shadow);
}

.uv-btn-primary {
    background: var(--uv-video-primary);
    color: white;
}

.uv-btn-primary:hover {
    background: #2563eb;
}

.uv-btn-secondary {
    background: var(--uv-video-secondary);
    color: white;
}

.uv-btn-secondary:hover {
    background: #4b5563;
}

/* ==========================================================================
   Disabled State
   ========================================================================== */
.uv-video-disabled {
    padding: 40px;
    text-align: center;
    background: var(--uv-video-surface);
    border: 2px dashed var(--uv-video-border);
    border-radius: var(--uv-video-radius);
}

.uv-notice {
    margin: 0;
    color: var(--uv-video-text-muted);
    font-style: italic;
}

/* ==========================================================================
   Field Error
   ========================================================================== */
.uv-field-error {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--uv-video-radius-sm);
    color: var(--uv-video-error);
    text-align: center;
}

/* ==========================================================================
   Desktop Optimizations
   ========================================================================== */
@media (min-width: 769px) {
    .uv-video-interface {
        min-height: 500px;
    }
    
    .uv-face-guide {
        top: 30%; /* Better positioning for desktop */
    }
    
    .uv-face-instruction {
        font-size: 13px;
        padding: 4px 10px;
        margin-top: 8px;
    }
    
    .uv-recording-controls {
        bottom: 40px; /* More space from bottom */
        padding: 4px 17px;
    }

    .uv-record-btn {
        display: inline-flex !important;
        padding: 14px !important;
        background: #0058ff !important;
      }

      .uv-stop-btn {
        display: inline-flex !important;
        padding: 15px !important;
        background: #ff0018 !important;
      }

    .uv-instruction-text {
        top: 15px; /* Higher position */
        max-width: 70%; /* Narrower for desktop */
    }
    .uv-timer-display {
  margin-bottom: 0;
}
    .uv-text-bubble {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .uv-instruction-content {
        font-size: 15px;
    }
    
    /* Larger video preview for desktop */
    .uv-video-preview {
        max-width: 720px;
    }
    
    /* Better review layout for desktop */
    .uv-review-container {
        padding: 30px;
        gap: 24px;
        min-height: 500px;
    }
    
    .uv-review-title {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .uv-playback-container {
        max-width: 520px;
    }
    
    .uv-video-playback {
        max-height: 360px;
    }
    
    .uv-review-actions {
        margin-top: 12px;
        gap: 20px;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .uv-video-verification-wrapper {
        margin: 16px 0;
    }
    
    .uv-video-header {
        padding: 16px 20px;
    }
    
    .uv-video-title {
        font-size: 16px;
    }
    
    .uv-video-interface {
        min-height: 350px;
    }
    
    .uv-video-state {
        padding: 20px;
    }
    
    .uv-start-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .uv-start-title {
        font-size: 20px;
    }
    
    .uv-face-circle {
        width: 160px;
        height: 200px;
    }
    
    .uv-face-guide {
        top: 45%; /* Adjusted for mobile */
    }
    
    .uv-recording-controls {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        bottom: 20px;
    }
    
    .uv-instruction-text {
        top: 10px;
        max-width: 90%;
    }
    
    .uv-text-bubble {
        padding: 10px 14px;
    }
    
    .uv-instruction-content {
        font-size: 13px;
    }
    
    .uv-review-container {
        padding: 16px;
        gap: 16px;
        min-height: 350px;
    }
    
    .uv-review-title {
        font-size: 16px;
    }
    
    .uv-playback-container {
        max-width: 100%;
    }
    
    .uv-video-playback {
        max-height: 280px;
    }
    
    .uv-review-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .uv-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .uv-video-header {
        padding: 12px 16px;
    }
    
    .uv-video-interface {
        min-height: 300px;
    }
    
    .uv-video-state {
        padding: 16px;
    }
    
    .uv-start-icon {
        width: 50px;
        height: 50px;
    }
    
    .uv-start-title {
        font-size: 18px;
    }
    
    .uv-face-circle {
        width: 140px;
        height: 180px;
    }
    
    .uv-timer-circle {
        width: 40px;
        height: 40px;
    }
    
    .uv-timer-text {
        font-size: 14px;
    }
    
    .uv-record-btn,
    .uv-stop-btn {
        padding: 10px 16px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    
    /* Ensure small mobile button alignment */
    .uv-record-dot,
    .uv-stop-square {
        width: 10px;
        height: 10px;
    }
    
    .uv-record-text,
    .uv-stop-text {
        font-size: 12px;
        line-height: 1;
    }
}

/* ==========================================================================
   Mobile Fullscreen Overlay
   ========================================================================== */
.uv-mobile-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 9999; /* Reduced z-index to prevent conflicts */
    display: none;
    overflow: hidden;
    /* Isolate this overlay from affecting other elements */
    contain: layout style;
    isolation: isolate;
}

.uv-mobile-fullscreen-overlay.active {
    display: block;
}

/* Mobile fullscreen header */
.uv-mobile-fullscreen-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    z-index: 10;
}

.uv-mobile-fullscreen-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.uv-mobile-fullscreen-close {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.uv-mobile-fullscreen-close:hover,
.uv-mobile-fullscreen-close:active {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Mobile fullscreen content area */
.uv-mobile-fullscreen-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Mobile video preview - full screen */
.uv-mobile-fullscreen-content .uv-video-preview {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    object-fit: cover;
    background: #000;
}

/* Mobile instruction text positioning */
.uv-mobile-fullscreen-content .uv-instruction-text {
    position: absolute;
    top: 80px;
    left: 20px;
    right: 20px;
    transform: none;
    max-width: none;
    z-index: 20;
}

.uv-mobile-fullscreen-content .uv-text-bubble {
    background: rgba(0,0,0,0.7);
    border: 2px solid rgba(59, 130, 246, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
}

.uv-mobile-fullscreen-content .uv-instruction-content {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* Mobile face guide positioning */
.uv-mobile-fullscreen-content .uv-face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
}

.uv-mobile-fullscreen-content .uv-face-circle {
    width: 300px;
    height: 350px;
}

.uv-mobile-fullscreen-content .uv-face-outline {
    border-color: rgba(59, 130, 246, 0.9);
    border-width: 4px;
}

.uv-mobile-fullscreen-content .uv-face-instruction {
    background: rgba(0,0,0,0.8);
    color: white;
    border: 2px solid rgba(59, 130, 246, 0.8);
    backdrop-filter: blur(10px);
}

/* Mobile recording controls positioning */
.uv-mobile-fullscreen-content .uv-recording-controls {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.444);
    padding: 20px 30px;
    border-radius: 50px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255,255,255,0.2);
    z-index: 25;
    display: -webkit-inline-box;
}

/* Mobile timer styling */
.uv-mobile-fullscreen-content .uv-timer-text {
    color: rgb(188, 0, 0);
    font-weight: 700;
}

.uv-mobile-fullscreen-content .uv-timer-progress {
    color: #3b82f6;
}

/* Mobile record buttons */
.uv-mobile-fullscreen-content .uv-record-btn,
.uv-mobile-fullscreen-content .uv-stop-btn {
    background: #fffdfd;
    border: 3px solid rgba(255,255,255,0.3);
    padding: 15px 25px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    white-space: nowrap;
}

/* Ensure mobile icons are also properly aligned */
.uv-mobile-fullscreen-content .uv-record-dot,
.uv-mobile-fullscreen-content .uv-stop-square {
    flex-shrink: 0;
    margin: 0;
}

/* Mobile button text alignment */
.uv-mobile-fullscreen-content .uv-record-text,
.uv-mobile-fullscreen-content .uv-stop-text {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1;
    color: #000;
}

.uv-mobile-fullscreen-content .uv-record-btn:hover,
.uv-mobile-fullscreen-content .uv-record-btn:active,
.uv-mobile-fullscreen-content .uv-stop-btn:hover,
.uv-mobile-fullscreen-content .uv-stop-btn:active {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.6);
}

/* Mobile review state in fullscreen */
.uv-mobile-fullscreen-content .uv-review-container {
    position: absolute;
    top: 60px;
    bottom: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.9);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.1);
    z-index: 10;
}

.uv-mobile-fullscreen-content .uv-review-title {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.uv-mobile-fullscreen-content .uv-playback-container {
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.uv-mobile-fullscreen-content .uv-video-playback {
    width: 100%;
    max-height: 50vh;
    border-radius: 12px;
}

.uv-mobile-fullscreen-content .uv-review-actions {
    margin-top: 20px;
    gap: 15px;
    flex-direction: row;
    justify-content: center;
}

.uv-mobile-fullscreen-content .uv-review-actions .uv-btn {
    flex: 1;
    max-width: max-content;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.uv-mobile-fullscreen-content .uv-btn-secondary {
    background: rgba(107, 114, 128, 0.8);
    color: white;
}

.uv-mobile-fullscreen-content .uv-btn-primary {
    background: rgba(59, 130, 246, 0.8);
    color: white;
}

/* Fade in/out animations for mobile fullscreen */
.uv-mobile-fullscreen-overlay {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.uv-mobile-fullscreen-overlay.active {
    opacity: 1;
}

.uv-mobile-fullscreen-content {
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
}

.uv-mobile-fullscreen-overlay.active .uv-mobile-fullscreen-content {
    transform: scale(1);
}

/* ==========================================================================
   Mobile Landscape Optimizations
   ========================================================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .uv-mobile-fullscreen-content .uv-instruction-text {
        top: 20px;
        left: 60px;
        right: 60px;
    }
    
    .uv-mobile-fullscreen-content .uv-text-bubble {
        padding: 8px 16px;
    }
    
    .uv-mobile-fullscreen-content .uv-instruction-content {
        font-size: 12px;
    }
    
    .uv-mobile-fullscreen-content .uv-face-circle {
        width: 160px;
        height: 200px;
    }
    
    .uv-mobile-fullscreen-content .uv-recording-controls {
        bottom: 20px;
        padding: 12px 20px;
    }
    
    .uv-mobile-fullscreen-content .uv-record-btn,
    .uv-mobile-fullscreen-content .uv-stop-btn {
        padding: 10px 18px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    
    /* Landscape mobile fullscreen button icons */
    .uv-mobile-fullscreen-content .uv-record-dot,
    .uv-mobile-fullscreen-content .uv-stop-square {
        width: 10px;
        height: 10px;
    }
}

/* ==========================================================================
   Hide mobile fullscreen on desktop
   ========================================================================== */
@media (min-width: 769px) {
    .uv-mobile-fullscreen-overlay {
        display: none !important;
    }
}

/* ==========================================================================
   Body scroll prevention during mobile recording
   ========================================================================== */
body.uv-mobile-recording-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure mobile overlay is above everything */
.uv-mobile-fullscreen-overlay {
    position: fixed !important;
    z-index: 2147483647 !important; /* Maximum z-index value */
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.uv-btn:focus,
.uv-start-recording:focus,
.uv-record-btn:focus,
.uv-stop-btn:focus,
.uv-retake-btn:focus,
.uv-confirm-btn:focus,
.uv-retry-btn:focus {
    outline: 2px solid var(--uv-video-primary);
    outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
    :root {
        --uv-video-primary: #0000ee;
        --uv-video-secondary: #000000;
        --uv-video-success: #006600;
        --uv-video-error: #cc0000;
        --uv-video-border: #000000;
        --uv-video-text: #000000;
    }
    
    .uv-video-verification-wrapper {
        border-width: 3px;
    }
    
    .uv-btn {
        border: 2px solid currentColor;
    }
}