/* ============================================================
   Design Tokens + Bootstrap Variable Overrides
   Voyamemo — "tasteful polish" refresh
   Brand blue kept; warmer neutrals + amber accent; Fraunces/Inter type.
   ============================================================ */
:root {
    --color-primary:      #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-soft: #eef4ff;
    --color-secondary:    #e0803a;  /* warm terracotta accent (travel warmth) */
    --color-secondary-soft:#fbf1e8;

    /* Warmer "paper" neutrals (was cold blue-gray) */
    --color-background:   #f7f5f1;
    --color-surface:      #ffffff;
    --color-surface-2:    #fbfaf7;
    --color-text:         #1f2430;
    --color-muted:        #6b7280;
    --color-border:       #e9e5dd;
    --color-border-strong:#ddd7cc;
    --color-success:      #16a34a;
    --color-danger:       #dc2626;

    /* Fonts */
    --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

    /* Radii */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;

    /* Softer, layered shadows */
    --card-shadow:       0 1px 2px rgba(30,30,40,.05), 0 1px 3px rgba(30,30,40,.05);
    --card-shadow-hover: 0 18px 40px rgba(30,30,40,.13), 0 6px 14px rgba(30,30,40,.08);
    --card-transition:   transform .2s ease, box-shadow .2s ease;

    /* Bootstrap overrides */
    --bs-primary:          #2563eb;
    --bs-primary-rgb:      37, 99, 235;
    --bs-link-color:       #2563eb;
    --bs-link-hover-color: #1d4ed8;
    --bs-body-color:       #1f2430;
    --bs-body-bg:          #f7f5f1;
    --bs-border-color:     #e9e5dd;
    --bs-card-bg:          #ffffff;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-font-size:   1rem;
    --bs-body-line-height: 1.65;
    --bs-border-radius:      0.625rem;
    --bs-border-radius-sm:   0.5rem;
    --bs-border-radius-lg:   1rem;
}

/* ============================================================
   Base / Typography
   ============================================================ */
body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Display serif for hero + section headings; card titles stay sans (below). */
h1, h2,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
    font-weight: 600;
}

h3, h4, h5, h6 {
    letter-spacing: -0.01em;
}

/* Keep compact UI headings in the sans UI face for legibility */
.card-title,
.day-header-badge,
h5.card-title, h6.card-title,
.navbar-brand {
    font-family: var(--font-body) !important;
    letter-spacing: -0.01em;
}

/* Optional helpers you can drop onto markup later */
.font-display { font-family: var(--font-display) !important; }
.eyebrow {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    margin-bottom: .55rem;
}

/* Fluid type scale for headings on small screens */
@media (max-width: 575.98px) {
    h1, .display-5 { font-size: clamp(1.75rem, 6.5vw, 2.4rem); }
    h2             { font-size: clamp(1.4rem, 5vw, 1.85rem); }
}

/* Readable prose lines */
.prose {
    max-width: 68ch;
    line-height: 1.75;
}

/* ============================================================
   Layout
   ============================================================ */
.main-content {
    padding-top: 68px; /* height of fixed navbar */
    min-height: calc(100vh - 68px - 100px);
}

@media (max-width: 767.98px) {
    .main-content { padding-top: 60px; }
}

/* ============================================================
   Buttons — pill shape, subtle depth
   ============================================================ */
.btn {
    --bs-btn-border-radius: 999px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .005em;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-lg { padding: .75rem 1.9rem; font-size: 1.02rem; }
.btn-sm { padding: .42rem 1rem; }

.btn-primary {
    --bs-btn-bg: #2563eb;
    --bs-btn-border-color: #2563eb;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-active-bg: #1d4ed8;
    background-image: linear-gradient(180deg, #3b74f4, #2563eb);
    box-shadow: 0 4px 12px rgba(37,99,235,.28);
}
.btn-primary:hover {
    background-image: linear-gradient(180deg, #2f68ee, #1d4ed8);
    box-shadow: 0 8px 20px rgba(37,99,235,.36);
}

.btn-light {
    --bs-btn-bg: #ffffff;
    --bs-btn-border-color: #ffffff;
    box-shadow: var(--card-shadow);
}
.btn-light:hover { box-shadow: var(--card-shadow-hover); }

.btn-outline-primary {
    --bs-btn-color: #1d4ed8;
    --bs-btn-border-color: var(--color-border-strong);
    --bs-btn-hover-bg: #2563eb;
    --bs-btn-hover-border-color: #2563eb;
    --bs-btn-hover-color: #fff;
}
.btn-outline-secondary {
    --bs-btn-color: #4b5563;
    --bs-btn-border-color: var(--color-border-strong);
    --bs-btn-hover-bg: #f4f2ec;
    --bs-btn-hover-border-color: var(--color-border-strong);
    --bs-btn-hover-color: #1f2430;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #1e40af 100%);
    color: #fff;
    padding: 4.5rem 0;
    min-height: 340px;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .hero { padding: 6.5rem 0; min-height: 440px; }
}

.hero h1, .hero .display-5 {
    text-shadow: 0 2px 18px rgba(0,0,0,.30);
    font-weight: 600;
}

.hero .lead {
    text-shadow: 0 1px 6px rgba(0,0,0,.22);
    opacity: .95;
    font-size: 1.18rem;
}

.hero-with-cover {
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Warmer, directional scrim (adds an amber kiss on the right) */
.hero-with-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        rgba(16,26,54,.72) 0%,
        rgba(20,40,90,.46) 55%,
        rgba(224,128,58,.20) 100%);
}

.hero-with-cover > .container {
    position: relative;
}

/* ============================================================
   Navbar
   ============================================================ */
.site-navbar {
    transition: box-shadow .2s;
    background-color: rgba(255,255,255,.9) !important;
    backdrop-filter: saturate(1.4) blur(8px);
}

.site-navbar.scrolled {
    box-shadow: 0 2px 14px rgba(30,30,40,.10);
}

.navbar-brand { font-weight: 800; }

/* Active nav link indicator */
.navbar .nav-link.active {
    color: var(--color-primary) !important;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .navbar .nav-link.active::after {
        content: '';
        display: block;
        height: 2px;
        background: var(--color-primary);
        border-radius: 1px;
        margin-top: 2px;
    }
}

/* ============================================================
   Cards — hover lift, warmer surface
   ============================================================ */
.card {
    --bs-card-border-color: var(--color-border);
    --bs-card-border-radius: var(--radius-md);
}

.card-lift {
    box-shadow: var(--card-shadow);
    transition: var(--card-transition);
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

/* Zoom cover imagery gently on hover */
.card-lift .card-img-top,
.card-lift .trip-cover-img,
.card-lift .entry-thumbnail {
    transition: transform .35s ease;
}
.card-lift:hover .card-img-top,
.card-lift:hover .trip-cover-img,
.card-lift:hover .entry-thumbnail {
    transform: scale(1.045);
}

.card-title {
    font-weight: 700;
}

/* Soften Bootstrap badges a touch */
.badge { font-weight: 600; letter-spacing: .01em; padding: .4em .7em; }
.badge.text-bg-warning { color: #7a4a12 !important; background-color: #fbe4cf !important; }

/* ============================================================
   Admin — sidebar & stat cards
   ============================================================ */
/* Shared by AdminLayout and HelpdeskLayout. Global rather than a scoped .razor.css,
   because CSS isolation would tie the collapsible behaviour to whichever single layout
   owned the file — and both shells use it. */
.admin-sidebar {
    background: #161c26 !important;
    width: 240px;
    min-width: 240px;
    padding: 1rem;
    transition: width 0.22s ease, min-width 0.22s ease;
    overflow: hidden;
}

.admin-sidebar.collapsed {
    width: 62px;
    min-width: 62px;
}

/* Sidebar header: brand left, toggle right when expanded; toggle centred when collapsed */
.admin-sidebar .sidebar-header {
    justify-content: space-between;
}

.admin-sidebar.collapsed .sidebar-header {
    justify-content: center;
}

/* Keep all text on a single line so overflow:hidden clips cleanly during the transition */
.admin-sidebar .nav-link,
.admin-sidebar .sidebar-header a {
    white-space: nowrap;
}

/* Hide text labels in collapsed state */
.admin-sidebar.collapsed .nav-label {
    display: none;
}

/* Centre nav-link icons when collapsed */
.admin-sidebar.collapsed .nav-link {
    display: flex;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* Sign-out button: also centre icon when collapsed */
.admin-sidebar.collapsed .btn .nav-label {
    display: none;
}
.admin-sidebar .nav-pills {
    --bs-nav-pills-border-radius: 10px;
}
.admin-sidebar .nav-link {
    border-radius: 10px;
    padding: .55rem .75rem;
    font-weight: 500;
    color: #c4cbd6 !important;
    transition: background-color .15s, color .15s;
}
.admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,.06);
    color: #fff !important;
}
.admin-sidebar .nav-link.active {
    background: var(--color-primary);
    color: #fff !important;
}
.admin-sidebar .sidebar-header .fs-5 { letter-spacing: -.01em; }

/* Admin dashboard stat cards: gradient depth on the coloured tiles */
.card.text-bg-primary   { background-image: linear-gradient(135deg,#3b74f4,#2563eb) !important; border: 0; border-radius: var(--radius-md); box-shadow: var(--card-shadow); }
.card.text-bg-success   { background-image: linear-gradient(135deg,#22b07d,#16a34a) !important; border: 0; border-radius: var(--radius-md); box-shadow: var(--card-shadow); }
.card.text-bg-info      { background-image: linear-gradient(135deg,#e88f4d,#e0803a) !important; border: 0; border-radius: var(--radius-md); box-shadow: var(--card-shadow); color:#fff !important; }
.card.text-bg-secondary { background-image: linear-gradient(135deg,#7c8698,#5b6472) !important; border: 0; border-radius: var(--radius-md); box-shadow: var(--card-shadow); }
.card.text-bg-info .text-white-50 { color: rgba(255,255,255,.85) !important; }

/* ============================================================
   Forms — friendlier focus
   ============================================================ */
.form-control, .form-select {
    border-color: var(--color-border-strong);
    border-radius: var(--radius-sm);
    padding: .6rem .8rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.input-group-text {
    background: #f4f2ec;
    border-color: var(--color-border-strong);
    color: var(--color-muted);
}

/* ============================================================
   Subscribe CTA section
   ============================================================ */
.subscribe-cta {
    background: linear-gradient(135deg, #eef4ff 0%, #e5edff 60%, #fbf1e8 100%);
    border-top: 1px solid #dbe6ff;
    border-bottom: 1px solid #dbe6ff;
}

/* ============================================================
   Trip Day Timeline
   ============================================================ */
.trip-timeline {
    position: relative;
    padding-left: 2rem;
}

.trip-timeline::before {
    content: '';
    position: absolute;
    left: 0.55rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-border));
    border-radius: 1px;
}

.trip-timeline-item {
    position: relative;
    margin-bottom: 1rem;
}

.trip-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.56rem;
    top: 1.35rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: 2px solid var(--color-surface);
    box-shadow: 0 0 0 2px var(--color-primary);
    z-index: 1;
    transition: transform .15s ease;
}

.trip-timeline-item:hover::before {
    transform: scale(1.25);
}

.trip-timeline-item.has-updates::before {
    background-color: var(--color-secondary);
    box-shadow: 0 0 0 2px var(--color-secondary);
}

/* ============================================================
   Image Gallery
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

/* An <a> to the full image, so the gallery still works without JS. Stripped of link
   styling — it should read as a tile, not as text. */
.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 0.5rem;
    background: var(--color-border);
    color: inherit;
    text-decoration: none;
}

.gallery-item:focus-visible {
    outline: 2px solid var(--color-primary, #2563eb);
    outline-offset: 2px;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform .25s ease, opacity .15s;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.04);
    opacity: .88;
}

.gallery-caption {
    font-size: .8rem;
    color: var(--color-muted);
    text-align: center;
    margin-top: .3rem;
    line-height: 1.3;
}

/* ============================================================
   Lightbox
   ============================================================ */
/* A native <dialog>. showModal() handles positioning, the top layer, Escape and the focus
   trap, so the old hand-rolled fixed overlay is gone — only the dimming remains, and that
   is what ::backdrop is for. */
dialog.tb-lightbox {
    border: 0;
    padding: 0;
    margin: auto;
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    background: transparent;
    overflow: hidden;
    color: #fff;
}

dialog.tb-lightbox::backdrop {
    background: rgba(0, 0, 0, .92);
}

dialog.tb-lightbox:not([open]) {
    display: none;
}

dialog.tb-lightbox .lightbox-content {
    height: 100%;
    justify-content: center;
    margin: 0 auto;
}

.lightbox-slide {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* [hidden] must win over the flex above, or every slide would show at once. It is also
   what keeps the browser from fetching the images the reader has not opened. */
.lightbox-slide[hidden] {
    display: none;
}

.lightbox-content {
    position: relative;
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.25rem;
    display: block;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    font-size: 1.75rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, .3);
}

.lightbox-prev { left: -3.5rem; }
.lightbox-next { right: -3.5rem; }

@media (max-width: 575.98px) {
    .lightbox-prev { left: .25rem; }
    .lightbox-next { right: .25rem; }
    .lightbox-nav  { background: rgba(0,0,0,.45); }
}

.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: .75;
    transition: opacity .15s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-caption {
    color: rgba(255,255,255,.85);
    font-size: .875rem;
    margin-top: .5rem;
    text-align: center;
}

.lightbox-counter {
    color: rgba(255,255,255,.5);
    font-size: .75rem;
    margin-top: .25rem;
}

/* ============================================================
   Video Gallery
   ============================================================ */
.video-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .video-gallery { grid-template-columns: repeat(2, 1fr); }
}

.video-gallery-item {
    border-radius: 0.5rem;
    overflow: hidden;
    background: #000;
}

.video-gallery-player {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================================
   Entry / Update Cards
   ============================================================ */
.entry-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.trip-cover-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ============================================================
   Journey Entry (day detail) body
   ============================================================ */
.entry-body {
    font-size: 1.08rem;
    line-height: 1.8;
    color: #3a4150;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ============================================================
   Day header badge
   ============================================================ */
.day-header-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(180deg,#3b74f4,#2563eb);
    color: #fff;
    border-radius: 2rem;
    padding: .3rem .9rem;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
}

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
    color: var(--color-muted);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: .7;
    line-height: 1;
}

.empty-state-message {
    font-size: 1.05rem;
    max-width: 36ch;
    margin: 0 auto;
}

/* ============================================================
   Loading spinner
   ============================================================ */
.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem;
    min-height: 240px;
}

/* ============================================================
   Planned itinerary block (day detail)
   ============================================================ */
.itinerary-block {
    background: #f1f5f9;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 .5rem .5rem 0;
    padding: 1rem 1.25rem;
}

/* ============================================================
   Pagination / section spacing helpers
   ============================================================ */
.section-gap { margin-bottom: 3.5rem; }

.pagination {
    --bs-pagination-color: #4b5563;
    --bs-pagination-hover-color: var(--color-primary-dark);
    --bs-pagination-active-bg: var(--color-primary);
    --bs-pagination-active-border-color: var(--color-primary);
    --bs-pagination-border-color: var(--color-border);
    --bs-pagination-border-radius: 999px;
    gap: .25rem;
}
.pagination .page-link { border-radius: 999px !important; }

@media (max-width: 575.98px) {
    .section-gap { margin-bottom: 2.5rem; }
    .py-5 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
}

/* ============================================================
   Leaflet Map
   ============================================================ */
.tb-map {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-md);
    z-index: 0;
    border: 1px solid var(--color-border);
}

@media (max-width: 575.98px) {
    .tb-map { height: 260px; }
}

.tb-map-marker {
    width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.tb-map-marker > span {
    transform: rotate(45deg);
}

/* ============================================================
   Blazor Framework Styles
   ============================================================ */
h1:focus { outline: none; }

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

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

.validation-message {
    color: var(--color-danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-danger);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: center;
    z-index: 1100;
    font-size: 0.9rem;
    display: none;
}

#blazor-error-ui a {
    color: #fff;
    font-weight: 600;
    margin: 0 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 1rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ============================================================
   Share Buttons
   ============================================================ */

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}

.share-buttons-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6b7280);
    /* Centred against the button block rather than sitting on its baseline. */
    align-self: center;
}

.share-buttons-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* Equal row and column gaps, so a wrapped second row lines up with the first. */
    gap: .5rem;
    justify-content: inherit;
}

.btn-share {
    font-size: 0.8125rem;
    border: none;
    color: #fff !important;
    transition: opacity 0.15s ease;
    /* Flex centring instead of the inline baseline: the icon and label are optically
       centred, and every button ends up exactly the same height. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    line-height: 1.25;
    /* One shared width keeps the block even when it wraps in a narrow sidebar. */
    min-width: 7.5rem;
}

.btn-share > i {
    font-size: 1em;
    line-height: 1;
}

.btn-share:hover,
.btn-share:focus {
    opacity: 0.85;
    color: #fff !important;
}

.btn-share-whatsapp  { background-color: #25D366; --bs-btn-hover-bg: #25D366; --bs-btn-hover-border-color: transparent; }
.btn-share-facebook  { background-color: #1877F2; --bs-btn-hover-bg: #1877F2; --bs-btn-hover-border-color: transparent; }
.btn-share-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    --bs-btn-hover-border-color: transparent;
}
.btn-share-instagram:hover,
.btn-share-instagram:focus {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* ============================================================
   Page eyebrow — "whose diary is this"
   (the .eyebrow base lives with the typography helpers at the top)
   ============================================================ */
.eyebrow-sep {
    margin: 0 .45rem;
    opacity: .55;
}

/* The hero sits on a dark scrim, so the terracotta accent is swapped for a legible
   translucent white; the amber tone would disappear against the cover photo. */
.hero-eyebrow {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.88);
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
    margin-bottom: .6rem;
}

/* ============================================================
   Account flows — sign in, sign up, onboarding wizard
   ============================================================ */
.auth-shell {
    /* A hair warmer than the page background, so the cards read as raised. */
    background:
        radial-gradient(1100px 420px at 50% -140px, rgba(37,99,235,.10), transparent 70%),
        var(--color-background);
}

.auth-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
}

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 26px;
}

/* Wizard step rail ------------------------------------------------------- */
.wizard-steps { margin-bottom: 1.75rem; }

.wizard-steps-list {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}

.wizard-step {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    min-width: 0;
}

/* The connector is drawn on each step but the first, so it always spans exactly the
   gap between two markers and never dangles off either end of the rail. */
.wizard-step + .wizard-step::before {
    content: '';
    position: absolute;
    top: 17px;
    right: 50%;
    left: -50%;
    height: 2px;
    background: var(--color-border-strong);
    z-index: 0;
}

.wizard-step-done + .wizard-step::before,
.wizard-step-current::before {
    background: var(--color-primary);
}

.wizard-step-marker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border-strong);
    color: var(--color-muted);
    font-weight: 700;
    font-size: .9rem;
    line-height: 1;
}

.wizard-step-label {
    margin-top: .5rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-muted);
    line-height: 1.3;
}

.wizard-step-current .wizard-step-marker {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}
.wizard-step-current .wizard-step-label { color: var(--color-text); }

.wizard-step-done .wizard-step-marker {
    background: var(--color-primary-soft);
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.wizard-step-done .wizard-step-label { color: var(--color-text); }

@media (max-width: 575.98px) {
    .wizard-step-label { font-size: .7rem; }
    .wizard-step-marker { width: 32px; height: 32px; }
    .wizard-step + .wizard-step::before { top: 15px; }
}

/* ============================================================
   Header — signed-in greeting
   ============================================================ */
.nav-greeting {
    font-size: .875rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    /* Clip a long display name rather than pushing the buttons off the bar. */
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
    .nav-greeting { max-width: none; }
}

/* ============================================================
   Contact page
   ============================================================ */
.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    margin-bottom: 1.5rem;
}

.contact-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 1.15rem;
}

.contact-detail-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.contact-detail-value {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    word-break: break-word;
}

a.contact-detail-value:hover { color: var(--color-primary); }

/* Honeypot: off-canvas rather than display:none, which the better bots skip. */
.contact-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
