/* Checador - Custom Styles */

/* ===== Animações ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes progress-stripe {
    0% { background-position: 1rem 0; }
    100% { background-position: 0 0; }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out both;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out both;
}

.animate-pulse-ring {
    animation: pulse-ring 2s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

/* ===== Gradientes ===== */
.bg-gradient-ck {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

.bg-gradient-ck-dark {
    background: linear-gradient(135deg, #0c1929 0%, #1e3a5f 100%);
}

.text-gradient-ck {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Upload Area ===== */
.upload-area {
    border: 2px dashed #cbd5e1;
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #0ea5e9;
    background-color: rgba(14, 165, 233, 0.04);
}

.upload-area.dragover {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* ===== Progress Bar Animated ===== */
.progress-striped {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-stripe 0.5s linear infinite;
}

/* ===== Cards ===== */
.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* ===== Filtro Panel ===== */
.filter-group {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}

.filter-group.collapsed {
    max-height: 0;
    opacity: 0;
}

/* ===== Tooltip ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 4px 10px;
    border-radius: 6px;
    background: #1e293b;
    color: #fff;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 50;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ===== Custom Scrollbar ===== */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Notification Toast ===== */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 24rem;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

/* ===== Donut Chart ring ===== */
.donut-ring {
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dasharray 1s ease;
}

/* ===== Button glow ===== */
.btn-glow {
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
    transition: all 0.2s;
}

.btn-glow:hover {
    box-shadow: 0 6px 25px rgba(14, 165, 233, 0.5);
    transform: translateY(-1px);
}

/* ===== Mobile fixes ===== */
@media (max-width: 640px) {
    .upload-area {
        padding: 1.5rem !important;
    }

    /* Typography: bump small text for mobile readability */
    main p.text-xs,
    main .text-xs:not(i):not(.bi) {
        font-size: 0.8125rem; /* 13px instead of 12px */
        line-height: 1.5;
    }

    main p.text-sm,
    main .text-sm:not(i):not(.bi):not(button):not(a):not(span) {
        font-size: 0.9375rem; /* 15px instead of 14px */
        line-height: 1.6;
    }

    /* Filter cards: ensure descriptions are readable */
    .bg-slate-50 p.text-xs {
        font-size: 0.875rem; /* 14px */
        line-height: 1.55;
    }

    /* FAQ: answers need to be comfortable to read */
    details p {
        font-size: 0.9375rem !important; /* 15px */
        line-height: 1.65;
    }

    /* FAQ summary: slightly bigger on mobile */
    details summary {
        font-size: 0.9375rem; /* 15px */
    }

    /* Info/economy cards: body text */
    .bg-gradient-to-br p {
        font-size: 0.9375rem; /* 15px */
        line-height: 1.6;
    }

    /* Feature cards */
    .group p.text-base {
        font-size: 1rem;
    }

    /* Hero subtitle */
    .text-gradient + p,
    h1 + p {
        font-size: 1rem; /* 16px */
    }

    /* General card padding increase for mobile */
    .rounded-2xl.shadow-md > .p-6 {
        padding: 1rem;
    }
}

/* ===== Selection highlight ===== */
::selection {
    background-color: rgba(14, 165, 233, 0.2);
    color: inherit;
}

/* ===== Print styles ===== */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    body {
        background: white !important;
    }
}
