:root {
    --bp-primary: #0a4d8c;
    --bp-primary-dark: #083d6f;
    --bp-accent: #1a7fd4;
    --bp-surface: #f4f7fb;
    --bp-border: #d8e2ef;
}

html {
    height: 100%;
}

html,
body {
    min-height: 100%;
}

body.app-body {
    background: var(--bp-surface);
    color: #1f2937;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.app-navbar.navbar {
    background: linear-gradient(135deg, var(--bp-primary) 0%, var(--bp-primary-dark) 100%) !important;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.app-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.app-navbar .app-navbar-logo {
    width: 38px;
    height: 38px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    display: block;
    flex-shrink: 0;
}

.app-navbar .nav-link {
    font-weight: 500;
    padding: 0.45rem 0.85rem !important;
    border-radius: 0.375rem;
    margin: 0 0.1rem;
    transition: background-color 0.15s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    background: rgba(255, 255, 255, 0.12);
}

.app-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.app-navbar .app-navbar-user-toggle {
    padding: 0.25rem !important;
    line-height: 1;
}

.app-navbar .app-navbar-user-toggle::after {
    display: none;
}

.app-navbar .app-navbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.15);
}

.app-navbar .app-navbar-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
}

.app-navbar .app-navbar-user-label {
    font-size: 0.85rem;
    color: #6b7280;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-main {
    flex: 1 0 auto;
    padding: 1.5rem 0 2.5rem;
}

.app-page-header {
    margin-bottom: 1.5rem;
}

.app-page-header h1 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.app-page-header p {
    color: #5b6b7c;
    margin-bottom: 0;
}

.app-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.app-action-card {
    background: #fff;
    border: 1px solid var(--bp-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.app-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 77, 140, 0.12);
    border-color: #b9cfe6;
    color: inherit;
}

.app-action-card .icon-wrap {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 77, 140, 0.1);
    color: var(--bp-primary);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.app-action-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.app-action-card p {
    font-size: 0.9rem;
    color: #5b6b7c;
    margin-bottom: 0;
}

.app-hero {
    background: #fff;
    border: 1px solid var(--bp-border);
    border-radius: 1rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

.app-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.app-value-item {
    background: #fff;
    border: 1px solid var(--bp-border);
    border-radius: 0.75rem;
    padding: 1rem;
}

.app-value-item h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.app-value-item p {
    font-size: 0.9rem;
    color: #5b6b7c;
    margin-bottom: 0;
}

/* Chat page with optional top navigation */
body.chat-page-body.chat-with-nav {
    overflow: hidden;
    height: 100dvh;
}

.chat-shell-with-nav {
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-shell-with-nav .chat-page-layout {
    flex: 1 1 auto;
    min-height: 0;
}

.comments-page-shell {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.comments-page-shell .comments-page-header {
    margin-bottom: 1rem;
}

/* Terms and conditions modal */
body.terms-gate-active {
    overflow: hidden;
}

.terms-modal-content {
    border-radius: 0.75rem;
    max-height: calc(100vh - 2rem);
}

.terms-modal-header {
    padding: 1.25rem 1.5rem 0;
}

.terms-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 1.5rem 1.25rem;
}

.terms-scroll-area {
    max-height: min(55vh, 32rem);
    overflow-y: auto;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--bp-border);
    border-radius: 0.5rem;
}

.terms-choice-group {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.terms-choice-option {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.35rem 0;
}

.terms-choice-option .form-check-input {
    float: none;
    margin: 0.2rem 0 0;
    flex-shrink: 0;
    cursor: pointer;
}

.terms-choice-option .form-check-label {
    font-size: 0.9rem;
    line-height: 1.45;
    cursor: pointer;
}

.terms-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.terms-document h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--bp-primary-dark);
}

.terms-document h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
}

.terms-document p,
.terms-document li {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #374151;
}

.terms-document ul {
    padding-left: 1.25rem;
}

.terms-document .terms-meta {
    font-size: 0.875rem;
    color: #4b5563;
}

.legal-terms-body .terms-document {
    padding: 0.25rem 0.5rem;
}

.app-footer {
    flex-shrink: 0;
    background: #fff;
    margin-top: auto;
}

.app-footer .feedback-footer-link {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    line-height: inherit;
    color: inherit;
    cursor: pointer;
}

.app-footer .feedback-footer-link:hover,
.app-footer .feedback-footer-link:focus {
    color: inherit;
    text-decoration: none;
}

/* Subscription / pricing tiers */
.pricing-hero {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 2rem;
}

.pricing-hero h1 {
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--bp-primary-dark);
    margin-bottom: 0.75rem;
}

.pricing-hero p {
    color: #5b6b7c;
    font-size: 1.05rem;
    margin-bottom: 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--bp-border);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(10, 77, 140, 0.14);
    border-color: #b9cfe6;
}

.pricing-card.featured {
    border-color: var(--bp-primary);
    border-width: 2px;
    box-shadow: 0 12px 32px rgba(10, 77, 140, 0.16);
}

.pricing-badge {
    position: absolute;
    top: -0.85rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--bp-primary) 0%, var(--bp-accent) 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
}

.pricing-card .pricing-tier {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bp-primary-dark);
    margin-bottom: 0.15rem;
}

.pricing-card .pricing-tagline {
    color: #6b7a8c;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pricing-card .pricing-price {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.1;
}

.pricing-card .pricing-period {
    color: #6b7a8c;
    font-size: 0.95rem;
    font-weight: 500;
}

.pricing-card .pricing-subtext {
    color: #8a97a6;
    font-size: 0.82rem;
    margin-top: 0.15rem;
    min-height: 1.1rem;
}

.pricing-card hr {
    border-color: var(--bp-border);
    opacity: 1;
    margin: 1.25rem 0;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1 1 auto;
}

.pricing-features li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
    color: #374151;
}

.pricing-features li::before {
    content: "\F26E";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 0.05rem;
    color: var(--bp-accent);
    font-size: 0.95rem;
}

.pricing-card .btn {
    margin-top: auto;
    width: 100%;
    font-weight: 600;
}

.pricing-partner {
    background: linear-gradient(135deg, var(--bp-primary) 0%, var(--bp-primary-dark) 100%);
    color: #fff;
    border-radius: 1rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    margin-top: 1.75rem;
    text-align: center;
}

.pricing-partner h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-partner p {
    color: rgba(255, 255, 255, 0.85);
    max-width: none;
    width: 100%;
    margin: 0 0 1.25rem;
    line-height: 1.45;
}

.pricing-partner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    align-items: center;
}

/* One-time donation (reusable ViewComponent) */
.donation-section {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border: 1px solid var(--bp-border);
    border-radius: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.donation-intro {
    text-align: center;
    margin-bottom: 1.25rem;
}

.donation-intro h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bp-primary-dark);
    margin-bottom: 0.35rem;
}

.donation-intro p {
    color: #5b6b7c;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.donation-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-bottom: 1.15rem;
}

.donation-tile {
    min-width: 4.5rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--bp-border);
    border-radius: 0.65rem;
    background: #f8fafc;
    color: #1f2937;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.donation-tile:hover,
.donation-tile:focus-visible {
    border-color: var(--bp-accent);
    outline: none;
}

.donation-tile.is-selected {
    border-color: var(--bp-primary);
    border-width: 2px;
    background: rgba(10, 77, 140, 0.08);
    color: var(--bp-primary-dark);
    box-shadow: 0 4px 14px rgba(10, 77, 140, 0.12);
}

.donation-amount-row {
    max-width: 280px;
    margin: 0 auto 1rem;
}

.donation-amount-input {
    display: flex;
    align-items: stretch;
}

.donation-euro-sign {
    display: inline-flex;
    align-items: center;
    padding: 0 0.75rem;
    background: #f1f5f9;
    border: 1px solid var(--bp-border);
    border-right: 0;
    border-radius: 0.375rem 0 0 0.375rem;
    font-weight: 600;
    color: #374151;
}

.donation-amount-input .form-control {
    border-radius: 0 0.375rem 0.375rem 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.donation-email-row {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.donation-email-hint {
    text-align: center;
}

.donation-submit {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    font-weight: 600;
}

.donation-section .text-muted.small {
    max-width: 28rem;
}

/* --- Feedback edge tab + admin inbox --- */
.feedback-tab-btn {
    position: fixed;
    right: 0;
    top: 62%;
    transform: translateY(-50%);
    z-index: 1030;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 0.85rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-right: 0;
    border-radius: 0.5rem 0 0 0.5rem;
    background: linear-gradient(180deg, var(--bp-primary) 0%, var(--bp-primary-dark) 100%);
    color: #fff;
    box-shadow: -2px 4px 14px rgba(8, 61, 111, 0.28);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.045em;
    line-height: 1.15;
    cursor: pointer;
    transition: padding 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.feedback-tab-btn .bi {
    font-size: 1rem;
    line-height: 1;
}

.feedback-tab-label {
    display: inline-block;
}

/* Modal stays above the Bootstrap backdrop (1050/1055); tab stays below when open. */
#feedbackModal {
    z-index: 1055;
}

.feedback-tab-btn:hover {
    color: #fff;
    padding-left: 0.65rem;
    box-shadow: -4px 4px 16px rgba(8, 61, 111, 0.34);
}

.feedback-tab-btn:focus-visible {
    color: #fff;
    padding-left: 0.65rem;
    box-shadow: -4px 4px 16px rgba(8, 61, 111, 0.34);
    outline: 2px solid var(--bp-accent);
    outline-offset: 2px;
}

.feedback-modal-content {
    border-radius: 0.75rem;
}

.feedback-toast-container {
    z-index: 1100;
}

.app-navbar-feedback {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    font-size: 1.15rem;
}

.app-navbar-feedback-badge {
    position: absolute;
    top: 0.15rem;
    right: 0.05rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.feedback-unread-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--bp-accent);
}

.feedback-preview {
    max-width: 22rem;
}

.feedback-inbox-filters .form-label {
    font-weight: 600;
}

.feedback-detail-message {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 575.98px) {
    .feedback-tab-btn {
        top: 68%;
        padding: 0.7rem 0.4rem;
        font-size: 0.75rem;
        gap: 0.35rem;
        box-shadow: -1px 2px 10px rgba(8, 61, 111, 0.24);
    }

    .feedback-tab-btn .bi {
        font-size: 0.9rem;
    }

    .feedback-tab-btn:hover,
    .feedback-tab-btn:focus-visible {
        padding-left: 0.55rem;
    }
}

/* ---- Global AppBusy overlay (single source of truth) ---- */
.app-busy {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(1px);
}

.app-busy[hidden] {
    display: none !important;
}

.app-busy__spinner {
    width: 2.25rem;
    height: 2.25rem;
    border-width: 0.2rem;
}

body.app-busy-open {
    overflow: hidden;
}

.campaign-landing-cta-btn {
    min-width: 11rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.campaign-landing-panel .donation-section {
    margin-top: 0;
}

/* ---- PWA install banner (mobile) ---- */
.pwa-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1150;
    padding: 0.75rem;
    transform: translateY(110%);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.pwa-install-banner--visible {
    transform: translateY(0);
    pointer-events: auto;
}

.pwa-install-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    max-width: 36rem;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--bp-primary) 0%, var(--bp-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 -4px 24px rgba(8, 61, 111, 0.28);
}

.pwa-install-banner__title {
    font-weight: 600;
    font-size: 0.95rem;
}

.pwa-install-banner__subtitle {
    font-size: 0.82rem;
    opacity: 0.92;
}

.pwa-install-banner__steps {
    padding-left: 1.1rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.pwa-install-banner__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.pwa-install-banner__dismiss {
    opacity: 0.9;
}

@media (min-width: 992px) {
    .pwa-install-banner {
        display: none !important;
    }
}

.campaign-landing-body-html table {
    width: 100%;
    margin-bottom: 1rem;
}

