/* ===================================
   css/forms.css
   Contact page form styles — elite dark-mode glassmorphic theme.
   Upgraded to match the premium dark cosmic aesthetic of index.html.

   Link this file on pages that use the contact inquiry form:
     - contact.html  ← currently the only consumer
   =================================== */

/* ── Form Wrapper Box ── */
.inquiry-form-box {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.inquiry-form-box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.inquiry-form-box h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2rem 0;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Form Groups ── */
.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* For modern browsers' datepicker in dark mode */
.form-group input[type="date"] {
    color-scheme: dark;
}

/* Custom styling for options dropdown */
.form-group select option {
    background: #111827;
    color: #ffffff;
    padding: 0.5rem;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12), 0 0 12px rgba(59, 130, 246, 0.18);
    background: rgba(15, 23, 42, 0.75);
}

/* Invalid state */
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15), 0 0 12px rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.02);
}

/* Field-level error message */
.field-error {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: none;
    font-weight: 500;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Honeypot — hidden from humans, visible to bots */
.hp-field {
    display: none !important;
}

/* ── Submit Button — SaaS Blue ── */
.submit-btn {
    width: 100%;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, #006BFF 0%, #0052D9 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 52px;
    box-shadow: 0 10px 24px rgba(0, 107, 255, 0.25);
    letter-spacing: 0.01em;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1a7bff 0%, #0063f0 100%);
    box-shadow: 0 14px 32px rgba(0, 107, 255, 0.42);
    border-color: rgba(255, 255, 255, 0.2);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

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

/* ── Loading Spinner ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    display: none;
}

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

/* ── Form Feedback Messages ── */
.form-feedback {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    display: none;
}

.form-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.form-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

/* ── Form Footer Note ── */
.form-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ── WhatsApp Fallback Link ── */
.whatsapp-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.9rem;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: 50px;
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.05);
}

.whatsapp-fallback:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.35);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.15);
    transform: translateY(-1px);
}

/* ── Response-time trust message ── */
.form-response-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #34d399;
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.form-response-time strong {
    font-weight: 700;
    color: #6ee7b7;
}

/* ── Input icon wrapper ── */
.input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    pointer-events: none;
    flex-shrink: 0;
    z-index: 1;
    transition: color 0.25s ease;
}

/* Push text right to clear the icon */
.input-icon-wrap input,
.input-icon-wrap select,
.input-icon-wrap textarea {
    padding-left: 2.6rem;
    width: 100%;
}

/* Icon brightens on focus */
.input-icon-wrap:focus-within .input-icon {
    color: #60a5fa;
}

/* ── Trust Row below submit button ── */
.form-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.form-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.form-trust-row svg {
    color: #34d399;
    flex-shrink: 0;
}

/* ── Mobile optimization ── */
@media (max-width: 640px) {
    .form-trust-row { gap: 0.5rem 0.85rem; }
    .form-response-time { font-size: 0.8rem; }
    .inquiry-form-box { padding: 2rem 1.25rem; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 1rem; } /* Prevents iOS zoom on focus */
}
