
/* ============================================
   GLOBAL TYPOGRAPHY & BASE
============================================ */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f7f4ef;
    color: #1b2a41;
}

/* ============================================
   LINKS
============================================ */
a, .btn-link {
    color: #d4b483; /* soft gold */
    text-decoration: none;
}

    a:hover, .btn-link:hover {
        color: #e3c9a3;
    }

/* ============================================
   PRIMARY BUTTONS
============================================ */
.btn-primary {
    color: #1b2a41;
    background-color: #d4b483;
    border-color: #c7a774;
}

    .btn-primary:hover {
        background-color: #e3c9a3;
        border-color: #d4b483;
    }

/* ============================================
   FOCUS STATES
============================================ */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #f7f4ef, 0 0 0 0.25rem #d4b483;
    border-color: #d4b483;
}

/* ============================================
   CONTENT SPACING
============================================ */
.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* ============================================
   VALIDATION STATES
============================================ */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #4caf50; /* softened green */
}

.invalid {
    outline: 1px solid #c0392b; /* deepened red */
}

.validation-message {
    color: #c0392b;
}

/* ============================================
   ERROR BOUNDARY
============================================ */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUx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YgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNkNGI0ODM ) no-repeat 1rem/1.8rem, #3a4750;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/* ============================================
   FORM ELEMENTS
============================================ */
.darker-border-checkbox.form-check-input {
    border-color: #3a4750;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: #8a8a8a;
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ============================================
   APP BAR & FOOTER
============================================ */
.custom-appbar {
    background-color: #1b2a41 !important;
    color: #f7f4ef !important;
}

.custom-footer-appbar {
    background-color: #1b2a41 !important;
    height: 28px !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    color: #f7f4ef !important;
}

/* ============================================
   SYNCFUSION GRID TWEAKS
============================================ */
.e-grid .e-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f7f4ef;
}

/* ============================================
   NUDGE HIGHLIGHT ANIMATION
============================================ */
.nudge-flash {
    animation: flashFade 1.2s ease-out;
}

@keyframes flashFade {
    0% {
        background-color: #fff3b0;
    }

    50% {
        background-color: #ffe066;
    }

    100% {
        background-color: transparent;
    }
}

/* -------------------------------------
               WELCOME HERO
 -------------------------------------- */
.welcome-hero {
    background: #f7f4ef;
    padding: 60px 20px;
    text-align: center;
}

.welcome-content h1 {
    font-size: 2.2rem;
    color: #1b2a41;
    margin-bottom: 10px;
}

.welcome-content .subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.welcome-content .expired {
    color: #a33;
    font-weight: bold;
}

.small-note {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #555;
}



/* -------------------------------------
               PRICING GRID
  -------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    max-width: 700px;
    margin: 40px auto;
}

.pricing-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0d8cf;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .pricing-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    }

    .pricing-card.popular {
        border: 2px solid #d4b483;
        background: #faf6f0;
    }

        .pricing-card.popular .cta-button {
            background: #d4b483;
            color: #1b2a41;
        }

        .pricing-card.popular .cta-button:hover {
            background: #c7a773;
            color: #1b2a41;
        }


.price {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    color: #1b2a41;
}

    .price span {
        font-size: 1rem;
        font-weight: normal;
        color: #555;
    }

.price-desc {
    margin-bottom: 20px;
    color: #666;
}

    .cta-button {
        background: #1b2a41;
        color: white;
        border: none;
        border-radius: 6px;
        padding: 12px 22px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    }

    .cta-button:hover {
        background: #243b5a; /* slightly lighter or darker, your choice */
        color: white; /* <-- ensures text stays visible */
        transform: translateY(-2px);
    }


    .cta-button:active {
        transform: translateY(0);
    }

    .cta-button.small {
        padding: 12px 22px;
        font-size: 1rem;
    }
    .cta-button {
        width: 100%;
    }

/* Force CTA button to always have a visible background */
.pricing-card .cta-button {
    background: #1b2a41 !important;
    color: white !important;
}

    .pricing-card .cta-button:hover {
        background: #243b5a !important;
        color: white !important;
    }



/* -------------------------------------
               SUBSCRIPTION PANEL
-------------------------------------- */
.subscription-panel {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.subscription-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-label {
    font-size: 1.4rem;
    font-weight: 700;
}

.renewal-date {
    font-size: 1rem;
    opacity: 0.85;
}

.manage-subscription-btn {
    background: #3b82f6;
    color: white;
    padding: 0.9rem 1.4rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .manage-subscription-btn:hover {
        background: #2563eb;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(59,130,246,0.4);
    }

.manage-paynow-btn {
    background: #8b0000;
    color: white;
    padding: 0.9rem 1.4rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .manage-paynow-btn:hover {
        background: #6f0000;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(139,0,0,0.4);
    }


/* -------------------------------------
               SUBSCRIPTION BADGES
-------------------------------------- */

/* Base badge styling */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    color: white;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px; /* spacing above subscription panel */
}

/* Badge colors */
.status-active {
    background-color: #2e7d32; /* Green */
}

.status-trial {
    background-color: #0288d1; /* Blue */
}

.status-pastdue {
    background-color: #f9a825; /* Amber */
}

.status-unpaid {
    background-color: #d32f2f; /* Red */
}

.status-canceled {
    background-color: #616161; /* Grey */
}

.status-none {
    background-color: #9e9e9e; /* Light grey */
}


/* NAV MENU OVERRIDES */

/* Base menu link */
.mud-nav-link {
    color: white !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

    /* Hover state */
    .mud-nav-link:hover {
        color: rgba(255,255,255,0.85) !important;
    }

    /* Selected (active) state */
    .mud-nav-link.mud-nav-link-active,
    .mud-nav-link.mud-nav-link-active .mud-nav-link-text {
        color: #d32f2f !important;
    }

/* Layout containers */
/* === Layout containers === */
.help-paper,
.help-container {
    max-width: 900px;
    margin: 1rem auto;
    padding: 2rem;
    box-sizing: border-box;
    background: #fff;
}

.help-container {
    background: transparent;
}

/* === Carousel === */
.help-carousel {
    margin: 1rem 0;
    height: 475px;
    overflow: hidden;
}

.carousel-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.carousel-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-sizing: border-box;
}

/* === Generic framed images (markdown, help images, carousel) === */
.markdown-body img,
.help-image,
.carousel-image {
    display: block;
    margin: 0.75rem auto;
    border: 2px solid #000;
    border-radius: 4px;
    box-sizing: border-box;
}

/* === Dialog framing and centering ===
   Targets MudBlazor dialog markup when the dialog component uses Class="help-image-dialog" */
.help-image-dialog .mud-dialog-paper {
    display: block;
    padding: 0.5rem;
    border: 3px solid #000;
    border-radius: 6px;
    box-shadow: none;
    background: #fff;
    box-sizing: border-box;
}

/* Ensure dialog content centers inline content reliably */
.help-image-dialog .mud-dialog-content,
.help-image-dialog .help-image-dialog-content {
    text-align: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Wrapper used to position the close icon relative to the image */
.help-image-dialog .help-image-wrapper {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Dialog image: block-level, centered, constrained to viewport */
.help-image-dialog img,
.help-image-dialog .help-image {
    display: block;
    margin: 0 auto;
    max-width: 90vw;
    max-height: 90vh;
    height: auto;
    border: 2px solid #000;
    border-radius: 4px;
    box-sizing: border-box;
}

/* === Close icon (top-right) ===
   Use a focusable button (MudIconButton) with this class for accessibility */
.help-image-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 50%;
    padding: 6px;
    transition: background .15s ease, transform .08s ease, opacity .12s ease;
    border: none;
    cursor: pointer;
}

    /* Hover and keyboard focus affordances */
    .help-image-close:hover,
    .help-image-close:focus {
        background: rgba(0,0,0,0.6);
        transform: scale(1.03);
        outline: none;
    }

/* Optional: show close icon only on hover (uncomment to enable) */
/* .help-image-close { opacity: 0; } */
/* .help-image-wrapper:hover .help-image-close,
   .help-image-close:focus { opacity: 1; } */

/* === Responsive tweaks === */
@media (max-width: 600px) {
    .help-paper,
    .help-container {
        padding: 1rem;
        margin: 0.5rem;
    }

    .help-image-dialog img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .help-image-close {
        top: 6px;
        right: 6px;
        padding: 5px;
    }
}

/* responsive image used in page */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* smaller thumbnail styling (optional) */
/*.thumbnail-img {
    max-width: 420px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: zoom-in;
}*/

/* dialog image styling */

/* existing responsive-img rule (if present) */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}


/* keep responsive behaviour but force full width thumbnails */
.fullwidth-thumbnail {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    cursor: zoom-in;
}


.lightbox-figure {
    margin: 0;
    padding: 0.5rem;
    text-align: center;
}

.lightbox-img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border-radius: 4px;
}

.lightbox-caption {
    margin-top: 0.5rem;
    color: rgba(0,0,0,0.7);
    font-size: 0.95rem;
}