/* ============================================================
   agsa-support.css
   Certificate Support – Learner Support page styles
   Palette: #1f2937 | #059652 | #df1529 | #ffffff | #0f2943
   ============================================================ */

/* ---------- Scoped "reset" for the support page only ---------- */
.agsa-support,
.agsa-support *,
.agsa-support *::before,
.agsa-support *::after {
    box-sizing: border-box;
}

.agsa-support {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #1f2937;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   HERO
   ============================================================ */
.agsa-hero {
    background: linear-gradient(135deg, #0f2943 0%, #1f2937 100%);
    color: #ffffff;
    padding: 60px 24px 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.agsa-hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, #059652, #df1529, #059652);
    opacity: 0.9;
}

.agsa-hero__inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.agsa-hero__eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #059652 !important;
    margin-bottom: 12px;
}

/* Hero title – forced white so main.css can't override */
.agsa-hero__title,
.agsa-support .agsa-hero__title,
.agsa-support .agsa-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    line-height: 1.15;
    color: #ffffff !important;
}

/* Hero lead paragraph – forced white */
.agsa-hero__lead,
.agsa-support .agsa-hero__lead,
.agsa-support .agsa-hero p.agsa-hero__lead {
    font-size: 1.05rem;
    opacity: 1 !important;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.65;
    color: #ffffff !important;
}

/* ============================================================
   MAIN + CARD
   ============================================================ */
.agsa-main {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px 60px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.agsa-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 41, 67, 0.12);
    border-top: 4px solid #059652;
    overflow: hidden;
}

.agsa-card__head {
    padding: 30px 34px 0;
}

.agsa-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f2943;
    letter-spacing: -0.2px;
}

/* Card subtitle – green */
.agsa-card__sub {
    font-size: 0.88rem;
    color: #059652;
    margin-top: 4px;
    margin-bottom: 22px;
}

/* Asterisk – leave red, do not touch */
.agsa-req { color: #df1529; font-weight: 700; }

/* ============================================================
   FORM
   ============================================================ */
.agsa-support form {
    padding: 0 34px 34px;
}

.agsa-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.agsa-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.agsa-form__group {
    display: flex;
    flex-direction: column;
}
.agsa-form__group--full { grid-column: 1 / -1; }

.agsa-form__label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f2943;
    margin-bottom: 6px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.agsa-form__input,
.agsa-form__select {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1f2937;
    background: #ffffff;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

/* Placeholder – green */
.agsa-form__input::placeholder {
    color: #059652;
    opacity: 1;
}
.agsa-form__input::-webkit-input-placeholder { color: #059652; opacity: 1; }
.agsa-form__input::-moz-placeholder          { color: #059652; opacity: 1; }
.agsa-form__input:-ms-input-placeholder      { color: #059652; opacity: 1; }

.agsa-form__input:hover,
.agsa-form__select:hover {
    border-color: #9ca3af;
}

.agsa-form__input:focus,
.agsa-form__select:focus {
    border-color: #059652;
    box-shadow: 0 0 0 4px rgba(5, 150, 82, 0.14);
    background: #ffffff;
}

.agsa-form__input.error,
.agsa-form__select.error {
    border-color: #df1529;
    box-shadow: 0 0 0 4px rgba(223, 21, 41, 0.12);
}

.agsa-form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230f2943' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    cursor: pointer;
}

/* Hint text under inputs – green */
.agsa-form__hint {
    font-size: 0.75rem;
    color: #059652;
    margin-top: 5px;
    line-height: 1.4;
}

/* Note at the bottom of the form – green */
.agsa-form__note {
    font-size: 0.78rem;
    color: #059652;
    margin-top: 18px;
    text-align: center;
    line-height: 1.55;
    padding-top: 16px;
    border-top: 1px dashed #e5e7eb;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.agsa-progress {
    display: none;
    margin: 22px 0 4px;
    padding: 4px 0;
}
.agsa-progress.active {
    display: block;
    animation: agsaFadeIn 0.3s ease-out;
}

@keyframes agsaFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.agsa-progress__track {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
}

.agsa-progress__bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0f2943, #059652);
    border-radius: 50px;
    transition: width 0.2s ease-out;
    position: relative;
}

.agsa-progress__bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: agsaShimmer 1.2s infinite;
}

@keyframes agsaShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.agsa-progress__text {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f2943;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.agsa-submit {
    width: 100%;
    padding: 15px 28px;
    background: #0f2943;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.agsa-submit:hover:not(:disabled) {
    background: #059652;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(5, 150, 82, 0.35);
}
.agsa-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(5, 150, 82, 0.25);
}
.agsa-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}
.agsa-submit svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.agsa-notification {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 3000;
    max-width: 420px;
    width: calc(100% - 60px);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    padding: 18px 20px;
    align-items: flex-start;
    gap: 14px;
    border-left: 5px solid;
    animation: agsaNotifIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.agsa-notification.active { display: flex; }

@keyframes agsaNotifIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.agsa-notification.closing {
    animation: agsaNotifOut 0.35s ease-in forwards;
}
@keyframes agsaNotifOut {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(120%); opacity: 0; }
}

.agsa-notification--success {
    background: #ecfdf5;
    border-left-color: #059652;
    color: #064e3b;
}
.agsa-notification--error {
    background: #fef2f2;
    border-left-color: #df1529;
    color: #7f1d1d;
}

.agsa-notification__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}
.agsa-notification--success .agsa-notification__icon {
    background: #059652;
    color: #ffffff;
}
.agsa-notification--error .agsa-notification__icon {
    background: #df1529;
    color: #ffffff;
}

.agsa-notification__content { flex: 1; min-width: 0; }

.agsa-notification__title {
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 3px;
    letter-spacing: 0.2px;
}

.agsa-notification__msg {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
    word-wrap: break-word;
}

.agsa-notification__code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 6px;
}

.agsa-notification__dismiss {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.agsa-notification__dismiss:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.08);
    transform: rotate(90deg);
}
.agsa-notification__dismiss svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.agsa-notification__countdown {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.35;
    width: 100%;
    transform-origin: left;
    animation: agsaCountdown 6s linear forwards;
}

@keyframes agsaCountdown {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ============================================================
   RESPONSIVE – TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
    .agsa-hero        { padding: 50px 20px 60px; }
    .agsa-hero__title { font-size: 2rem; }
    .agsa-hero__lead  { font-size: 1rem; }

    .agsa-main        { padding: 0 20px 50px; }
    .agsa-card__head  { padding: 26px 26px 0; }
    .agsa-support form { padding: 0 26px 28px; }
}

/* ============================================================
   RESPONSIVE – MOBILE (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
    .agsa-hero        { padding: 40px 18px 55px; }
    .agsa-hero__title { font-size: 1.65rem; }
    .agsa-hero__lead  { font-size: 0.95rem; }

    .agsa-main        { padding: 0 16px 40px; margin-top: -30px; }

    .agsa-card        { border-radius: 12px; }
    .agsa-card__head  { padding: 22px 20px 0; }
    .agsa-card__title { font-size: 1.25rem; }
    .agsa-support form { padding: 0 20px 24px; }

    .agsa-form__row   { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
    .agsa-form__input,
    .agsa-form__select { padding: 12px 14px; font-size: 0.9rem; }

    .agsa-submit      { padding: 14px 22px; font-size: 0.92rem; }

    .agsa-notification {
        bottom: 14px;
        right: 14px;
        left: 14px;
        width: auto;
        max-width: none;
    }
}

/* ============================================================
   RESPONSIVE – SMALL MOBILE (≤ 380px)
   ============================================================ */
@media (max-width: 380px) {
    .agsa-hero__title { font-size: 1.4rem; }
    .agsa-hero__lead  { font-size: 0.88rem; }

    .agsa-card__head  { padding: 18px 16px 0; }
    .agsa-support form { padding: 0 16px 20px; }
    .agsa-form__label { font-size: 0.72rem; }
    .agsa-form__input,
    .agsa-form__select { padding: 11px 12px; font-size: 0.85rem; }

    .agsa-submit      { font-size: 0.85rem; padding: 13px 18px; }
}

/* ============================================================
   RESPONSIVE – EXTRA-LARGE (≥ 1400px)
   ============================================================ */
@media (min-width: 1400px) {
    .agsa-hero          { padding: 80px 24px 90px; }
    .agsa-hero__title   { font-size: 2.8rem; }
    .agsa-hero__lead    { font-size: 1.15rem; }

    .agsa-main          { max-width: 960px; }
    .agsa-card__head    { padding: 36px 42px 0; }
    .agsa-support form  { padding: 0 42px 42px; }
    .agsa-form__row     { gap: 22px; margin-bottom: 22px; }
}