/* Стилі, потрібні ДО завантаження JS (лоадер і блок помилки авторизації).
   Підключається з index.html, щоб не було спалаху нестилізованого контенту. */

/* ── Спіннер (до монтування Vue) ─────────────────────────── */
.loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    z-index: 3;
}
.loader--fullscreen { position: fixed; }
.loader__spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: #2563eb;
    border-radius: 50%;
    width: 40px; height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader__text {
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}
.loader__dot { animation: blink 1.4s infinite both; }
.loader__dot:nth-child(2) { animation-delay: .2s; }
.loader__dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
    0%, 80%, 100% { opacity: 1; transform: translateY(0); }
    40%  { opacity: .5; transform: translateY(-4px); }
}

/* ── Лоадер — тёмна тема ────────────────────────────────── */
.dark .loader {
    background: rgba(3, 7, 18, 0.9);
}
.dark .loader__spinner {
    border-color: rgba(255, 255, 255, 0.08);
    border-left-color: #60a5fa;
}
.dark .loader__text {
    color: #d1d5db;
}

/* ── Auth error ──────────────────────────────────────────── */
.auth-error {
    display: none;
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
    z-index: 1000;
    max-width: 400px; width: 90%;
}
.auth-error h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: #111827; }
.auth-error p  { color: #6b7280; margin-bottom: 20px; }
.auth-error .btn {
    display: inline-block; padding: 10px 24px;
    background: #2563eb; color: #fff;
    border-radius: 8px; text-decoration: none; font-weight: 600;
}
.auth-error .btn:hover { background: #1d4ed8; }
