/*
 * Contact form shared by index.php and contact.php (behaviour: assets/js/contact-form.js).
 *
 *  - .cf-toast*  : success / error messages (both pages)
 *  - .cf ...     : the form's look on pages without Tailwind (contact.php).
 *                  index.php styles its form with Tailwind classes instead.
 */

/* ---------------- Toasts ---------------- */
.cf-toasts {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 384px;
    pointer-events: none;
}
.cf-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
    font-family: 'Plus Jakarta Sans', arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    pointer-events: auto;
}
.cf-toast-success { border-color: #bbf7d0; background: #f0fdf4; color: #14532d; }
.cf-toast-error   { border-color: #fecaca; background: #fef2f2; color: #7f1d1d; }
.cf-toast-body { flex: 1; }
.cf-toast p { margin: 0; padding: 0; }
.cf-toast-title { font-weight: 600; }
.cf-toast-text { margin-top: 2px !important; opacity: .8; }
.cf-toast-close {
    border: 0;
    background: none;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: .6;
}
.cf-toast-close:hover { opacity: 1; }

/* ---------------- Form (pages without Tailwind) ---------------- */
.cf {
    clear: both;
    margin: 0 3%;
    padding: 24px 0 8px;
    border-top: 1px solid #e2e8f0;
    font-family: 'Plus Jakarta Sans', arial, sans-serif;
    color: #0f172a;
}
.cf *, .cf *::before, .cf *::after { box-sizing: border-box; }
.cf .hidden { display: none !important; }
.cf .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.cf h2.cf-title {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    font-style: normal;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.cf p.cf-intro {
    margin: 12px 0 0;
    padding: 0;
    max-width: 32rem;
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
}
.cf form { margin-top: 24px; }
.cf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}
.cf label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}
.cf input,
.cf select,
.cf textarea {
    width: 100%;
    margin: 0;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
}
.cf input,
.cf select {
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
}
.cf select.text-slate-400 { color: #94a3b8; }
.cf select option { color: #0f172a; }
.cf textarea {
    display: block;
    padding: 16px 20px;
    border-radius: 24px;
    resize: vertical;
}
.cf input:focus,
.cf select:focus,
.cf textarea:focus {
    border-color: #C8102E;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, .15);
}
.cf-message { margin-top: 20px; }
.cf-turnstile { margin-top: 20px; }
.cf button.cf-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px 36px;
    border: 0;
    border-radius: 999px;
    background: #C8102E;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(127, 29, 29, .2);
    cursor: pointer;
    transition: background-color .3s, transform .3s;
}
.cf button.cf-submit:hover { background: #A50D26; transform: translateY(-2px); }
.cf button.cf-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.cf .spinner { width: 16px; height: 16px; animation: cf-spin 1s linear infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .cf-grid { grid-template-columns: 1fr; }
}
