/* ============================================================
   LEP – Learning Enhancement Program
   Minimal custom styles (prefer Bootstrap classes)
   ============================================================ */

:root {
    --primary-green: #006400;
    --primary-green-light: #228B22;
    --accent-orange: #FF6600;
    --header-gradient: linear-gradient(135deg, #006400, #228B22);
}

body {
    background-color: #f4f6f8;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
.gov-header {
    background: var(--header-gradient);
    color: #fff;
    padding: 1.25rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-box {
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 56px;
}

.logo-box img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-fallback {
    font-size: 1.8rem;
    color: var(--primary-green);
    align-items: center;
    justify-content: center;
}

.gov-title {
    font-size: 0.85rem;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.dept-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2px;
}

/* ── Section headers ── */
.section-header {
    background-color: #e8f5e9;
    border-left: 5px solid var(--primary-green);
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    font-weight: 600;
    color: var(--primary-green);
}

/* ── Cards ── */
.lep-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* ── Project Information card ── */
#projectInfoCard {
    border-left: 4px solid var(--primary-green);
}

/* ── Task cards ── */
.task-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    transition: box-shadow 0.2s;
}

.task-card:hover {
    box-shadow: 0 4px 14px rgba(0, 100, 0, 0.08);
}

.task-number-badge {
    background: var(--primary-green);
    color: #fff;
    font-weight: 700;
    min-width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

/* ── Required asterisk ── */
.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* ── Success box ── */
.success-box {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.submission-id {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: 1.5px;
}

/* ── Footer ── */
.lep-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    background: #343a40;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* ── Spinner overlay for AJAX ── */
.ajax-loading {
    opacity: 0.55;
    pointer-events: none;
}


/* ── Readable body text (Objective + Task descriptions) ── */
/* Matches Programme Information comfort size; darker for contrast */
.lep-readable-text {
    font-size: 1.0625rem;   /* ~17px at default 16px root */
    line-height: 1.6;
    color: #37474f;         /* blue-grey / charcoal */
    font-weight: 400;
    white-space: pre-line;  /* preserve source line breaks when present */
}

#projectObjective.lep-readable-text {
    margin-top: 0.15rem;
}

.task-description.lep-readable-text {
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    .lep-readable-text {
        font-size: 1rem;    /* ~16px on small screens */
        line-height: 1.55;
    }
}


/* ── Project Information field labels (+~1.5pt vs Bootstrap small) ── */
.lep-field-label {
    font-size: 0.95rem;      /* ~15.2px; was ~0.875rem / 14px */
    font-weight: 600;
    color: #546e7a;
    letter-spacing: 0.01em;
    margin-bottom: 0.15rem;
}

#projectTitle {
    color: #1b5e20;
    line-height: 1.35;
}

#projectDuration {
    font-size: 1.05rem;
    color: #37474f;
}

/* ── Completed? label ── */
.lep-completed-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #37474f;
}

/* ── Yes / No radio options – larger, clearer hit target ── */
.lep-radio-option {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 5.5rem;
    padding: 0.45rem 0.9rem;
    margin: 0;
    background: #f8f9fa;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.lep-radio-option:hover {
    border-color: #81c784;
    background: #f1f8f2;
}

.lep-radio-option .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0;
    margin-left: 0;
    cursor: pointer;
    border: 2px solid #78909c;
    background-color: #fff;
    flex-shrink: 0;
}

.lep-radio-option .form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.lep-radio-option .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 100, 0, 0.2);
    border-color: var(--primary-green);
}

.lep-radio-option .form-check-label {
    font-size: 1rem;
    font-weight: 600;
    color: #37474f;
    cursor: pointer;
    padding-left: 0;
    margin: 0;
}

/* When radio is checked, soft green tint on the option chip */
.lep-radio-option:has(.form-check-input:checked) {
    background: #e8f5e9;
    border-color: var(--primary-green);
}

/* ── Mobile tweaks ── */
@media (max-width: 576px) {
    .app-title {
        font-size: 1.05rem;
    }
    .gov-title, .dept-title {
        font-size: 0.8rem;
    }
}


/* ── Certificate of Submission (v1.7 compact mobile-first) ── */
.certificate-wrap {
    max-width: 900px;
    width: 100%;
}

.certificate-card {
    background: #fff;
    border: 2px solid var(--primary-green);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 80, 0, 0.1);
}

.certificate-inner {
    padding: 0.75rem 1rem 0.65rem;
}

/* Logo + heading side-by-side on wider screens */
.certificate-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.certificate-logo {
    max-height: 52px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.certificate-brand-text {
    text-align: center;
}

.certificate-heading {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

.certificate-subhead {
    font-size: 0.88rem;
    font-weight: 600;
    color: #455a64;
    margin: 0.1rem 0 0;
    line-height: 1.25;
}

.certificate-ack {
    font-size: 0.82rem;
    line-height: 1.4;
    color: #546e7a;
    text-align: center;
    margin: 0.35rem auto 0.45rem;
    max-width: 36rem;
}

/* NAME ........ value with dotted underline */
.cert-name-line {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    border-bottom: 1.5px dotted #90a4ae;
    padding: 0.15rem 0 0.35rem;
    margin: 0 0 0.45rem;
}

.cert-name-line .cert-inline-label {
    flex: 0 0 auto;
}

.cert-name-value {
    flex: 1 1 auto;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #212529; /* dark – not green */
    line-height: 1.25;
    word-break: break-word;
    padding-right: 2.5rem; /* optical centre vs left label */
}

/* Compact info rows */
.cert-compact-rows {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.cert-row-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 1rem;
    align-items: baseline;
    line-height: 1.35;
}

.cert-pair {
    flex: 1 1 10rem;
    min-width: 0;
}

.cert-pair-full {
    flex: 1 1 100%;
}

.cert-inline-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cert-inline-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #263238;
    word-break: break-word;
}

.cert-sid {
    color: #1b5e20;
    letter-spacing: 0.04em;
}

.cert-row-sid {
    margin-top: 0.2rem;
    padding: 0.35rem 0.55rem;
    background: #f1f8f2;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
}

.certificate-footer-note {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #90a4ae;
    text-align: center;
    margin: 0.45rem auto 0;
    max-width: 38rem;
}

/* Desktop: slightly more room, still compact */
@media (min-width: 768px) {
    .certificate-inner {
        padding: 0.9rem 1.5rem 0.75rem;
    }
    .certificate-logo {
        max-height: 64px;
        max-width: 150px;
    }
    .certificate-heading {
        font-size: 1.35rem;
        text-align: left;
    }
    .certificate-subhead {
        font-size: 0.95rem;
        text-align: left;
    }
    .certificate-brand-text {
        text-align: left;
    }
    .certificate-brand {
        justify-content: flex-start;
        gap: 1rem;
    }
    .cert-name-value {
        font-size: 1.25rem;
    }
    .cert-inline-value {
        font-size: 0.95rem;
    }
    .cert-pair {
        flex: 1 1 14rem;
    }
}

/* Very narrow phones: keep pairs side-by-side when possible */
@media (max-width: 400px) {
    .certificate-logo {
        max-height: 44px;
        max-width: 100px;
    }
    .certificate-heading {
        font-size: 1.05rem;
    }
    .cert-name-value {
        font-size: 1.05rem;
        padding-right: 0;
    }
    .cert-inline-value {
        font-size: 0.85rem;
    }
    .cert-pair {
        flex: 1 1 8rem;
    }
}
