/*!
 * Advanced Contact Form for Elementor — frontend styles
 */

.acf-form-wrapper { width: 100%; }

.acf-form-title    { margin: 0 0 8px; font-size: 1.6em; line-height: 1.2; }
.acf-form-subtitle { margin: 0 0 20px; opacity: .85; }

.acf-form {
    width: 100%;
    box-sizing: border-box;
    background: transparent;
}

.acf-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

@media (max-width: 767px) {
    .acf-fields { grid-template-columns: 1fr !important; }
}

.acf-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.acf-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95em;
}

.acf-required { margin-left: 4px; }

/* Inputs */
.acf-input {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.4;
    padding: 12px 16px;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    background-color: #fff;
    color: #1f2937;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    outline: none;
    appearance: none;
}

.acf-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

textarea.acf-input {
    height: 140px;
    resize: vertical;
    font-family: inherit;
}

select.acf-input {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3e%3cpath fill='%23555' d='M0 0l5 6 5-6z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.acf-file { padding: 8px; background: #fafafa; cursor: pointer; }

/* Checkbox / radio groups */
.acf-options { display: flex; flex-direction: column; gap: 8px; }
.acf-option  { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .95em; }
.acf-option input { width: 16px; height: 16px; margin: 0; cursor: pointer; }

/* Honeypot — hide visually & from screen readers safely */
.acf-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important; height: 1px !important;
    overflow: hidden !important;
}

/* Button row */
.acf-button-row { margin-top: 20px; }
.acf-button-row.stretch .acf-button { width: 100%; }

.acf-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: inherit;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: #2563eb;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
    text-decoration: none;
}
.acf-button:hover { background: #1d4ed8; }
.acf-button[disabled],
.acf-button.is-loading { cursor: wait; opacity: .8; }

.acf-button-loader {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: acf-spin .8s linear infinite;
}
.acf-button.is-loading .acf-button-loader { display: inline-block; }
.acf-button.is-loading .acf-button-text { opacity: .7; }
@keyframes acf-spin { to { transform: rotate(360deg); } }

/* Messages */
.acf-msg {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    display: none;
    font-size: 0.95em;
    animation: acf-fadein .35s ease;
}
.acf-msg.show    { display: block; }
.acf-msg.success { color: #0f5132; background: #d1e7dd; }
.acf-msg.error   { color: #842029; background: #f8d7da; }

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

/* Field-level inline errors */
.acf-field.has-error .acf-input { border-color: #dc2626; }
.acf-field-error { color: #b91c1c; font-size: .85em; margin-top: 6px; }

/* Dark-mode compatibility (respects user preference) */
@media (prefers-color-scheme: dark) {
    .acf-input {
        background-color: #1f2937;
        color: #f9fafb;
        border-color: #374151;
    }
    .acf-input::placeholder { color: #9ca3af; }
    .acf-file { background: #111827; }
}
