/*
 * ================================================================================
 *  Website:      SubmitVault.app
 *  File:         Shared Stylesheet
 *  Location:     public/assets/css/submitvault.css
 *
 *  Version:      0.2
 *  Last Updated: 14-05-2026
 *
 *  Purpose: Shared styles used across all pages. Page-specific styles remain in each file.
 *           Brand-specific CSS vars (--primary, --secondary) are set per page.
 *
 *  Changelog:
 *    - v0.2 (14-05-2026) : Added default SubmitVault colour --sv-brand-colour
 *    - v0.1 (04-05-2026): Initial version
 * ================================================================================
 */

:root {
    --sv-brand-colour: #0a5a8a;
}

/* ----------------------------------------------------------------
   Reset
---------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ----------------------------------------------------------------
   Base
---------------------------------------------------------------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f4f4;
    color: #333;
    font-size: 0.875rem;
}

/* ----------------------------------------------------------------
   Header
---------------------------------------------------------------- */
header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.7rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
header img { height: 36px; width: auto; }
header img.sv-logo { height: 44px; width: auto; }
header span.sv-tagline {
    font-size: 0.7rem;
    color: #333;
    font-style: italic;
}
.header-tagline {
    font-size: 1.2rem;
    color: #222;
    font-weight: 600;
}

/* ----------------------------------------------------------------
   Footer
---------------------------------------------------------------- */
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #aaa;
}
footer a { color: #aaa; text-decoration: none; }

/* ----------------------------------------------------------------
   Cards
---------------------------------------------------------------- */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin-bottom: 1.2rem;
}
.card h2 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ----------------------------------------------------------------
   Agree to Terms checkbox
---------------------------------------------------------------- */
.terms-check { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.2rem; font-size: 0.85rem; color: #555; line-height: 1.5; }
.terms-check input[type="checkbox"] { margin-top: 0.15rem; flex-shrink: 0; accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.terms-check label { cursor: pointer; }
.terms-check a { color: var(--primary); text-decoration: none; }
.terms-check a:hover { text-decoration: underline; }
.terms-check.error-highlight label { color: #c62828; }

/* ----------------------------------------------------------------
   Form fields
---------------------------------------------------------------- */
.field { margin-bottom: 1rem; }
.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.3rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--sv-brand-colour);
}
.field textarea { resize: vertical; min-height: 80px; }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.form-group { flex: 1; min-width: 160px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; margin-bottom: 0.25rem; color: #555; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; padding: 0.45rem 0.65rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.875rem; font-family: inherit; }
.form-group input[type="color"] { padding: 0.2rem; height: 36px; }
.form-group textarea { min-height: 70px; resize: vertical; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 0.8rem; }

.actions-col { display: flex; gap: 0.3rem; align-items: center; }
.actions-center { justify-content: center; }

/* ----------------------------------------------------------------
   Buttons
---------------------------------------------------------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.82rem;
    cursor: pointer;
    border: none;
    background: var(--sv-brand-colour);
    color: #fff;
    text-decoration: none;
    font-family: inherit;
}
.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.82rem;
    cursor: pointer;
    border: none;
    background: #1e7e34;
    color: #fff;
    font-family: inherit;
}
.btn-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    background: #e67e00;
    color: #fff;
    text-decoration: none;
    font-family: inherit;
}
.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.82rem;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    text-decoration: none;
    font-family: inherit;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    border: none;
    background: var(--sv-brand-colour);
    color: #fff;
    text-decoration: none;
    font-family: inherit;
}
.btn-login {
    width: 100%;
    padding: 0.65rem;
    background: var(--sv-brand-colour);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
}
.btn-login:hover { background: #084a72; }

/* ----------------------------------------------------------------
   Alert boxes
---------------------------------------------------------------- */
.error {
    background: #fce8e6;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.success {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #34a853;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
/*.msg {
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #34a853;
    font-size: 0.875rem;
    word-break: break-all;
}

/* ----------------------------------------------------------------
   Badges
---------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    font-size: 0.675rem;
    font-weight: 500;
}
.badge-green { background: #e6f4ea; color: #1e7e34; }
.badge-red   { background: #fce8e6; color: #c62828; }
.badge-grey  { background: #f0f0f0; color: #666; }

/* ----------------------------------------------------------------
   Login box (login + reset-password pages)
---------------------------------------------------------------- */
.login-box {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 380px;
}
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo img { height: 44px; width: auto; }
.login-logo p {
    font-size: 0.65rem;
    color: #333;
    font-style: italic;
}
.login-box h2 {
    font-size: 1rem;
    color: #1a1a2e;
    margin-bottom: 1.2rem;
    text-align: center;
    display: block;
}
.remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #555;
    margin-bottom: 1.2rem;
}
.remember input { width: 16px; height: 16px; cursor: pointer; }
.back-link { text-align: center; margin-top: 1rem; font-size: 0.82rem; }
.back-link a { color: var(--sv-brand-colour); text-decoration: none; }

/* ----------------------------------------------------------------
   Landing page
---------------------------------------------------------------- */
.landing-tagline {
    font-size: 1rem;
    color: #aaa;
    font-style: italic;
    margin-bottom: 1.5rem;
}
.landing-body {
    font-size: 1.1rem;
    color: #666;
    max-width: 480px;
    margin: 0 auto;
}

/* ----------------------------------------------------------------
   Toast notifications
---------------------------------------------------------------- */
#message-container { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: 90%; max-width: 400px; pointer-events: none; }
.toast { background: #fff; border-radius: 8px; padding: 16px 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; width: 100%; transform: translateY(-150px); opacity: 0; transition: all 0.3s ease; pointer-events: all; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-left: 4px solid #1e7e34; }
.toast-warning { border-left: 4px solid #e67e00; }
.toast-error { border-left: 4px solid #c62828; }
.toast-icon { font-size: 1.1rem; font-weight: bold; flex-shrink: 0; }
.toast-success .toast-icon { color: #1e7e34; }
.toast-warning .toast-icon { color: #e67e00; }
.toast-error .toast-icon { color: #c62828; }
.toast-text { font-weight: 500; color: #1a202c; font-size: 0.875rem; flex: 1; }

.btn-toast-yes { padding: 0.3rem 0.7rem; background: #1e7e34; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 0.8rem; margin-left: 0.3rem; font-family: inherit; }
.btn-toast-no { padding: 0.3rem 0.7rem; background: #e0e0e0; color: #333; border: none; border-radius: 4px; cursor: pointer; font-size: 0.8rem; font-family: inherit; }
