/* ============================================================
   Beat The Boot — shared styles
   - Centered buttons by default
   - Theme tokens (dark mode only active on app pages)
   - Public pages opt out via body.force-light
============================================================ */

:root {
    --btb-bg-start: #f5f7fa;
    --btb-bg-end:   #c3cfe2;
    --btb-card:     #ffffff;
    --btb-card-elev: 0 10px 30px rgba(0,0,0,0.1);
    --btb-text:     #2c3e50;
    --btb-muted:    #6b7280;
    --btb-border:   #e0e0e0;
    --btb-input-bg: #ffffff;
    --btb-input-border: #ddd;
    --btb-primary:  #3498db;
    --btb-primary-hover: #2980b9;
    --btb-error:    #e74c3c;
    --btb-error-bg: rgba(231, 76, 60, 0.08);
}

html[data-theme="dark"] body {
    --btb-bg-start: #0f1218;
    --btb-bg-end:   #1a1f2b;
    --btb-card:     #1c2230;
    --btb-card-elev: 0 10px 30px rgba(0,0,0,0.5);
    --btb-text:     #e7ebf3;
    --btb-muted:    #9ca3af;
    --btb-border:   #2c3444;
    --btb-input-bg: #232a3a;
    --btb-input-border: #2c3444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; padding: 0;
    background: linear-gradient(135deg, var(--btb-bg-start) 0%, var(--btb-bg-end) 100%);
    color: var(--btb-text);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.2s, color 0.2s;
}

.container {
    max-width: 900px; margin: 0 auto;
    background: var(--btb-card);
    border-radius: 12px;
    box-shadow: var(--btb-card-elev);
    padding: 40px;
    color: var(--btb-text);
}

h1, h2, h3 {
    text-align: center;
    color: var(--btb-text);
    margin-bottom: 30px;
}

main { padding: 40px; }

.errors {
    color: var(--btb-error);
    background: var(--btb-error-bg);
    list-style-type: none;
    padding: 14px 18px; margin: 15px 0;
    font-size: 15px; text-align: center;
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.25);
}
.errors li { margin: 4px 0; }

form label {
    display: block;
    margin: 22px 0 18px;
    font-weight: 600;
    color: var(--btb-text);
    font-size: 16px;
}

input, textarea, select { color: var(--btb-text); }

input {
    display: block; width: 100%;
    padding: 14px;
    border: 1px solid var(--btb-input-border);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background: var(--btb-input-bg);
    height: 50px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--btb-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.18);
}
textarea {
    width: 100%; padding: 14px;
    border: 1px solid var(--btb-input-border);
    border-radius: 8px; font-size: 16px;
    box-sizing: border-box;
    background: var(--btb-input-bg);
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="tel"],
form input[type="number"],
form input[type="date"],
form input[type="datetime-local"] {
    width: 100%; padding: 14px;
    border: 1px solid var(--btb-input-border);
    border-radius: 8px; font-size: 16px;
    box-sizing: border-box;
    background: var(--btb-input-bg);
    height: 50px;
}

form select {
    width: 100%; padding: 14px;
    border: 1px solid var(--btb-input-border);
    border-radius: 8px; font-size: 16px;
    box-sizing: border-box;
    background-color: var(--btb-input-bg);
    height: 50px; appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

/* ===== BUTTONS — centered by default ===== */
.form-actions {
    display: flex; justify-content: center; align-items: center;
    gap: 12px; margin-top: 28px; flex-wrap: wrap;
}

button, .btn-primary, .btn-secondary {
    background: var(--btb-primary);
    color: white;
    padding: 14px 44px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    min-width: 220px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1.2;
}
button:hover, .btn-primary:hover { background: var(--btb-primary-hover); }
button:active, .btn-primary:active { transform: translateY(1px); }

.btn-secondary {
    background: transparent;
    color: var(--btb-primary);
    border: 2px solid var(--btb-primary);
    padding: 12px 42px;
}
.btn-secondary:hover { background: var(--btb-primary); color: white; }

/* Form-level submit buttons auto-center as block */
form button[type="submit"],
form > button {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.checkbox-label,
.payment-option-label {
    display: flex; align-items: center;
    margin: 18px 0; font-size: 15px;
    cursor: pointer; flex-wrap: wrap;
    color: var(--btb-text);
}
.checkbox-label input[type="checkbox"],
.payment-option-label input[type="radio"] {
    width: 22px; height: 22px; margin-right: 12px;
    accent-color: var(--btb-primary);
    cursor: pointer; flex-shrink: 0;
}

.forgot-password {
    display: block; text-align: center; margin-top: 20px;
    color: var(--btb-primary); text-decoration: none; font-weight: 500;
}
.forgot-password:hover { text-decoration: underline; }

.policy-page .effective-date { text-align: center; font-style: italic; color: var(--btb-muted); margin-bottom: 20px; }
.policy-list { list-style-type: decimal; padding-left: 20px; font-size: 16px; line-height: 1.8; }
.policy-list li { margin-bottom: 40px; padding-left: 10px; }
.policy-list h2 { text-align: left; font-size: 20px; margin-bottom: 10px; color: var(--btb-primary); }
.policy-list p { margin: 10px 0; color: var(--btb-text); }
.policy-list ul { list-style-type: disc; padding-left: 30px; margin: 10px 0; }
.policy-list ul li { margin-bottom: 10px; }

.error-page { text-align: center; }
.error-page p { font-size: 18px; margin: 20px 0; }
.error-page button { margin-top: 20px; }

@media (max-width: 768px) {
    .container { max-width: 100%; padding: 20px; margin: 10px auto; }
    button, .btn-primary, .btn-secondary { width: 100%; padding: 16px; min-width: auto; }
    .policy-list { font-size: 15px; }
    .policy-list h2 { font-size: 18px; }
}

@media (max-width: 480px) {
    form label { margin: 18px 0 6px; font-size: 15px; }
    .container { max-width: 100%; padding: 15px; margin: 0 auto; }
    h1, h2, h3 { font-size: 24px; }
    .policy-list { padding-left: 10px; }
    .policy-list ul { padding-left: 20px; }
}

/* ============ HEADER SPACER ============
   The fixed header is ~64px tall. The .header-space div emitted by
   header.php takes the place of the header in the document flow.
   Force it to actually match the header's true height across breakpoints. */
.header-space { height: 72px; }
@media (max-width: 930px) { .header-space { height: 68px; } }
@media (max-width: 480px) { .header-space { height: 64px; } }

/* ============================================================
   FOOTER — simple, professional, works on every screen size
   ============================================================ */
.btb-footer {
    background: #0f1620;
    color: #94a3b8;
    margin-top: 80px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.btb-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 24px;
}

/* Top row: logo on the left, nav links on the right */
.btb-footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}
.btb-footer-brand {
    display: inline-flex;
    align-items: center;
}
.btb-footer-brand img {
    height: 40px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: opacity 0.2s;
}
.btb-footer-brand:hover img { opacity: 1; }

.btb-footer-nav {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}
.btb-footer-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}
.btb-footer-nav a:hover { color: #6dd5fa; }

/* Bottom row: copyright + credit */
.btb-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 22px;
    flex-wrap: wrap;
}
.btb-footer-bottom p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
}
.btb-footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.btb-footer-credit:hover { background: rgba(255, 255, 255, 0.05); color: #cbd5e1; }
.btb-footer-credit img {
    height: 22px;
    width: auto;
    display: block;
}

/* Tablet & mobile */
@media (max-width: 640px) {
    .btb-footer-inner { padding: 32px 20px 20px; }
    .btb-footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .btb-footer-nav {
        justify-content: center;
        gap: 20px 28px;
    }
    .btb-footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
}
