﻿/* ========= AppShell.Blue.css (Themeable + tinted rows) =========
   JS updates these vars:
   --blue, --blue2, --blueSoft, --border, --rowAlt
*/

:root {
    --bg: #2f343a; /* dark gray background */
    --surface: #ffffff; /* card/surface */
    --text: #0f172a; /* slate */
    --muted: #475569; /* muted text */
    /* Theme variables (JS will override) */
    --blue: #2563eb; /* primary */
    --blue2: #1d4ed8; /* darker primary */
    --blueSoft: rgba(37,99,235,.14); /* focus/hover tint */
    --border: #d7e3f4; /* border tint */
    --rowAlt: rgba(37,99,235,.06); /* alternating row tint */
    /* Neutrals */
    --shadow: rgba(15,23,42,.08);
    --shadow-strong: rgba(0,0,0,.25);
    --surface2: #f8fbff;
    --danger: #b91c1c;
}

/* ========= Page base ========= */
html, body, form {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ========= Theme panel (floating) ========= */
.themePanel {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.themeBox {
    background: var(--surface);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px var(--shadow-strong);
    border: 1px solid var(--border);
}

/* ========= Layout wrapper ========= */
.app {
    width: 100%;
    background: var(--bg);
    padding: 30px 0;
}

.content-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* small gutter on tiny screens */
    box-sizing: border-box;
}

.content-wrap--wide {
    width: 100%;
    max-width: 100%;
    margin: auto;
    box-sizing: border-box;
}

.content-wrap--xwide {
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}

.page-inner--xwide {
    width: 100%;
    max-width: none; /* no cap unless you want one */
    margin: 0 auto;
}

.page-inner {
    width: 100%;
    display: block;
}

/* ========= Section headers ========= */
.hdr {
    background: linear-gradient(90deg, var(--blue2), var(--blue));
    color: #fff;
}

/* ========= Page chrome ========= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 28px var(--shadow);
    overflow: hidden;
}

.headerbar {
    background: linear-gradient(90deg, var(--blue2), var(--blue));
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    letter-spacing: .2px;
}

.subheader {
    padding: 10px 16px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.content {
    padding: 16px;
    margin-top: -50px;
}

/* ========= Typography helpers ========= */
.msg {
    min-height: 18px;
    font-size: 13px;
    color: var(--danger);
}

.muted {
    color: var(--muted);
}

/* ========= Form elements ========= */
.label {
    display: block;
    margin: 12px 0 6px;
    font-size: 13px;
    color: var(--muted);
}

.textbox {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    box-sizing: border-box;
}

    .textbox:focus {
        outline: none;
        border-color: var(--blue);
        box-shadow: 0 0 0 4px var(--blueSoft);
    }

/* ========= Buttons ========= */
.btn {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
    color: var(--text);
    font-size: 14px;
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--blue2);
        border-color: var(--blue2);
    }

/* ========= Helpful spacing utilities ========= */
.row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.col {
    flex: 1;
}

.stack {
    display: grid;
    gap: 10px;
}

/* ========= DayPilot-friendly container (optional) ========= */
.dp-surface {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 10px 22px rgba(15,23,42,.06);
}

/* ========= Optional: tables/grid helpers ========= */
.table-surface {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.table-pad {
    padding: 10px;
}

/* ============================================================
   XGridView + Standard GridView (tinted by theme)
   ============================================================ */

/* ===== XGridView ===== */
.xgv {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 14px;
}

    .xgv th {
        background: linear-gradient(to bottom, var(--blue2), var(--blue));
        color: #fff;
        padding: 8px 6px;
        font-weight: 600;
        text-align: left;
    }

    .xgv td {
        padding: 7px 6px;
        border-bottom: 1px solid var(--border);
    }

    /* Alternating rows: tinted from theme */
    .xgv tr:nth-child(even) {
        background-color: var(--rowAlt);
    }

    .xgv tr:nth-child(odd) {
        background-color: #fff;
    }

    .xgv tr:hover {
        background-color: var(--blueSoft) !important;
    }

    .xgv .SelectedRowStyle {
        background-color: var(--blueSoft) !important;
    }

/* ===== Standard GridView ===== */
.gv {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 14px;
}

    .gv th {
        background: linear-gradient(to bottom, var(--blue2), var(--blue));
        color: #fff;
        font-weight: 600;
        padding: 8px 6px;
        text-align: left;
    }

    .gv td {
        padding: 7px 6px;
        border-bottom: 1px solid var(--border);
    }

    .gv tr:nth-child(even) {
        background-color: var(--rowAlt);
    }

    .gv tr:nth-child(odd) {
        background-color: #fff;
    }

    .gv tr:hover {
        background-color: var(--blueSoft) !important;
    }

    .gv .SelectedRowStyle {
        background-color: var(--blueSoft) !important;
    }

.gv-fixed {
    table-layout: fixed; /* important */
    width: 100%;
}

/* ========= GridView theme (matches AppShell.Blue variables) ========= */
/* Use: <asp:GridView CssClass="gv" ...> */

.gv {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d7e3f4);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15,23,42,.06);
    font-size: 13px;
    color: var(--text, #0f172a);
}

    /* cells */
    .gv th,
    .gv td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--border, #d7e3f4);
        vertical-align: middle;
    }

    /* header */
    .gv th {
        position: sticky; /* remove if you don't want sticky headers */
        top: 0;
        z-index: 1;
        text-align: left;
        color: #fff;
        font-weight: 700;
        letter-spacing: .2px;
        background: linear-gradient(90deg, var(--blue2, #1d4ed8), var(--blue, #2563eb));
        border-bottom: 1px solid rgba(255,255,255,.18);
    }

        /* header sort links */
        .gv th a {
            color: #fff;
            text-decoration: none;
        }

            .gv th a:hover {
                text-decoration: underline;
            }

    /* rows */
    .gv tr {
        background: var(--surface, #fff);
    }

        .gv tr.gv-alt {
            background: var(--rowAlt, rgba(37,99,235,.06));
        }

        /* hover */
        .gv tr:hover td {
            background: rgba(37,99,235,.10);
        }

        /* selected row (if you set SelectedRowStyle-CssClass="gv-selected") */
        .gv tr.gv-selected td {
            background: rgba(37,99,235,.16);
            font-weight: 600;
        }

        /* footer */
        .gv tfoot td,
        .gv tr.gv-footer td {
            font-weight: 700;
            color: var(--text, #0f172a);
            background: rgba(15,23,42,.03);
            border-bottom: 0;
        }

    /* pager (PagerStyle-CssClass="gv-pager") */
    .gv .gv-pager {
        padding: 10px 12px;
        text-align: center;
        background: rgba(15,23,42,.03);
        border-top: 1px solid var(--border, #d7e3f4);
    }

        .gv .gv-pager a {
            display: inline-block;
            margin: 0 3px;
            padding: 6px 10px;
            border-radius: 10px;
            text-decoration: none;
            color: var(--blue, #2563eb);
            border: 1px solid var(--border, #d7e3f4);
            background: var(--surface, #fff);
        }

            .gv .gv-pager a:hover {
                background: var(--rowAlt, rgba(37,99,235,.06));
            }

        .gv .gv-pager span {
            display: inline-block;
            margin: 0 3px;
            padding: 6px 10px;
            border-radius: 10px;
            background: var(--blueSoft, rgba(37,99,235,.14));
            color: var(--text, #0f172a);
            border: 1px solid var(--border, #d7e3f4);
        }

    /* optional: compact version */
    .gv.gv-compact th,
    .gv.gv-compact td {
        padding: 7px 10px;
        font-size: 12px;
    }



/*Modal Popups -------------------------*/
.mdl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9998;
}

.mdl {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    /*width: calc(100% + 10px);
    height: calc(100% + 10px);*/
    /*width: 650px;
    max-width: 95vw;
    max-height: 90vh;*/
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.mdl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-weight: 700;
}

.mdl-x {
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.mdl-body {
    padding: 14px;
}

/*.panRefundCustomerCredit {
    height: auto;
    width: auto;
}*/
/*END Modal Popups -------------------------*/


/* shared: keep tables predictable */
.gv.gv-fixed {
    table-layout: fixed;
    width: 100%;
}

/* header wrapper (non-scroll) */
.grid-head {
    overflow: hidden; /* no scrollbars */
}

/* scrollable body */
.grid-scroll {
    height: 330px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable; /* reserves scrollbar space */
}

/* make header match the body’s reserved scrollbar space */
.grid-head {
    padding-right: 16px; /* typical scrollbar width */
    box-sizing: border-box;
}

/* if you want to be extra safe on Windows, use 17px */
@supports (scrollbar-gutter: stable) {
    .grid-head {
        padding-right: 17px;
    }
}
