/**
 * FaceCheck KYC - Verification Modal Styles
 *
 * @package FixedFloat_Exchanger
 * @since 4.2.145
 */

/* ============================================
   MODAL OVERLAY
   ============================================ */

.ffe-facecheck-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.ffe-facecheck-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MODAL CONTAINER
   ============================================ */

.ffe-facecheck-container {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.ffe-facecheck-header {
    padding: 24px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ffe-facecheck-header h2 {
    margin: 0;
    color: #FFD700;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ffe-facecheck-header h2::before {
    content: "\1F464";
    font-size: 28px;
}

.ffe-facecheck-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.ffe-facecheck-close:hover {
    color: #fff;
}

.ffe-facecheck-body {
    padding: 24px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.ffe-facecheck-progress-container {
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ffe-facecheck-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* ============================================
   STATUS TEXT
   ============================================ */

.ffe-facecheck-status {
    text-align: center;
    padding: 16px;
    background: #222;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #fff;
    font-size: 16px;
    min-height: 24px;
    transition: background 0.3s, color 0.3s;
}

.ffe-facecheck-status.error {
    background: #4a1c1c;
    color: #ff6b6b;
}

.ffe-facecheck-status.success {
    background: #1c4a2c;
    color: #6bff6b;
}

/* ============================================
   DOCUMENT UPLOAD
   ============================================ */

.ffe-facecheck-dropzone {
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    margin-bottom: 20px;
}

.ffe-facecheck-dropzone:hover,
.ffe-facecheck-dropzone.drag-over {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.05);
}

.ffe-facecheck-dropzone-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ffe-facecheck-dropzone-text {
    color: #aaa;
    font-size: 16px;
    margin-bottom: 8px;
}

.ffe-facecheck-dropzone-hint {
    color: #666;
    font-size: 13px;
}

.ffe-facecheck-dropzone input[type="file"] {
    /* Hide file input but keep it accessible */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ensure dropzone is clickable and focusable */
.ffe-facecheck-dropzone {
    position: relative;
    -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* Focus state for keyboard navigation */
.ffe-facecheck-dropzone:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Active state for touch/click feedback */
.ffe-facecheck-dropzone:active {
    transform: scale(0.98);
    background: rgba(255, 215, 0, 0.1);
}

/* Document Preview */
.ffe-facecheck-document-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin: 16px auto;
    display: none;
    border: 2px solid #333;
}

/* ============================================
   CAMERA CONTAINER
   ============================================ */

.ffe-facecheck-camera-container {
    display: none;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ffe-facecheck-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
}

.ffe-facecheck-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror for selfie */
}

.ffe-facecheck-canvas {
    display: none;
}

.ffe-facecheck-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform: scaleX(-1); /* Mirror to match video */
}

/* Face guide oval */
.ffe-facecheck-face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 260px;
    border: 3px dashed rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================
   LIVENESS CHECKLIST
   ============================================ */

.ffe-facecheck-liveness-container {
    margin-bottom: 20px;
}

.ffe-liveness-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ffe-liveness-checklist li {
    background: #222;
    padding: 12px 16px;
    border-radius: 8px;
    color: #888;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s, color 0.3s;
}

.ffe-liveness-checklist li.passed {
    background: #1c3a1c;
    color: #6bff6b;
}

.ffe-liveness-checklist li.pending {
    background: #222;
    color: #888;
}

.ffe-liveness-checklist li.active {
    background: #3a3a1c;
    color: #FFD700;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   BUTTONS
   ============================================ */

.ffe-facecheck-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.ffe-facecheck-btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.ffe-facecheck-btn-primary {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.ffe-facecheck-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.ffe-facecheck-btn-primary:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ffe-facecheck-btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #444;
}

.ffe-facecheck-btn-secondary:hover {
    border-color: #FFD700;
    color: #FFD700;
}

/* ============================================
   RESULT DISPLAY
   ============================================ */

.ffe-facecheck-result-container {
    display: none;
}

.ffe-facecheck-result {
    text-align: center;
    padding: 40px 20px;
}

.ffe-facecheck-result .icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.ffe-facecheck-result h3 {
    font-size: 24px;
    margin: 0 0 12px;
}

.ffe-facecheck-result p {
    color: #aaa;
    margin: 0 0 8px;
}

.ffe-facecheck-result .score {
    font-size: 18px;
    color: #FFD700;
    font-weight: 600;
    margin-top: 16px;
}

.ffe-facecheck-result.success {
    color: #6bff6b;
}

.ffe-facecheck-result.success .icon {
    color: #6bff6b;
}

.ffe-facecheck-result.review {
    color: #FFD700;
}

.ffe-facecheck-result.review .icon {
    color: #FFD700;
}

.ffe-facecheck-result.failed {
    color: #ff6b6b;
}

.ffe-facecheck-result.failed .icon {
    color: #ff6b6b;
}

/* ============================================
   FOOTER
   ============================================ */

.ffe-facecheck-footer {
    padding: 16px 24px;
    border-top: 1px solid #333;
    text-align: center;
}

.ffe-facecheck-footer p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

.ffe-facecheck-footer a {
    color: #FFD700;
    text-decoration: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .ffe-facecheck-modal {
        padding: 10px;
    }

    .ffe-facecheck-container {
        max-height: none;
        border-radius: 12px;
    }

    .ffe-facecheck-header {
        padding: 16px;
    }

    .ffe-facecheck-header h2 {
        font-size: 18px;
    }

    .ffe-facecheck-body {
        padding: 16px;
    }

    .ffe-liveness-checklist {
        grid-template-columns: 1fr;
    }

    .ffe-facecheck-buttons {
        flex-direction: column;
    }

    .ffe-facecheck-btn {
        width: 100%;
    }

    .ffe-facecheck-face-guide {
        width: 150px;
        height: 200px;
    }
}

/* ============================================
   ADMIN SETTINGS STYLES
   ============================================ */

.ffe-facecheck-admin-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.ffe-facecheck-admin-card h3 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #FFD700;
    color: #333;
}

.ffe-facecheck-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ffe-facecheck-stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.ffe-facecheck-stat-box.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.ffe-facecheck-stat-box.warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ffe-facecheck-stat-box.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ffe-facecheck-stat-number {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ffe-facecheck-stat-label {
    font-size: 13px;
    opacity: 0.9;
}

/* Range slider styling */
.ffe-facecheck-slider {
    -webkit-appearance: none;
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
}

.ffe-facecheck-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
}

.ffe-facecheck-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.ffe-facecheck-slider-value {
    display: inline-block;
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: #333;
    margin-left: 12px;
}

/* Toggle switch */
.ffe-facecheck-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.ffe-facecheck-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ffe-facecheck-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 32px;
}

.ffe-facecheck-toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.ffe-facecheck-toggle input:checked + .ffe-facecheck-toggle-slider {
    background-color: #FFD700;
}

.ffe-facecheck-toggle input:checked + .ffe-facecheck-toggle-slider:before {
    transform: translateX(28px);
}

/* Connection status indicator */
.ffe-facecheck-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.ffe-facecheck-status-indicator.ready {
    background: #d4edda;
    color: #155724;
}

.ffe-facecheck-status-indicator.not-ready {
    background: #f8d7da;
    color: #721c24;
}

.ffe-facecheck-status-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.ffe-facecheck-status-indicator.ready .dot {
    background: #28a745;
}

.ffe-facecheck-status-indicator.not-ready .dot {
    background: #dc3545;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
