/* ReviewMy.World - Custom Styles */

/* ===== Base Styles ===== */
:root {
    --color-trust-high: #10b981;
    --color-trust-medium: #f59e0b;
    --color-trust-low: #ef4444;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background-color: #0ea5e9;
    color: white;
}

/* ===== Trust Score Badges ===== */
.trust-score {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-weight: 700;
}

.trust-score-high {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.dark .trust-score-high {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: #6ee7b7;
}

.trust-score-medium {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.dark .trust-score-medium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #fcd34d;
}

.trust-score-low {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.dark .trust-score-low {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: #fca5a5;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-pulse-subtle {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Staggered animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===== Progress Bars ===== */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.dark .progress-bar {
    background-color: #334155;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.progress-bar-fill-high {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.progress-bar-fill-medium {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.progress-bar-fill-low {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

/* ===== Cards ===== */
.source-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.source-card:hover {
    transform: translateY(-4px);
}

.criteria-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.criteria-card:hover {
    transform: translateY(-2px);
}

/* ===== Forms ===== */
input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== Score Circle Animation ===== */
.score-circle {
    transform: rotate(-90deg);
    transform-origin: center;
}

.score-circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.dark .score-circle-bg {
    stroke: #334155;
}

.score-circle-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 300px;
}

/* ===== Skip Link ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0ea5e9;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ===== Print Styles ===== */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
    .trust-score-high {
        border: 2px solid #065f46;
    }
    
    .trust-score-medium {
        border: 2px solid #92400e;
    }
    
    .trust-score-low {
        border: 2px solid #991b1b;
    }
}

/* ===== Loading States ===== */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== Tooltip ===== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1e293b;
    color: white;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== Badge Styles ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.dark .badge-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.dark .badge-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.dark .badge-error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* ===== Notification Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: #1e293b;
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.dark .toast {
    background: #f1f5f9;
    color: #1e293b;
}
