/*
 * Centrum bezpečné jízdy LIBROS – Odečet bodů
 * Společný Light / Dark motiv pro aktuální Tailwindový web.
 */

html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

html,
body {
    transition:
        background-color .18s ease,
        color .18s ease;
}


/* ============================================================
   ZÁKLAD STRÁNKY
   ============================================================ */

html.dark body,
html.dark body.bg-neutral,
html.dark .page-wrapper {
    background-color: #020617 !important;
    color: #e2e8f0 !important;
}


/* ============================================================
   KARTY A PLOCHY
   ============================================================ */

html.dark .bg-white {
    background-color: #0f172a !important;
}

html.dark .bg-neutral,
html.dark .bg-gray-50,
html.dark .bg-gray-100 {
    background-color: #111827 !important;
}

html.dark .bg-gray-200 {
    background-color: #1e293b !important;
}


/* ============================================================
   TEXTY
   ============================================================ */

html.dark .text-gray-900,
html.dark .text-gray-800 {
    color: #f8fafc !important;
}

html.dark .text-gray-700 {
    color: #e2e8f0 !important;
}

html.dark .text-gray-600 {
    color: #cbd5e1 !important;
}

html.dark .text-gray-500 {
    color: #94a3b8 !important;
}

html.dark .text-gray-400 {
    color: #94a3b8 !important;
}

html.dark .text-primary {
    color: #93c5fd !important;
}


/* ============================================================
   OHRANIČENÍ / TABULKY
   ============================================================ */

html.dark .border,
html.dark .border-t,
html.dark .border-b,
html.dark .border-l,
html.dark .border-r,
html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-300 {
    border-color: #334155 !important;
}

html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-300 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}

html.dark table {
    color: #e2e8f0 !important;
}

html.dark table th.bg-gray-100,
html.dark table th.bg-gray-200 {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

html.dark table td,
html.dark table th {
    border-color: #334155 !important;
}


/* ============================================================
   MENU
   ============================================================ */

html.dark header.bg-white,
html.dark #mobileMenu.bg-white {
    background-color: #0f172a !important;
}

html.dark #mobileMenu {
    border-color: #334155 !important;
}


/* ============================================================
   HOVER STAVY
   ============================================================ */

html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover,
html.dark .hover\:bg-gray-200:hover {
    background-color: #1e293b !important;
}


/* ============================================================
   FORMULÁŘE
   ============================================================ */

html.dark input,
html.dark textarea,
html.dark select {
    background-color: #111827 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}


/* ============================================================
   STÍNY
   ============================================================ */

html.dark .shadow,
html.dark .shadow-sm,
html.dark .shadow-md,
html.dark .shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28) !important;
}


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

html.dark footer.bg-white {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}


/* ============================================================
   REZERVAČNÍ IFRAME
   Parent stránka se přepíná nezávisle na rs.libros.cz.
   ============================================================ */

html.dark iframe {
    background-color: #020617;
}


/* ============================================================
   PŘEPÍNAČ MOTIVU
   ============================================================ */

#libros-theme-switcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 44px;
    padding: 10px 14px;

    border: 1px solid #cbd5e1;
    border-radius: 999px;

    background: rgba(255, 255, 255, .96);
    color: #334155;

    box-shadow: 0 10px 30px rgba(15, 23, 42, .16);

    font-family: Inter, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        background-color .18s ease,
        color .18s ease,
        border-color .18s ease,
        transform .15s ease;
}

#libros-theme-switcher:hover {
    transform: translateY(-1px);
}

html.dark #libros-theme-switcher {
    background: rgba(15, 23, 42, .96);
    color: #e2e8f0;
    border-color: #475569;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .36);
}

#libros-theme-switcher .theme-icon {
    font-size: 16px;
    line-height: 1;
}


/* ============================================================
   MOBIL
   ============================================================ */

@media (max-width: 640px) {

    #libros-theme-switcher {
        right: 12px;
        bottom: 12px;

        min-height: 42px;
        padding: 9px 12px;
    }

    #libros-theme-switcher .theme-label {
        display: none;
    }
}
