/**
 * Afriyah AR Unified Try-On Styles
 *
 * @package Afriyah_AR
 * @version 4.0.4
 */

/* Modal Overlay */
.afriyah-ar-modal-overlay {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Upload Zone */
.afriyah-ar-upload-zone {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.afriyah-ar-upload-zone:hover {
    border-color: #047857 !important;
    background: #f0fdf4 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.12);
}
.afriyah-ar-upload-zone.dragover {
    border-color: #047857 !important;
    background: #dcfce7 !important;
}

/* Size Buttons */
.afriyah-ar-size-btn:hover {
    border-color: #047857 !important;
    background: #f0fdf4 !important;
    color: #047857 !important;
    transform: translateY(-1px);
}

/* Preference Buttons */
.afriyah-ar-pref-btn:hover {
    border-color: #94a3b8 !important;
    transform: translateY(-1px);
}
.afriyah-ar-pref-btn.active {
    border-color: #047857 !important;
    background: #f0fdf4 !important;
    color: #047857 !important;
}

/* Run Button */
#afriyah-ar-run-tryon:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(4, 120, 87, 0.3) !important;
}

/* Result Image */
#afriyah-ar-result-img {
    transition: all 0.5s ease;
    border-radius: 16px;
}

/* RAG Badge Animations */
#afriyah-ar-rag-badge {
    animation: afriyah-ar-badge-pulse 2s ease-in-out infinite;
}
@keyframes afriyah-ar-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

/* Fit Card */
#afriyah-ar-fit-card {
    transition: all 0.3s ease;
}
#afriyah-ar-fit-card:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Trigger Button */
.afriyah-unified-tryon-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 28px rgba(4, 120, 87, 0.3) !important;
}
.afriyah-unified-tryon-btn:active {
    transform: translateY(0) !important;
}

/* Model picker thumbnails */
.afriyah-ar-model-btn {
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.afriyah-ar-model-btn:hover {
    transform: translateY(-1px);
    border-color: #047857 !important;
}
.afriyah-ar-model-btn img {
    display: block;
}

/* Mini Preview */
#afriyah-ar-preview-mini {
    transition: all 0.3s ease;
}
#afriyah-ar-preview-mini img {
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .afriyah-ar-modal-content {
        border-radius: 16px !important;
        max-height: 95vh !important;
    }

    .afriyah-ar-modal-content > div:nth-child(2) {
        grid-template-columns: 1fr !important;
        overflow-y: auto !important;
    }

    .afriyah-ar-modal-content > div:nth-child(2) > div:first-child {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .afriyah-ar-modal-content > div:nth-child(2) > div:last-child {
        min-height: 300px;
    }

    .afriyah-ar-size-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .afriyah-ar-modal-content {
        padding: 0 !important;
    }

    .afriyah-ar-size-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Loading Spinner */
@keyframes afriyah-ar-spin {
    to { transform: rotate(360deg); }
}

/* Notification Animations */
@keyframes afriyah-ar-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Print styles: hide try-on */
@media print {
    .afriyah-unified-tryon-wrap,
    .afriyah-ar-modal-overlay {
        display: none !important;
    }
}

/* Process stages */
.afriyah-ar-process-steps {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.afriyah-ar-process-steps span {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 5px 10px;
    border-radius: 100px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}
.afriyah-ar-process-steps span.is-active {
    color: #ecfdf5;
    border-color: #047857;
    background: rgba(4, 120, 87, 0.35);
}
.afriyah-ar-process-steps span.is-done {
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, 0.45);
}

/* Result CTAs */
.afriyah-ar-result-actions {
    display: none;
    flex-wrap: wrap;
}
.afriyah-ar-action-btn {
    flex: 1 1 140px;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
}
.afriyah-ar-action-primary {
    background: linear-gradient(135deg, #047857, #065f46);
    color: #fff;
}
.afriyah-ar-action-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Take photo (camera only on explicit click) */
.afriyah-ar-take-photo-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
}
.afriyah-ar-take-photo-btn:hover {
    border-color: #047857;
    color: #047857;
}
.afriyah-ar-camera-wrap {
    margin-top: 12px;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
}
.afriyah-ar-camera-wrap video {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    background: #000;
}
.afriyah-ar-camera-actions {
    display: flex;
    gap: 8px;
    padding: 10px;
}
.afriyah-ar-ba-toggle {
    display: none;
}
