/* ============================================================
   AE Forms — Shared premium form styling — Arusha Excursions
   One consistent field/button/spacing language, reused across the
   contact page, tour booking forms, and destination enquiry forms.
   Each form adapts light/dark via .is-dark, and its own field set,
   but the underlying feel — spacing, radii, focus states, motion —
   is the same everywhere.
   ============================================================ */

.ae-form-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.25rem;
    box-shadow: 0 24px 60px rgba(13, 48, 52, 0.14), 0 4px 16px rgba(13, 48, 52, 0.06);
}

.ae-form-card.is-dark {
    background: var(--bs-primary, #0d3034);
    color: #fff;
}

@media (max-width: 575.98px) {
    .ae-form-card {
        padding: 1.5rem 1.25rem;
        border-radius: 1.15rem;
    }
}

.ae-form-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--bs-primary, #0d3034);
}

.ae-form-card.is-dark .ae-form-title {
    color: #fff;
}

/* ---------- Field grid ---------- */
.ae-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1rem;
}

.ae-form-grid .ae-span-2 {
    grid-column: 1 / -1;
}

@media (max-width: 575.98px) {
    .ae-form-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}

/* ---------- Fields ---------- */
.ae-field {
    position: relative;
}

.ae-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #9aa5a4;
    pointer-events: none;
    z-index: 2;
}

.ae-form-card.is-dark .ae-field-icon {
    color: rgba(255, 255, 255, 0.55);
}

.ae-field .form-control,
.ae-field .form-select {
    height: 54px;
    padding-left: 40px;
    padding-top: 1.1rem;
    border-radius: 0.85rem;
    border: 1.5px solid #e5e9e8;
    font-size: 14.5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ae-field textarea.form-control {
    height: auto;
    min-height: 110px;
    padding-top: 1.5rem;
    resize: vertical;
}

.ae-field > label {
    position: absolute;
    left: 40px;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0;
    font-size: 14.5px;
    color: #8a9493;
    pointer-events: none;
    transition: all 0.15s ease;
    transform-origin: left top;
}

.ae-field textarea ~ label {
    top: 14px;
    height: auto;
    align-items: flex-start;
}

.ae-field .form-control:focus ~ label,
.ae-field .form-control:not(:placeholder-shown) ~ label,
.ae-field .form-select ~ label {
    transform: translateY(-11px) scale(0.78);
    color: var(--bs-primary, #0d3034);
    background: transparent;
}

.ae-form-card.is-dark .ae-field > label {
    color: rgba(255, 255, 255, 0.6);
}

.ae-form-card.is-dark .ae-field .form-control:focus ~ label,
.ae-form-card.is-dark .ae-field .form-control:not(:placeholder-shown) ~ label {
    color: #fff;
}

.ae-field .form-select {
    padding-top: 0;
}

.ae-field .form-select ~ label {
    transform: translateY(-11px) scale(0.78);
    background: transparent;
}

.ae-form-card.is-dark .ae-field .form-control,
.ae-form-card.is-dark .ae-field .form-select {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.ae-form-card.is-dark .ae-field .form-control::placeholder {
    color: transparent;
}

.ae-field .form-control:focus,
.ae-field .form-select:focus {
    border-color: var(--bs-primary, #0d3034);
    box-shadow: 0 0 0 3px rgba(13, 48, 52, 0.1);
}

.ae-form-card.is-dark .ae-field .form-control:focus,
.ae-form-card.is-dark .ae-field .form-select:focus {
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.ae-country-hint {
    font-size: 12px;
    color: #8a9493;
    margin: -0.4rem 0 0;
}

.ae-form-card.is-dark .ae-country-hint {
    color: rgba(255, 255, 255, 0.55);
}

/* ---------- Submit button ---------- */
.ae-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 0.95rem 1.5rem;
    margin-top: 0.5rem;
    background: var(--bs-primary, #0d3034);
    color: #fff;
    border: none;
    border-radius: 0.85rem;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    box-shadow: 0 10px 24px rgba(13, 48, 52, 0.25);
}

.ae-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(13, 48, 52, 0.32);
}

.ae-btn-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.ae-form-card.is-dark .ae-btn-submit {
    background: #fff;
    color: var(--bs-primary, #0d3034);
}

.ae-btn-submit svg {
    width: 17px;
    height: 17px;
}

/* ---------- Success state ---------- */
.ae-form-success {
    text-align: center;
    padding: 1.5rem 0;
    animation: ae-form-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ae-form-success-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(13, 48, 52, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ae-form-card.is-dark .ae-form-success-icon {
    background: rgba(255, 255, 255, 0.14);
}

.ae-form-success-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--bs-primary, #0d3034);
}

.ae-form-card.is-dark .ae-form-success-icon svg {
    stroke: #fff;
}

.ae-form-success h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    color: var(--bs-primary, #0d3034);
}

.ae-form-card.is-dark .ae-form-success h3 {
    color: #fff;
}

.ae-form-success p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.ae-form-card.is-dark .ae-form-success p {
    color: rgba(255, 255, 255, 0.75);
}

@keyframes ae-form-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Honeypot ---------- */
.cf-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .ae-form-success {
        animation: none !important;
    }
}
