/* =====================================================
 *   1️⃣  GRUNDLAYOUT – FORMULAR WRAPPER
 *   ===================================================== */

.at-kontaktformular {
    font-family: Montserrat, sans-serif !important;
    background-color: #f6f7f7;
    color: #1d2327;
    font-size: 16px;
    min-width: 0;
    max-width: 750px;
    width: 97%;
    box-sizing: border-box;
    border-radius: 3px;
/*    padding:30px;*/
}

@media (max-width: 920px) {
    .at-kontaktformular {
        width: 100%;
    }
}

.at-kontaktformular a {
    color: #2271b1;
    text-decoration: none;
}

.at-kontaktformular label:not(.atkf-sr-only) {
    display: block;
}

/* Tabellen neutralisieren (Datenschutz-Tabelle) */
.at-kontaktformular table,
.at-kontaktformular tr,
.at-kontaktformular td {
    background-color: #f6f7f7 !important;
    outline: none;
    border: 1px solid transparent;
    }



/* =====================================================
 *   2️⃣  FORMULARFELDER – INPUT & TEXTAREA
 *   ===================================================== */

/* =====================================================
 *   INPUTS
 * ===================================================== */

.at-kontaktformular input[type="text"],
.at-kontaktformular input[type="email"],
.at-kontaktformular textarea {
    font-family: Montserrat, sans-serif !important;
    font-weight: 400;
    width: 100%;
    padding: 10px;
    color: #1d2327;
    border: 1px solid #8c8f94; /* WordPress Standard-Grau */
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 3px;
}

/* Hover – leicht dunkler */
.at-kontaktformular input[type="text"]:hover,
.at-kontaktformular input[type="email"]:hover,
.at-kontaktformular textarea:hover {
    border-color: #2E5C42;
}

/* Focus – dein CI-Grün */
.at-kontaktformular input[type="text"]:focus,
.at-kontaktformular input[type="email"]:focus,
.at-kontaktformular textarea:focus {
    border-color: #2E5C42;
    box-shadow: 0 0 0 1px #2E5C42;
    outline: none;
}




/* Fehlerhintergrund WordPress */
.at-kontaktformular .atkf-error,.at-kontaktformular input[type="checkbox"].atkf-error {
    background-color: rgba(214, 54, 56, 0.2);
    transition: background-color 0.3s ease;
}

.at-kontaktformular input.atkf-error::placeholder,
.at-kontaktformular textarea.atkf-error::placeholder {
    color: #000000 !important;
}




/* =====================================================
 *   3️⃣  NAMENSFELDER – FLEX LAYOUT
 *   ===================================================== */

.atkf-namensfelder {
    display: flex;
    gap: 1rem;
    min-width: 0;
}

@media (max-width: 600px) {
    .atkf-namensfelder {
        flex-direction: column;
    }

    .atkf-namensfelder > div {
        width: 100%;
    }
}



/* =====================================================
 *   4️⃣  BUTTON
 *   ===================================================== */

.at-kontaktformular button {
    font-family: Montserrat, sans-serif !important;
    background-color: #2271b1;
    color: #ffffff;
    padding: 8px 30px;
    border-radius: 3px;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: none;
    box-shadow: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}


.at-kontaktformular button:hover,
.at-kontaktformular button:focus,
.at-kontaktformular button:active {
    background-color: #135e96;
    color: #ffffff;
    box-shadow: none;
}

.at-kontaktformular button:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}



/* =====================================================
 *   5️⃣  DATENSCHUTZ-BEREICH
 *   ===================================================== */

.atkf-daschusatz {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.4;
    table-layout: fixed;
}

.atkf-daschusatz td:first-child {
    width: 10px;
    vertical-align: middle;
}

.atkf-daschusatz td:last-child {
    width: auto;
    vertical-align: top;
}

.atkf-daschusatz td {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 3px !important;
    padding-right: 30px !important;
}

.atkf-nowrap {
    white-space: nowrap;
}

/* Custom Checkbox */
.at-kontaktformular input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    left: -8px;
    border-radius: 3px;
    margin-left: 5px !important;
    pointer-events: auto;
    border: 1px solid #8c8f94;
}

.at-kontaktformular input[type="checkbox"]:focus-visible {
    outline: 2px solid #2E5C42;
    outline-offset: 2px;border: 1px solid #2E5C42;
}

.at-kontaktformular input[type="checkbox"]:checked::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background-color: #8c8f94;
    border-radius: 2.5px;
    border: 1px solid #8c8f94;
}

.at-kontaktformular input[type="checkbox"]::after {
    content: none !important;
}



/* =====================================================
 *   6️⃣  HONEYPOT & PFLICHTFELD-HINWEIS
 *   ===================================================== */

.atkf-honi {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.PflichtfelderHinweis::after {
    content: "* = Pflichtfelder";
    color: #1d2327;
    font-size: 12px;
}



/* =====================================================
 *   7️⃣  MODAL
 *   ===================================================== */

/* Overlay */
.atkf-modal {
    font-family: Montserrat, sans-serif !important;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.atkf-modal.active {
    opacity:1;
    pointer-events: auto;
}

/* Box */
.atkf-modal-box {
    position: relative;
    background-color: #ffffff;
    max-width: 360px;
    width: 90%;
    border-radius: 10px;
    box-shadow:
    0 12px 35px rgba(0,0,0,0.25),
    0 2px 6px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: atkfModalIn 0.25s ease-out;
    border: 4px solid #2271b1;
}

.atkf-modal-box::before {
    content: "";
    display: block;
    height: 30px;
    background-color: #2271b1;
}

/* Inhalt */
#atkf-modal .atkf-modal-content {
    padding: 50px 22px;
    text-align: center;
    font-weight: bold;
}

#atkf-modal .atkf-modal-content  {
    display: block;
    font-size: 16px;
    line-height: 1.45;
    color: #1d2327;
    margin-bottom: 8px;
}

#atkf-modal .atkf-modal-content:last-child {
    margin-bottom: 0;
}

/* Close Button */
#atkf-modal .atkf-modal-close {
    position: absolute;
    top: -13px;
    right: 12px;
    background-color: transparent;
    border: none;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #ffffff;
    padding: 4px;
}

#atkf-modal .atkf-modal-close:hover {
    color: #1d2327;
}

#atkf-modal .atkf-modal-close:focus {
    outline: none;
}

/* Animation */
@keyframes atkfModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes atkfModalOut {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to   { opacity: 0; transform: scale(0.95) translateY(10px); }
}

#atkf-modal .atkf-modal-box.out {
    animation: atkfModalOut 0.25s ease-in forwards;
}



/* =====================================================
 *   8️⃣  ACCESSIBILITY – SCREENREADER ONLY
 *   ===================================================== */

.atkf-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: none !important;
}
