@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ===== Design Tokens ===== */
:root {
    /* Brand colors — Notova (Ink + Spark) */
    --ub-primary: #16233D;
    --ub-primary-dark: #0C1424;
    --ub-primary-light: #F0A500;
    --ub-primary-gradient: linear-gradient(150deg, #213354 0%, #16233D 60%, #0C1424 100%);
    --ub-secondary: #243653;
    --ub-accent: #F0A500;

    /* Semantic colors */
    --ub-success: #26b050;
    --ub-danger: #ef4444;
    --ub-danger-light: #fef2f2;
    --ub-warning: #f59e0b;
    --ub-warning-light: #fef3c7;
    --ub-link: #0071c1;

    /* Grays */
    --ub-gray-50: #F8F5F0;
    --ub-gray-100: #F3F0EA;
    --ub-gray-200: #E7E2D8;
    --ub-gray-300: #d1d5db;
    --ub-gray-400: #9ca3af;
    --ub-gray-500: #6b7280;
    --ub-gray-600: #4b5563;
    --ub-gray-700: #374151;
    --ub-gray-900: #111827;

    /* Backgrounds */
    --ub-bg-page: #FAF8F4; /* Notova warm paper */
    --ub-bg-card: #ffffff;
    --ub-bg-hover: #F3F0EA;

    /* Border radius */
    --ub-radius-sm: 6px;
    --ub-radius-md: 10px;
    --ub-radius-lg: 14px;
    --ub-radius-xl: 16px;
    --ub-radius-full: 9999px;

    /* Shadows */
    --ub-shadow-sm: 0 1px 4px rgba(0,0,0,0.05);
    --ub-shadow-md: 0 2px 12px rgba(0,0,0,0.08);
    --ub-shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --ub-shadow-xl: 0 8px 28px rgba(0,0,0,0.12);

    /* Transitions */
    --ub-transition-fast: 0.15s ease;
    --ub-transition-base: 0.2s ease;
    --ub-transition-slow: 0.3s ease;

    /* Focus */
    --ub-focus-ring: 0 0 0 3px rgba(22,35,61,0.2);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
}


h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--ub-link);
}

.btn-primary {
    color: #fff;
    background-color: var(--ub-secondary);
    border-color: var(--ub-primary-dark);
}

/* Filled-button anchors must keep their text color on hover.
   Without this, Bootstrap's `a:hover { color: ... }` (specificity 0,1,1) wins over
   the custom `.xxx-btn-primary { color: #fff }` (0,1,0) and the white text turns blue. */
a.btn-primary:hover,
a[class*="btn-primary"]:hover,
a[class*="-btn-primary"]:hover,
a[class*="-btn-blue"]:hover,
a[class*="-btn-cta"]:hover,
a[class*="-cta-primary"]:hover,
a[class*="cta-primary"]:hover {
    color: #fff;
}

/* Outline-button anchors must keep their primary-color text on hover.
   Same Bootstrap-specificity issue as filled-buttons: without this rule
   ".wiu-cta-outline:hover" only sets background, color falls back to "a:hover"
   (Bootstrap blue) which is visually wrong. */
a[class*="-cta-outline"]:hover,
a[class*="cta-outline"]:hover,
a[class*="-btn-outline"]:hover,
a[class*="btn-outline"]:hover {
    color: var(--ub-primary, #16233D);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Focus-visible styles (Item 5) */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ub-primary);
    outline-offset: 1px;
    box-shadow: var(--ub-focus-ring);
}

a:focus-visible {
    outline: 2px solid var(--ub-primary);
    outline-offset: 2px;
    border-radius: var(--ub-radius-sm);
}

button:focus-visible {
    outline: 2px solid var(--ub-primary);
    outline-offset: 2px;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--ub-success);
}

.invalid {
    outline: 1px solid var(--ub-danger);
}

.validation-message {
    color: var(--ub-danger);
}

#blazor-error-ui {
    background: var(--ub-warning-light);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Main Layout */
.ub-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--ub-bg-page);
    overflow-x: hidden;
}

.ub-main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}

@media (max-width: 768px) {
    .ub-main {
        padding: 1rem 1rem 2rem;
    }
    .ub-layout {
        padding-bottom: 68px;
    }

    /* Round 113: Mobile-Safety-Nets gegen horizontal-Scroll.
       <table>/<pre>/<img>/<iframe> sind die haeufigsten Uebeltaeter wenn sie
       fix breit sind oder lange URLs/Code enthalten. */
    .ub-main table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ub-main pre,
    .ub-main code {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    .ub-main img,
    .ub-main video,
    .ub-main iframe,
    .ub-main embed {
        max-width: 100%;
        height: auto;
    }
    .ub-main p,
    .ub-main li,
    .ub-main h1,
    .ub-main h2,
    .ub-main h3 {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .ub-main {
        padding: 0.75rem 0.875rem 1.5rem;
    }
}

/* Mobile layout */
@media (max-width: 640px) {
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .auth-container {
        margin: 1rem !important;
        padding: 1.5rem 1.25rem !important;
        border-radius: 12px !important;
    }

    .auth-logo img {
        width: 180px !important;
    }
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0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NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ein Fehler ist aufgetreten."
    }

/* ===== Shared Skeleton Loader (Item 2) ===== */
.ub-skeleton {
    background: var(--ub-gray-100);
    border-radius: var(--ub-radius-sm);
    animation: ub-pulse 1.5s ease-in-out infinite;
}
.ub-skeleton-card {
    background: var(--ub-bg-card);
    border-radius: var(--ub-radius-lg);
    overflow: hidden;
    box-shadow: var(--ub-shadow-sm);
}
.ub-skeleton-img {
    aspect-ratio: 16 / 9;
    background: var(--ub-gray-100);
    animation: ub-pulse 1.5s ease-in-out infinite;
}
.ub-skeleton-line {
    height: 12px;
    background: var(--ub-gray-100);
    border-radius: var(--ub-radius-sm);
    margin-bottom: 0.75rem;
    animation: ub-pulse 1.5s ease-in-out infinite;
}
.ub-skeleton-line--short { width: 60%; }
.ub-skeleton-line--medium { width: 80%; }
.ub-skeleton-circle {
    border-radius: 50%;
    background: var(--ub-gray-100);
    animation: ub-pulse 1.5s ease-in-out infinite;
}
.ub-skeleton-body { padding: 0.875rem; }
@keyframes ub-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== Toast Notification System (Item 6) ===== */
.ub-toast-container {
    position: fixed;
    bottom: 80px;
    right: 1rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.ub-toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--ub-radius-md);
    background: var(--ub-bg-card);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ub-gray-900);
    pointer-events: auto;
    animation: ub-toast-in 0.3s ease-out;
    max-width: 360px;
}
.ub-toast--success { border-left: 4px solid var(--ub-success); }
.ub-toast--error { border-left: 4px solid var(--ub-danger); }
.ub-toast--info { border-left: 4px solid var(--ub-primary); }
.ub-toast--warning { border-left: 4px solid var(--ub-warning); }
.ub-toast i { font-size: 1.1rem; flex-shrink: 0; }
.ub-toast--success i { color: var(--ub-success); }
.ub-toast--error i { color: var(--ub-danger); }
.ub-toast--info i { color: var(--ub-primary); }
.ub-toast--warning i { color: var(--ub-warning); }
.ub-toast-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--ub-gray-400);
    cursor: pointer;
    padding: 0 0.25rem;
    font-size: 1rem;
    line-height: 1;
}
.ub-toast-dismiss:hover { color: var(--ub-gray-700); }
.ub-toast--out { animation: ub-toast-out 0.25s ease-in forwards; }
@keyframes ub-toast-in { from { opacity: 0; transform: translateY(12px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes ub-toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px) scale(0.95); } }

@media (max-width: 768px) {
    .ub-toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 72px;
    }
    .ub-toast { max-width: 100%; }
}

/* ===== Print Styles (Item 11) ===== */
@media print {
    .slm-topbar,
    .slm-mtopbar,
    .bn-bar,
    .ub-toast-container,
    #blazor-error-ui,
    .blazor-error-boundary,
    footer,
    .ub-footer,
    .pf-footer,
    nav,
    .pd-sidebar,
    .pd-share-bar,
    .pd-engagement,
    .pd-comments,
    .pd-related,
    .cookie-banner {
        display: none !important;
    }

    body, .ub-layout {
        background: white !important;
        color: black !important;
    }

    .ub-main {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    a { color: black !important; text-decoration: underline !important; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
    a[href^="/"]::after, a[href^="#"]::after { content: none; }

    img { max-width: 100% !important; }
}

/* =====================================================================
   Round 114 — Vergleichsseiten & FAQ UI-Polish
   Wirkt auf UrlaubBroVs{WordPress,Wix,Jimdo}.razor + FAQ.razor + WasIstUrlaubBro.razor
   (alle haben inline-styles mit selben Klassen; hier wird draufgepatcht).
   ===================================================================== */

/* --- Vergleichsseiten: Table --- */
.vs-table tbody tr { transition: background 0.12s ease; }
.vs-table tbody tr:hover { background: #fafbfc; }

/* UrlaubBro-Spalte (2. Cell pro Row) bekommt subtle Hervorhebung */
.vs-table tbody td:nth-child(2) {
    background: linear-gradient(180deg, rgba(22,35,61,0.025), rgba(22,35,61,0.015));
    border-left: 2px solid rgba(22,35,61,0.12);
}
.vs-table thead th.vs-th-us {
    border-left: 2px solid rgba(22,35,61,0.25);
}

/* vs-good / vs-bad mit Icons statt nur Farbe */
.vs-table td.vs-good { position: relative; padding-left: 1.5rem !important; }
.vs-table td.vs-good::before {
    content: "✓"; position: absolute; left: 0.55rem; top: 50%; transform: translateY(-50%);
    width: 1.05rem; height: 1.05rem; display: inline-flex; align-items: center; justify-content: center;
    background: #16a34a; color: #fff; border-radius: 50%; font-size: 0.72rem; font-weight: 700;
}
.vs-table td.vs-bad { position: relative; padding-left: 1.5rem !important; }
.vs-table td.vs-bad::before {
    content: "✕"; position: absolute; left: 0.55rem; top: 50%; transform: translateY(-50%);
    width: 1.05rem; height: 1.05rem; display: inline-flex; align-items: center; justify-content: center;
    background: #dc2626; color: #fff; border-radius: 50%; font-size: 0.7rem; font-weight: 700;
}

/* Sticky thead damit Headers beim Scrollen sichtbar bleiben (lange Tabellen) */
.vs-table thead th { position: sticky; top: 0; z-index: 2; }

/* --- Vergleichsseiten: TL;DR Cards --- */
.vs-tldr-grid > div {
    background: #fafbfc; border-radius: 12px; padding: 1.1rem 1.25rem;
    border: 1px solid #eef0f3;
}
.vs-tldr-grid > div:first-child {
    border-top: 3px solid #16a34a;
}
.vs-tldr-grid > div:last-child {
    border-top: 3px solid #ea580c;
}
.vs-tldr-grid h3 {
    font-size: 1.02rem; font-weight: 700; margin: 0 0 0.65rem; color: #111827;
    display: flex; align-items: center; gap: 0.4rem;
}

/* --- Details-Accordion (FAQ auf vs-Seiten + WasIstUrlaubBro) --- */
details.vs-faq, details.wiu-faq {
    list-style: none;
    transition: background 0.15s, box-shadow 0.15s;
}
details.vs-faq summary, details.wiu-faq summary {
    list-style: none;
    display: flex; justify-content: space-between; align-items: center;
    padding-right: 0.5rem;
}
details.vs-faq summary::-webkit-details-marker,
details.wiu-faq summary::-webkit-details-marker { display: none; }
details.vs-faq summary::after, details.wiu-faq summary::after {
    content: "›"; display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem;
    color: var(--ub-primary, #16233D); font-size: 1.4rem; font-weight: 600;
    transform: rotate(90deg); transition: transform 0.22s ease;
    flex-shrink: 0; margin-left: 0.5rem;
}
details.vs-faq[open] summary::after, details.wiu-faq[open] summary::after {
    transform: rotate(-90deg);
}

/* --- FAQ.razor (Platform) Custom Accordion Polish --- */
.faq-page .faq-item {
    border: 1px solid #E7E2D8 !important;
    border-radius: 14px !important;
}
.faq-page .faq-item.active {
    border-color: var(--ub-primary, #16233D) !important;
    background: linear-gradient(180deg, #ffffff, rgba(22,35,61,0.025)) !important;
}
.faq-page .faq-question {
    gap: 0.75rem;
}
.faq-page .faq-icon {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(22,35,61,0.08);
    border-radius: 50%; font-size: 1rem !important;
    transition: background 0.15s, transform 0.2s;
}
.faq-page .faq-item.active .faq-icon {
    background: var(--ub-primary, #16233D); color: #fff !important;
    transform: rotate(180deg);
}
.faq-page .faq-category h2 {
    scroll-margin-top: 80px;  /* für anchor-jumps */
}

/* Quick-Jump-Nav (oben auf der FAQ-Page sichtbar wenn vorhanden) */
.faq-jump-nav {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
    margin: -1rem auto 2.5rem; max-width: 800px;
    padding: 0.75rem; background: #F3F0EA;
    border-radius: 12px; border: 1px solid #E7E2D8;
}
.faq-jump-nav a {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.85rem; font-size: 0.84rem;
    background: #fff; color: var(--ub-primary, #16233D);
    border: 1px solid #E7E2D8; border-radius: 99px;
    text-decoration: none; font-weight: 600;
    transition: all 0.12s;
}
.faq-jump-nav a:hover {
    background: var(--ub-primary, #16233D); color: #fff;
    border-color: var(--ub-primary, #16233D);
    text-decoration: none;
}

/* Hero-Section auf vs-Seiten — etwas mehr Atmung */
.vs-hero {
    background: linear-gradient(180deg, #ffffff, #fafbfc) !important;
}

@media (max-width: 600px) {
    .faq-jump-nav { gap: 0.35rem; padding: 0.5rem; margin: -0.5rem auto 1.75rem; }
    .faq-jump-nav a { padding: 0.3rem 0.6rem; font-size: 0.72rem; gap: 0.25rem; }
    .faq-page { padding: 1.5rem 1rem !important; }
    .faq-container h1 { font-size: 1.5rem !important; }
    .faq-category h2 { font-size: 1.15rem !important; }
    .faq-question { padding: 1rem 1.1rem !important; font-size: 0.95rem !important; }
    .faq-item.active .faq-answer { padding: 0 1.1rem 1rem !important; }
}
