/* ═══════════════════════════════════════════════════════════
   G21 Form Enhancements — Validation, Loader, Success State
   ═══════════════════════════════════════════════════════════ */

/* ── Field-level error messages ─────────────────────────── */
.g21-field-error {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 5px;
    font-family: "Manrope", sans-serif;
    font-weight: 500;
}

.form-clt input.is-invalid,
.form-clt textarea.is-invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12) !important;
    outline: none !important;
}

/* Dark-background context (CTA section) */
.contact-section .g21-field-error {
    color: #ff9999;
}

/* ── Server-level error banner ──────────────────────────── */
.g21-server-error {
    background: #fdf2f2;
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #c0392b;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 18px;
    font-family: "Manrope", sans-serif;
    line-height: 1.5;
}

.contact-section .g21-server-error {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.35);
    color: #ffbbbb;
}

/* ── Submit button spinner ──────────────────────────────── */
.g21-btn-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: g21spin 0.65s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
    flex-shrink: 0;
}

@keyframes g21spin {
    to { transform: rotate(360deg); }
}

/* ── Success message ────────────────────────────────────── */
.g21-success-msg {
    display: none;
    text-align: center;
    padding: 48px 24px;
    animation: g21fadeUp 0.45s ease both;
}

@keyframes g21fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.g21-success-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Animated checkmark SVG */
.g21-success-inner svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.g21-success-inner svg circle {
    fill: none;
    stroke: #27ae60;
    stroke-width: 2;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: g21drawCircle 0.55s ease forwards 0.1s;
}

.g21-success-inner svg path {
    fill: none;
    stroke: #27ae60;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 38;
    stroke-dashoffset: 38;
    animation: g21drawCheck 0.4s ease forwards 0.55s;
}

@keyframes g21drawCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes g21drawCheck {
    to { stroke-dashoffset: 0; }
}

.g21-success-inner h4 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a2e;
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.5px;
}

.g21-success-inner p {
    font-size: 15px;
    color: #555;
    font-family: "Manrope", sans-serif;
    line-height: 1.65;
    margin: 0;
    max-width: 380px;
}

/* Dark-background context (CTA section) */
.contact-section .g21-success-inner h4 {
    color: #fff;
}

.contact-section .g21-success-inner p {
    color: rgba(255, 255, 255, 0.75);
}

.contact-section .g21-success-inner svg circle,
.contact-section .g21-success-inner svg path {
    stroke: #d4a855;
}
