﻿/* ============================================================
   main.css — BetterBids Web
   Colour palette mirrors the desktop app:
     Dark navy  #002F5D   (logo/header)
     Teal       #6DA9A8   (accents, events)
     Gold       #BFA15F   (highlights)
     Light grey #F4F6F8   (backgrounds)
     Dark text  #424242
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #002F5D;
    --teal: #6DA9A8;
    --teal-dark: #5C9392;
    --gold: #BFA15F;
    --bg: #F4F6F8;
    --surface: #FFFFFF;
    --text: #424242;
    --text-light: #9E9E9E;
    --danger: #D32F2F;
    --success: #388E3C;
    --warning: #F57C00;
    --border: #DEE2E6;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- NAVBAR ---- */
.navbar {
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* keep hamburger + brand together on left */
    padding: 0 1.5rem;
    height: 52px;
    flex-shrink: 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: .5px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: .9rem;
    font-size: .88rem;
    margin-left: auto;
    /* push links to the far right */
}

.navbar-links a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}

.navbar-links a:hover {
    color: #fff;
}

.navbar-sep {
    color: rgba(255, 255, 255, .3);
}

.subscribe-btn {
    background: rgba(0, 180, 120, .18);
    border: 1px solid #00b478;
    color: #00e49a !important;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: .8rem;
}

.trial-badge {
    background: rgba(191, 161, 95, .25);
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: .8rem;
}

.trial-warning {
    border-color: var(--warning) !important;
    color: var(--warning) !important;
}

.trial-critical {
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}

.activated-badge {
    color: rgba(100, 220, 100, .9);
    font-size: .85rem;
}

/* ---- FLASH TOAST POPUPS ---- */
.flash-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: 480px;
    max-width: 95vw;
    pointer-events: none;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem .85rem 1.1rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .18), 0 1px 4px rgba(0, 0, 0, .12);
    pointer-events: all;
    animation: toast-in .25s ease;
    transition: opacity .3s, transform .3s;
    line-height: 1.45;
    border-left: 5px solid transparent;
    position: relative;
    word-break: break-word;
}

.flash.hiding {
    opacity: 0;
    transform: scale(0.88);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: scale(0.88);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.flash-body {
    flex: 1;
}

.flash-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: .05rem;
}

.flash-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    opacity: .55;
    flex-shrink: 0;
    color: inherit;
    margin-top: .05rem;
}

.flash-dismiss:hover {
    opacity: 1;
}

.flash-success {
    background: #f0fdf4;
    border-left-color: #22c55e;
    color: #15532e;
}

.flash-success .flash-icon::before {
    content: '\2713';
    color: #22c55e;
}

.flash-error {
    background: #fff1f2;
    border-left-color: #ef4444;
    color: #7f1d1d;
}

.flash-error .flash-icon::before {
    content: '\2716';
    color: #ef4444;
}

.flash-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #78350f;
}

.flash-warning .flash-icon::before {
    content: '\26A0';
    color: #f59e0b;
}

.flash-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e3a5f;
}

.flash-info .flash-icon::before {
    content: '\2139';
    color: #3b82f6;
}

/* ---- MAIN CONTENT ---- */
.main-content {
    flex: 1;
    padding: 1.5rem;
}

/* ---- AUTH CARD ---- */
.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 420px;
    margin: 3rem auto;
}

.auth-card h2 {
    color: var(--navy);
    margin-bottom: .5rem;
}

.auth-sub {
    color: var(--text-light);
    font-size: .9rem;
    margin-bottom: 1.2rem;
}

.auth-alt {
    margin-top: 1.2rem;
    font-size: .88rem;
    color: var(--text-light);
}

.auth-forgot {
    text-align: right;
    margin-top: .35rem;
    font-size: .82rem;
}

.auth-forgot a {
    color: var(--teal-dark);
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

/* ---- PASSWORD PEEK WRAPPER ---- */
.pw-wrap {
    position: relative;
}

.pw-wrap input {
    padding-right: 2.4rem;
}

.pw-peek {
    position: absolute;
    right: .45rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: .2rem;
    line-height: 0;
    display: flex;
    align-items: center;
}

.pw-peek:hover {
    color: var(--teal);
}

.pw-peek svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.trial-note {
    color: var(--teal-dark);
    margin-bottom: 1rem;
    font-size: .9rem;
}

.trial-expired-card {
    max-width: 500px;
    text-align: center;
}

/* ---- FORMS ---- */
label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    margin: .9rem 0 .25rem;
    color: var(--text);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color .15s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--teal);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 400;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-block;
    padding: .5rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s;
    margin-top: .75rem;
}

.btn:hover {
    opacity: .88;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--teal);
    border: 1px solid var(--teal);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: .3rem .75rem;
    font-size: .82rem;
}

.btn-xs {
    padding: .2rem .55rem;
    font-size: .78rem;
}

/* ---- PAGE CARD ---- */
.page-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    max-width: 900px;
    margin: 0 auto;
}

.page-card.full-width {
    max-width: 100%;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* ---- BUILDER LAYOUT ---- */
.builder-layout {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 100px);
}

.pairing-panel {
    width: 320px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background: var(--navy);
    color: #fff;
    padding: .75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: .95rem;
}

.context-badge {
    font-size: .75rem;
    opacity: .8;
}

.pairing-list {
    flex: 1;
    overflow-y: auto;
    padding: .5rem;
}

.panel-actions {
    padding: .75rem;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    border-top: 1px solid var(--border);
}

.calendar-section {
    flex: 1;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

/* ---- TOTALS TABLE ---- */
.totals-panel {
    padding: .75rem;
    border-top: 1px solid var(--border);
}

.totals-panel h4 {
    font-size: .85rem;
    color: var(--navy);
    margin-bottom: .5rem;
}

.totals-table {
    width: 100%;
    font-size: .82rem;
    border-collapse: collapse;
}

.totals-table td {
    padding: 2px 4px;
}

.totals-table td:last-child {
    text-align: right;
    font-weight: 600;
}

/* ---- DATA TABLE ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    margin-top: 1rem;
}

.data-table th {
    background: var(--navy);
    color: #fff;
    padding: .5rem .75rem;
    text-align: left;
}

.data-table td {
    padding: .45rem .75rem;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover td {
    background: #F0F4FF;
}

/* ---- EVENT DETAIL PANEL ---- */
.event-detail-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 280px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    padding: 1rem;
    z-index: 100;
}

.event-detail-panel.hidden {
    display: none;
}

.close-btn {
    float: right;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
}

.detail-table {
    width: 100%;
    font-size: .82rem;
    border-collapse: collapse;
    margin: .5rem 0;
}

.detail-table td {
    padding: 3px 4px;
    vertical-align: top;
}

.detail-table td:first-child {
    color: var(--text-light);
    white-space: nowrap;
    padding-right: .75rem;
}

/* ---- MISC ---- */
.hidden {
    display: none !important;
}

.loading-text {
    color: var(--text-light);
    text-align: center;
    padding: 1rem;
    font-size: .85rem;
}

.empty-state {
    color: var(--text-light);
    padding: 1.5rem 0;
}

.progress-note {
    font-size: .85rem;
    color: var(--teal-dark);
    margin-left: .75rem;
}

.manual-override {
    margin-top: .75rem;
}

.manual-override summary {
    cursor: pointer;
    font-size: .87rem;
    color: var(--teal-dark);
}

.override-fields {
    padding-top: .5rem;
}

/* ---- CALENDAR PAGE ---- */
.calendar-page {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.calendar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ---- FOOTER ---- */
.footer {
    text-align: center;
    padding: .75rem;
    color: var(--text-light);
    font-size: .8rem;
    border-top: 1px solid var(--border);
}

/* ================================================================
   DONATION SPLASH SCREEN
   ================================================================ */

html.splash-html,
body.splash-body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body.splash-body {
    background: #001a38;
    display: block;
    /* override flex from base body rule */
}

.splash-page {
    min-height: 100vh;
    background: linear-gradient(145deg, #001220 0%, #002F5D 50%, #0d3862 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Ambient glow orbs */
.splash-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(70px);
}

.splash-orb-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(109, 169, 168, 0.40) 0%, transparent 70%);
    top: -160px;
    left: -100px;
    animation: orb-drift 12s ease-in-out infinite alternate;
}

.splash-orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(191, 161, 95, 0.35) 0%, transparent 70%);
    bottom: -120px;
    right: -80px;
    animation: orb-drift 10s ease-in-out 2s infinite alternate-reverse;
}

.splash-orb-3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(109, 169, 168, 0.20) 0%, transparent 70%);
    bottom: 25%;
    left: 8%;
    animation: orb-drift 8s ease-in-out 1s infinite alternate;
}

@keyframes orb-drift {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(30px, 20px);
    }
}

/* Main card */
.splash-card {
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(109, 169, 168, 0.22);
    border-radius: 20px;
    padding: 3rem 3.5rem;
    max-width: 580px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow:
        0 36px 90px rgba(0, 0, 0, 0.50),
        0 0 0 1px rgba(109, 169, 168, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: splash-card-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes splash-card-in {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animated top border shimmer */
.splash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg,
            transparent 0%,
            #6DA9A8 25%,
            #BFA15F 50%,
            #6DA9A8 75%,
            transparent 100%);
    background-size: 300% 100%;
    animation: splash-shimmer 3.5s linear infinite;
}

@keyframes splash-shimmer {
    from {
        background-position: 300% 0;
    }

    to {
        background-position: -300% 0;
    }
}

/* Floating plane icon */
.splash-plane {
    font-size: 3rem;
    display: block;
    margin-bottom: .7rem;
    animation: plane-float 3.8s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(109, 169, 168, 0.5));
}

@keyframes plane-float {

    0%,
    100% {
        transform: translateY(0) rotate(-9deg);
    }

    50% {
        transform: translateY(-13px) rotate(4deg);
    }
}

.splash-brand {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #6DA9A8;
    margin-bottom: .55rem;
}

.splash-headline {
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: .45rem;
}

.splash-headline span {
    color: #BFA15F;
    text-shadow: 0 0 24px rgba(191, 161, 95, 0.40);
}

.splash-divider {
    width: 64px;
    height: 3px;
    background: linear-gradient(to right, #6DA9A8, #BFA15F);
    border-radius: 2px;
    margin: 1rem auto 1.2rem;
}

.splash-body-text {
    color: rgba(255, 255, 255, 0.78);
    font-size: .96rem;
    line-height: 1.72;
    margin-bottom: .9rem;
}

.splash-body-small {
    font-size: .87rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: .1rem;
}

/* Grace period info box */
.splash-grace-box {
    background: rgba(191, 161, 95, 0.10);
    border: 1px solid rgba(191, 161, 95, 0.28);
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    margin: 1.1rem 0;
    text-align: left;
}

.splash-grace-box strong {
    display: block;
    color: #BFA15F;
    font-size: .95rem;
    margin-bottom: .4rem;
    letter-spacing: .2px;
}

.splash-grace-box p {
    color: rgba(255, 255, 255, 0.68);
    font-size: .87rem;
    line-height: 1.65;
    margin: 0;
}

/* CTA buttons */
.splash-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    margin-top: 1.6rem;
}

.btn-subscribe {
    display: inline-block;
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, #BFA15F 0%, #d9c278 55%, #BFA15F 100%);
    background-size: 200% 100%;
    color: #002040;
    border: none;
    border-radius: 10px;
    padding: .9rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 22px rgba(191, 161, 95, 0.42);
    transition: background-position .45s ease, transform .2s, box-shadow .2s;
}

.btn-subscribe:hover {
    background-position: 100% 0;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(191, 161, 95, 0.55);
    color: #001830;
    text-decoration: none;
}

.btn-continue {
    display: inline-block;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    border: none;
    padding: .4rem .75rem;
    font-size: .875rem;
    cursor: pointer;
    text-decoration: none;
    transition: color .2s;
    letter-spacing: .2px;
}

.btn-continue:hover {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: underline;
}

.splash-footer {
    margin-top: 1.4rem;
    font-size: .76rem;
    color: rgba(255, 255, 255, 0.28);
    line-height: 1.6;
}

.splash-activate-link {
    color: #6DA9A8;
    text-decoration: none;
    transition: color .15s;
}

.splash-activate-link:hover {
    color: #8fd4d3;
    text-decoration: underline;
}

/* Progress bar at bottom of splash card */
.splash-progress-wrap {
    margin-top: 1.5rem;
    text-align: left;
}

.splash-progress-label {
    font-size: .73rem;
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: .35rem;
    display: flex;
    justify-content: space-between;
}

.splash-progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 3px;
    overflow: hidden;
}

.splash-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(to right, #6DA9A8, #BFA15F);
    transition: width 1s ease;
}

/* ================================================================
   ACTIVATE â€” THANK YOU SECTION
   ================================================================ */

.thankyou-card {
    max-width: 500px;
    text-align: center;
    padding: 2.75rem 2rem 2.25rem;
    overflow: hidden;
    position: relative;
}

/* Animated rainbow top bar */
.thankyou-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6DA9A8, #BFA15F, #6DA9A8);
    background-size: 200% 100%;
    animation: shimmer-bar 2.8s linear infinite;
}

@keyframes shimmer-bar {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

.thankyou-check {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #6DA9A8 0%, #5C9392 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: #fff;
    margin: 0 auto 1.3rem;
    box-shadow: 0 4px 22px rgba(109, 169, 168, 0.48);
    animation: check-pop .55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes check-pop {
    from {
        transform: scale(0.3) rotate(-20deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.thankyou-headline {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.22;
    margin-bottom: .3rem;
}

.thankyou-sub {
    color: var(--teal);
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 0;
}

.thankyou-divider {
    width: 56px;
    height: 3px;
    background: linear-gradient(to right, #6DA9A8, #BFA15F);
    border-radius: 2px;
    margin: 1.1rem auto;
}

.thankyou-body {
    color: var(--text);
    font-size: .92rem;
    line-height: 1.65;
    margin-bottom: 1.3rem;
}

.thankyou-features {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-bottom: 1.6rem;
    text-align: left;
    background: #f5f8fb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
}

.thankyou-feature {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    color: var(--text);
}

.tf-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 26px;
    text-align: center;
}

.thankyou-cta.btn {
    width: 100%;
    max-width: 280px;
    display: inline-block;
    text-align: center;
    padding: .8rem 1.5rem;
    margin-top: 0;
    border-radius: 8px;
    font-size: .97rem;
    background: var(--teal);
    color: #fff;
    transition: opacity .18s, transform .18s, box-shadow .18s;
    box-shadow: 0 4px 14px rgba(109, 169, 168, 0.35);
}

.thankyou-cta.btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(109, 169, 168, 0.45);
}