/* =============================================
   Astra Contact Form Pro – Frontend Styles
   ============================================= */

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

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

/* ---- Zeilen ---- */
.acf-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

/* ---- Breiten ---- */
.acf-field-wrapper {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.acf-width-100 { width: 100%; }
.acf-width-75  { width: calc(75% - 7px); }
.acf-width-66  { width: calc(66.66% - 9px); }
.acf-width-50  { width: calc(50% - 7px); }
.acf-width-33  { width: calc(33.33% - 9px); }
.acf-width-25  { width: calc(25% - 10px); }
.acf-width-20  { width: calc(20% - 11px); }
.acf-width-30  { width: calc(30% - 10px); }
.acf-width-40  { width: calc(40% - 8px); }
.acf-width-60  { width: calc(60% - 6px); }
.acf-width-70  { width: calc(70% - 4px); }
.acf-width-80  { width: calc(80% - 3px); }

/* ---- Label ---- */
.acf-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.acf-required {
    color: #dc3232;
    margin-left: 2px;
}

/* ---- Eingabefelder ---- */
.acf-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 9px 13px;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.acf-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.acf-input.acf-input-error {
    border-color: #dc3232;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.12);
}

textarea.acf-input {
    resize: vertical;
    min-height: 90px;
}

select.acf-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ---- Checkbox / Radio ---- */
.acf-checkbox-group,
.acf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.acf-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.acf-check-label input {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #0073aa;
}

/* ---- Date Input ---- */
.acf-date-input {
    cursor: pointer;
}

/* ---- Fehlermeldungen ---- */
.acf-field-error {
    display: block;
    color: #dc3232;
    font-size: 12px;
    margin-top: 4px;
}

/* ---- Nachrichten ---- */
.acf-message {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.acf-message.acf-success {
    background: #edfaef;
    border: 1px solid #46b450;
    color: #2d6f32;
}

.acf-message.acf-error {
    background: #fdf1f1;
    border: 1px solid #dc3232;
    color: #8b1111;
}

/* ---- Submit-Button ---- */
.acf-submit-btn {
    display: inline-block;
    padding: 10px 28px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    line-height: 1.5;
    transition: background 0.2s, transform 0.1s;
    position: relative;
}

.acf-submit-btn:hover {
    background: #005a87;
}

.acf-submit-btn:active {
    transform: scale(0.98);
}

.acf-submit-btn.loading {
    pointer-events: none;
    opacity: 0.75;
}

.acf-submit-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: acf-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* ---- Honeypot ---- */
.acf-hp-field {
    display: none !important;
    position: absolute;
    left: -9999px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .acf-width-50,
    .acf-width-33,
    .acf-width-25,
    .acf-width-66,
    .acf-width-75 {
        width: 100% !important;
    }
    .acf-form-row {
        gap: 10px;
    }
}
