/* ============================================================
   PSR.css  —  Public Service Request Form
   Matches tcrsd.org design system.
   Located at: tcrsd.org/kiosk/PSR/PSR.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Georgia', Arial, sans-serif;
    background: #f4f6f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Branded header ─────────────────────────────────────────── */
.ac-header {
    background: linear-gradient(135deg, #093270 0%, #1a5c08 100%);
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.ac-header img {
    height: 72px;
    width: auto;
    background: #ffffff;
    padding: 5px 8px;
    border-radius: 6px;
}

.ac-header-text h1 {
    font-family: 'News Cycle', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.ac-header-text p {
    font-family: 'Kalam', cursive;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.72);
    margin: 0;
}

.ac-wave { line-height: 0; background: linear-gradient(135deg, #093270 0%, #1a5c08 100%); margin-top: -1px; }
.ac-wave svg { display: block; }

/* ── Main container ─────────────────────────────────────────── */
#mainContainer {
    max-width: 600px;
    margin: 24px auto 0;
    width: calc(100% - 40px);
}

/* Hide old header elements */
#mainHeaderLogo,
#mainHeaderText,
#mainHRule { display: none; }

/* ── Warning notice ─────────────────────────────────────────── */
.psr-notice {
    background: #fdeaea;
    border-left: 5px solid #9d2a2a;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: #5c1a1a;
    line-height: 1.55;
}

.psr-notice a {
    color: #9d2a2a;
    font-weight: 700;
}

/* ── Section heading pill ───────────────────────────────────── */
#fieldContainerHead {
    font-family: 'News Cycle', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #093270;
    background: #eef3fb;
    padding: 5px 14px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 14px;
}

/* ── Form card ──────────────────────────────────────────────── */
#fieldContainer,
#fieldContainer.shadow {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.09);
    padding: 28px 28px 22px;
    border-top: 4px solid #093270;
    position: relative;
}

/* ── Field layout ───────────────────────────────────────────── */
.psr-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

.psr-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.psr-field label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #093270;
    background: #eef3fb;
    padding: 3px 10px;
    border-radius: 999px;
    align-self: flex-start;
}

/* ── Inputs & textarea ──────────────────────────────────────── */
.formField {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid #d0d8e8;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fafbfd;
    color: #1a1a1a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.formField:focus {
    outline: none;
    border-color: #093270;
    box-shadow: 0 0 0 3px rgba(9,50,112,0.1);
    background: #ffffff;
}

textarea.formField {
    resize: vertical;
    min-height: 110px;
    line-height: 1.5;
}

/* ── Character counter ──────────────────────────────────────── */
.psr-char-counter {
    font-size: 0.72rem;
    color: #aaa;
    text-align: right;
    margin-top: 3px;
}

.psr-char-counter.warn { color: #d9a400; }
.psr-char-counter.over { color: #9d2a2a; font-weight: 700; }

/* ── Required asterisk ──────────────────────────────────────── */
.asterisk {
    color: #9d2a2a;
    font-weight: 700;
    font-size: 0.9rem;
}

#fieldContainerFoot {
    font-size: 0.78rem;
    color: #888;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}

/* ── Help button ────────────────────────────────────────────── */
#btnHelp {
    appearance: none;
    -webkit-appearance: none;
    background: #eef3fb;
    color: #093270;
    border: 1px solid #c8d8ee;
    padding: 7px 16px;
    border-radius: 999px;
    font-family: 'News Cycle', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    position: absolute;
    top: 14px;
    right: 14px;
    transition: background 0.15s ease;
    z-index: 10;
}

#btnHelp:hover { background: #d6e5f8; }

/* ── Button holder & submit ─────────────────────────────────── */
#btnHolder {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

#btnMain {
    appearance: none;
    -webkit-appearance: none;
    background: linear-gradient(135deg, #093270, #1a5c08);
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 999px;
    font-family: 'News Cycle', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(9,50,112,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.3px;
}

#btnMain:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(9,50,112,0.3);
}

/* ── Help panel ─────────────────────────────────────────────── */
#helpPage {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    padding: 26px 28px;
    max-width: 680px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 1000;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #3a3a3a;
    border-top: 4px solid #093270;
}

#helpPage h3 {
    font-family: 'News Cycle', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #093270;
    margin-bottom: 10px;
}

#helpPage p { margin-bottom: 10px; }
#helpPage hr { border: none; border-top: 1px solid #eaecf0; margin: 12px 0; }

/* Section label headings — use a class instead of strong so inline bold still works */
#helpPage .psr-section-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #093270;
    margin-bottom: 6px;
}

#helpPage ul {
    padding-left: 18px;
    margin: 6px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
}

#helpPage a { color: #093270; font-weight: 600; }

#btnHelpClose {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    margin: 18px auto 0;
    background: linear-gradient(135deg, #093270, #1a5c08);
    color: #ffffff;
    border: none;
    padding: 9px 28px;
    border-radius: 999px;
    font-family: 'News Cycle', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

/* ── CustomAlert dialog ─────────────────────────────────────── */
#dialogoverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 998;
}

#dialogbox {
    display: none;
    position: fixed;
    width: 600px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    z-index: 1000;
    overflow: hidden;
    max-height: 85vh;
    overflow-y: auto;
}

#dialogboxhead {
    background: linear-gradient(135deg, #093270, #1a5c08);
    color: #ffffff;
    padding: 14px 20px;
    font-family: 'News Cycle', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

#dialogboxbody {
    padding: 20px 24px;
    font-size: 0.93rem;
    color: #333;
    line-height: 1.65;
    text-align: left;
}

#dialogboxbody ul {
    padding-left: 20px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#dialogboxbody hr {
    border: none;
    border-top: 1px solid #eaecf0;
    margin: 12px 0;
}

#dialogboxfoot {
    padding: 12px 20px;
    background: #f5f7fa;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.raiseText { font-size: 0.78rem; color: #888; }

.btnAlertClose {
    appearance: none;
    -webkit-appearance: none;
    background: linear-gradient(135deg, #093270, #1a5c08);
    color: #ffffff;
    border: none;
    padding: 8px 22px;
    border-radius: 999px;
    font-family: 'News Cycle', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.btnAlertClose:hover { transform: translateY(-1px); }

/* ── Footer ─────────────────────────────────────────────────── */
.ac-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.78rem;
    color: #aaa;
    margin-top: auto;
}

.ac-footer a { color: #093270; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 560px) {
    #mainContainer { width: calc(100% - 24px); }
    #fieldContainer { padding: 20px 16px 18px; }
    #dialogbox { width: calc(100% - 40px); left: 20px !important; }
    .psr-field-row { grid-template-columns: 1fr; }
}