@import url("brand/brand.css");

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--brand-font);
    background: var(--brand-cream);
    color: var(--brand-text);
}

header.site {
    background: var(--brand-navy);
    color: #fff;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

header.site img.logo { height: 44px; width: 44px; display: block; }

header.site .titles { line-height: 1.15; }
header.site .titles .club { font-size: 0.85rem; opacity: 0.85; }
header.site .titles .app  { font-size: 1.1rem; font-weight: bold; }

header.site nav { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
header.site nav a { color: #fff; text-decoration: none; font-size: 0.95rem; }
header.site nav a:hover { color: var(--brand-gold-light); text-decoration: underline; }

main.container {
    max-width: 780px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

/* Pages built around a wide table (member/rota lists) need more room than a form does. */
main.container.wide {
    max-width: 1180px;
}

/* Table wrapper so a wide table scrolls horizontally on narrow screens instead of
   forcing the whole page wider (never let the page itself scroll sideways). */
.table-scroll {
    overflow-x: auto;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

h1, h2, h3 { color: var(--brand-navy); }

label { display: block; margin: 0.9rem 0 0.3rem; font-weight: bold; font-size: 0.9rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"], select {
    width: 100%;
    padding: 0.55rem 0.6rem;
    border: 1px solid #c9c2b3;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

button, .btn {
    display: inline-block;
    background: var(--brand-navy);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
    white-space: nowrap;
}
button:hover, .btn:hover { background: var(--brand-orange); }
button:disabled { background: #c9c2b3; cursor: not-allowed; }

/* Standalone submit button below a stack of label+input fields. */
.btn-submit { margin-top: 1.2rem; }

/* Small inline action button, e.g. inside a table row. */
.btn-compact { padding: 0.3rem 0.7rem; font-size: 0.85rem; }

/* A form that should sit inline (e.g. one action per table cell) rather than as a block. */
.inline-form { display: inline; }

/* A form laying out several controls side by side in one table cell/row. */
.row-form { display: flex; gap: 0.5rem; align-items: center; }
.select-inline { width: auto; }
.form-row { display: flex; gap: 0.5rem; align-items: flex-end; }
.form-row > * { flex: 1; }

.btn-secondary { background: #8a8474; }
.btn-secondary:hover { background: #6f6a5c; }

.flash {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.flash.error   { background: #f8d7da; color: #58151c; }
.flash.success { background: #d3f0dd; color: #0f4a26; }

table.rota { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table.rota th, table.rota td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid #e5ddc9; vertical-align: middle; }
table.rota th { color: var(--brand-navy); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.rota tr.today { background: #fff6da; }
table.rota tr.swapped td.who { color: var(--brand-orange); font-weight: bold; }

.helptext { font-size: 0.85rem; color: #6b6455; margin-top: 0.3rem; }

footer.site { text-align: center; font-size: 0.8rem; color: #6b6455; padding: 2rem 1rem; }

/* Custom confirm() replacement — see assets/confirm.js */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 48, 117, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.confirm-box {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 26rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.confirm-box p { margin: 0 0 1.25rem; font-size: 1rem; line-height: 1.4; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.confirm-actions button { margin: 0; }
