/* ============================================================
   MyEzAi - Single Source of Truth Stylesheet
   (Dark theme + consistent app widths + chat widget no-jump)
   ============================================================ */

/* -----------------------
   Base / Global
   ----------------------- */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    margin-bottom: 60px;
    background: linear-gradient(180deg, #0b0f1a 0%, #0e1424 100%);
    color: #e5e7eb;
}

/* Bootstrap muted text readability on dark */
.text-muted {
    color: #9ca3af !important;
}

/* Links */
a {
    color: #7dd3fc;
    text-decoration: none;
}

    a:hover {
        color: #ffffff;
        text-decoration: underline;
    }

/* -----------------------
   Navbar + Footer (consistent everywhere)
   ----------------------- */

/* If you use <nav class="... ez-navbar"> in _Layout */
.ez-navbar {
    background: rgba(2, 6, 23, 0.92) !important;
    backdrop-filter: blur(10px);
    border-color: rgba(255,255,255,0.06) !important;
}

.navbar .nav-link {
    color: #cbd5e1 !important;
}

    .navbar .nav-link:hover {
        color: #ffffff !important;
    }

/* optional outline button helper used in _Layout */
.ez-btn-outline {
    border-color: #334155 !important;
}

/* IMPORTANT: override default template CSS that sets .footer absolute */
.footer {
    position: static !important;
    bottom: auto !important;
    width: 100% !important;
    white-space: normal !important;
    line-height: normal !important;
}

footer {
    border-top-color: rgba(255,255,255,0.06) !important;
    color: #9ca3af;
}

    footer a {
        color: #7dd3fc;
    }

        footer a:hover {
            color: #ffffff;
        }

/* -----------------------
   Forms - Dark Styling (Identity + app pages)
   ----------------------- */
label, .form-label {
    color: #cbd5e1;
}

.form-control,
.form-select,
textarea.form-control {
    background-color: #020617 !important;
    color: #e5e7eb !important;
    border: 1px solid #334155 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .btn:focus,
    .btn:active:focus,
    .btn-link.nav-link:focus,
    .form-control:focus,
    .form-select:focus,
    .form-check-input:focus,
    textarea.form-control:focus {
        border-color: #38bdf8 !important;
        box-shadow: 0 0 0 0.15rem rgba(56, 189, 248, 0.25) !important;
        background-color: #020617 !important;
        color: #ffffff !important;
    }

    /* Placeholder behavior */
    .form-control::placeholder,
    textarea.form-control::placeholder {
        opacity: 0;
        color: #9ca3af;
        transition: opacity 0.15s ease;
    }

    .form-control:focus::placeholder,
    textarea.form-control:focus::placeholder {
        opacity: 1;
        color: #9ca3af;
    }

/* Bootstrap form-floating (Identity uses this) */
.form-floating > .form-control,
.form-floating > .form-select {
    background-color: #020617 !important;
    color: #e5e7eb !important;
    border: 1px solid #334155 !important;
}

    .form-floating > .form-control::placeholder,
    .form-floating > .form-select::placeholder {
        color: transparent !important;
        opacity: 0 !important;
    }

    .form-floating > .form-control:focus::placeholder,
    .form-floating > .form-select:focus::placeholder {
        color: transparent !important;
        opacity: 0 !important;
    }

.form-floating > label {
    color: #cbd5e1 !important;
}

/* Browser autofill (white background fix) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: #e5e7eb !important;
    box-shadow: 0 0 0px 1000px #020617 inset !important;
    transition: background-color 9999s ease-in-out 0s;
    border: 1px solid #334155 !important;
}

/* Alerts */
.alert {
    border: 1px solid rgba(255,255,255,0.10);
}

/* -----------------------
   Cards (Privacy/Terms + general cards)
   ----------------------- */
.card {
    background: rgba(2, 6, 23, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #e5e7eb !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

    .card .card-body {
        color: #e5e7eb !important;
    }

    .card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
        color: #f8fafc !important;
    }

    .card p, .card li {
        color: #e5e7eb !important;
    }

    .card .text-muted, .card small.text-muted {
        color: #a8b3c7 !important;
    }

/* ============================================================
   Page Width + Uniformity (Identity + App pages)
   Works with your _Layout bodyClass: identity-page / app-page
   ============================================================ */

/* Default: don?t force containers on marketing pages */
main {
    width: 100%;
}

/* Shared wrapper look for ?non-marketing? pages */
body.identity-page main,
body.app-page main {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

    /* Make the container behave like a centered app shell */
    body.identity-page main .container,
    body.app-page main .container {
        width: 100%;
    }

    /* Identity should be narrower */
    body.identity-page main .container {
        max-width: 1140px; /* sweet spot: not cramped, not wide */
    }

    /* App pages (billing/onboarding/admin) can be wider */
    body.app-page main .container {
        max-width: 1140px;
    }

        /* Give Identity + App pages a uniform ?card shell? around the whole page */
        body.identity-page main .container > .row,
        body.app-page main .container > .row {
            background: rgba(2, 6, 23, 0.70);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 18px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.35);
            padding: 22px 18px;
            margin-left: 0;
            margin-right: 0;
        }

            /* Ensure the columns inside don?t stretch weirdly */
            body.identity-page main .container > .row > [class^="col"],
            body.identity-page main .container > .row > [class*=" col"],
            body.app-page main .container > .row > [class^="col"],
            body.app-page main .container > .row > [class*=" col"] {
                padding-left: 12px;
                padding-right: 12px;
            }

/* Fix older ?col-md-offset-2? (Bootstrap 5 doesn?t support it) */
.col-md-offset-2 {
    margin-left: 0 !important;
}

/* Identity headings / spacing */
body.identity-page h1,
body.identity-page h2,
body.identity-page h3 {
    color: #f9fafb;
}

/* Make the ?external providers? section look like a card too */
body.identity-page section {
    background: rgba(17, 24, 39, 0.55);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
}

/* Billing headings spacing */
body.app-page h1,
body.app-page h2,
body.app-page h3 {
    color: #f9fafb;
    margin-bottom: 0.75rem;
}

/* Billing buttons look consistent */
body.app-page .btn-secondary {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.14);
    color: #e5e7eb;
}

    body.app-page .btn-secondary:hover {
        background: rgba(255,255,255,0.12);
        border-color: rgba(255,255,255,0.22);
    }
/* Dark admin table: make all body text readable */
.ez-table-dark tbody td,
.ez-table-dark tbody th {
    color: #e5e7eb; /* light gray */
}

/* Keep Bootstrap "muted" look but still readable on dark bg */
.ez-table-dark .text-muted {
    color: rgba(229,231,235,.75) !important;
}

.ez-table-dark thead th {
    color: #f8fafc !important;
}


/* Optional: hover effect stays visible in dark theme */
.ez-table-dark.table-hover tbody tr:hover td {
    background: rgba(255,255,255,.04);
}
/* ============================================================
   Selected row styling (Admin tables)
   ============================================================ */

/* Base selected row */
.table tr.table-active td {
    background-color: rgba(56, 189, 248, 0.12) !important; /* soft blue */
}

    /* Left accent bar */
    .table tr.table-active td:first-child {
        box-shadow: inset 4px 0 0 rgba(56, 189, 248, 0.9);
    }

/* Keep selection visible on hover */
.table-hover tbody tr.table-active:hover td {
    background-color: rgba(56, 189, 248, 0.16) !important;
}

/* Improve contrast of text in selected row */
.table tr.table-active td,
.table tr.table-active td .text-muted {
    color: #f8fafc !important;
}

/* Optional: subtle elevation */
.table tr.table-active {
    position: relative;
    z-index: 1;
}
