/* Ajax Simple Contact Form v2.0 — Frontend Styles */

.ascf-wrap {
    --ascf-btn: #6366f1;
    --ascf-btn-text: #ffffff;
    --ascf-radius: 8px;
    --ascf-border: #dcdcde;
    --ascf-focus: #6366f1;
    --ascf-error-color: #dc2626;
    --ascf-success-color: #16a34a;
    max-width: 680px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #1d2327;
    box-sizing: border-box;
}

.ascf-wrap *, .ascf-wrap *::before, .ascf-wrap *::after {
    box-sizing: border-box;
}

/* ── FORM STYLES ── */
.ascf-style-default .ascf-form {
    background: #f8f9fa;
    border: 1px solid var(--ascf-border);
    border-radius: var(--ascf-radius);
    padding: 28px 32px;
}

.ascf-style-minimal .ascf-form {
    padding: 8px 0;
}

.ascf-style-bordered .ascf-form {
    border: 2px solid var(--ascf-btn);
    border-radius: var(--ascf-radius);
    padding: 28px 32px;
}

/* ── FIELDS ── */
.ascf-field {
    margin-bottom: 18px;
}

.ascf-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3c434a;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.ascf-req {
    color: var(--ascf-error-color);
    margin-left: 2px;
}

.ascf-input,
.ascf-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--ascf-border);
    border-radius: var(--ascf-radius);
    font-size: 14px;
    color: #1d2327;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
}

.ascf-input:focus,
.ascf-textarea:focus {
    outline: none;
    border-color: var(--ascf-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ascf-input.ascf-invalid,
.ascf-textarea.ascf-invalid {
    border-color: var(--ascf-error-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

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

/* ── ERROR MESSAGE ── */
.ascf-error {
    display: block;
    font-size: 12px;
    color: var(--ascf-error-color);
    margin-top: 5px;
    min-height: 16px;
}

/* ── HONEYPOT ── */
.ascf-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* ── FOOTER / BUTTON ── */
.ascf-footer {
    margin-top: 8px;
}

.ascf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ascf-btn);
    color: var(--ascf-btn-text);
    border: none;
    border-radius: var(--ascf-radius);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.1s;
    min-width: 160px;
    position: relative;
}

.ascf-btn:hover { opacity: 0.88; }
.ascf-btn:active { transform: scale(0.98); }
.ascf-btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* Spinner inside button */
.ascf-btn-spinner {
    display: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    animation: ascf-spin 0.7s linear infinite;
}

.ascf-btn.ascf-loading .ascf-btn-text { opacity: 0.5; }
.ascf-btn.ascf-loading .ascf-btn-spinner { display: inline-block; }

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

/* ── RESPONSE MESSAGE ── */
.ascf-response {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--ascf-radius);
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: ascf-fadein 0.3s ease;
}

.ascf-response.ascf-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--ascf-success-color);
    display: block;
}

.ascf-response.ascf-error-msg {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--ascf-error-color);
    display: block;
}

@keyframes ascf-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .ascf-style-default .ascf-form,
    .ascf-style-bordered .ascf-form {
        padding: 20px 16px;
    }
    .ascf-btn { width: 100%; }
}
