/* Design Upgrade: Premium Appearance */

.vf-form-switcher-main {
  margin-bottom: 120px;
}

@media (max-width: 767px) {
  .vf-form-switcher-main {
    margin-bottom: 64px;
  }
}

.vf-switcher-wrapper {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vf-switcher-wrapper:hover {
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.vf-switcher-wrapper label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.vf-switcher-wrapper select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  color: #334155;
  background-color: #f8fafc;
  font-size: 1rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.vf-switcher-wrapper select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #fff;
}

/* Form Container Logic */
.vf-forms-container {
  min-height: 0;
  height: auto;
  overflow: visible;
  padding: 0;
  margin: 0;
}

.vf-form-container {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  background: transparent;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
  margin-top: 0;
}

.vf-form-container.active {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure CF7 forms fit nice and don't add extra margin */
.vf-form-container .wpcf7 {
  width: 100%;
}

.vf-form-container .wpcf7 form {
  margin: 0;
}

.form-row p {
  width: 100%;
  margin-bottom: 0;
}

/* ========================================================
   GLOBAL FORMULAR STYLES (Migriert aus Theme)
   ======================================================== */

.bonus-form { 
    font-family: "Outfit", sans-serif !important; 
}

.form-row { 
    display: flex !important; 
    gap: 24px !important; 
    margin-bottom: 24px !important; 
}

.form-group { 
    flex: 1 !important; 
}

.bonus-form input[type="text"], 
.bonus-form input[type="email"], 
.bonus-form input[type="tel"],
.bonus-form textarea {
    width: 100% !important; 
    padding: 12px !important; 
    background: #f9f9f9 !important; 
    border-radius: 8px !important;
    border: hidden !important;
}

.full-width { 
    width: 100% !important; 
}

.section-title { 
    font-weight: bold !important; 
    display: block !important; 
    margin-bottom: 10px !important; 
}

.main-title { 
    font-size: 1.4rem !important; 
    margin-top: 20px !important; 
}

.separator { 
    border: 0 !important; 
    border-top: 1px solid #eee !important; 
    margin: 30px 0 !important; 
}

.kunde-block {
    border: 1px solid #eee !important; 
    padding: 20px !important; 
    border-radius: 8px !important; 
    margin-bottom: 20px !important; 
    position: relative !important;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.kunde-number { 
    font-weight: bold !important; 
    display: block !important; 
}

.hidden-field { 
    display: none ; 
}

#add-kunde-btn {
    width: 100% !important; 
    padding: 12px !important; 
    background: white !important; 
    border: 1px solid #333 !important; 
    cursor: pointer !important; 
    border-radius: 8px !important;
    margin-bottom: 20px;
}

#add-kunde-btn:hover {
    background: #f0f0f0 !important;
}

.submit-wrapper input {
    font-family: "Outfit", Sans-Serif !important; 
    font-weight: 500 !important; 
    font-size: 15px !important; 
    width: 100% !important;
    line-height: 23px !important; 
    background-color: #FFD400;
    color: #212121 !important; 
    border-radius: 12px !important; 
    box-shadow: 0 -2px 2px 0 rgba(26, 8, 64, 0.24) inset, 0 1px 2px 0 rgba(255, 255, 255, 0.48) inset !important; 
    height: 48px !important; 
    display: inline-flex; 
    padding: 12px 16px; 
    border: hidden;
    justify-content: center; 
    align-items: center; gap: 4px;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
    text-decoration: none !important;
}

.kontoinhaber-section {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.checkbox-wrapper { 
    margin-bottom: 0 !important; 
}

.checkbox-wrapper input[type="checkbox"] {
    width: auto !important; 
    margin: 0 !important;
    cursor: pointer !important;
}

.checkbox-wrapper .wpcf7-list-item {
    display: flex !important;
    align-items: center !important; 
    gap: 12px !important;
    margin: 0 !important;
}
.vf-form-container label {
    display: flex;
    line-height: 1;
    gap: 6px;
}

.wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;

}

.checkbox-wrapper label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    margin: 0 !important;
    gap: 12px;
    font-weight: normal !important;
}

#abweichend-block {
    display: none;
    margin-top: 20px;
}

.kontoinhaber-section:has(input[type="checkbox"]:checked) #abweichend-block {
    display: block !important;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.bonus-form small {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    margin-bottom: 10px;
    margin-left: 8px;
}

.bonus-form .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.consent-wrapper {
    background: #fff;
    border: 1px solid #eee;
    padding: 16px;
    border-radius: 8px;
    margin: 25px 0;
}

.consent-wrapper label {
    display: flex;
    gap:8px;
    align-items: flex-start;
} 

.consent-hint {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 15px;
    color: #333;
    margin-left: 21px;
}

.required-hint {
    font-size: 0.75rem;
    color: #999;
    margin-top: 10px;
}

.wpcf7-list-item-label {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #333;
}

.kunde-block .form-row {
    margin-bottom: 0px !important;
}

.consent-wrapper .wpcf7-list-item {
    margin: 0px !important;
}

.kunde-block .wpcf7-list-item {
    margin: 0px !important;
}

.kunde-block label {
    display: flex;
    gap: 8px;
}

.iban-feedback {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

input[name="iban"] {
    letter-spacing: 1px; 
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.iban-feedback {
    color: #dc3232 !important;
    font-size: 1em !important;
    font-weight: normal !important;
    display: block !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.bonus-form input[type="file"] {
    width: 100%;
    padding: 10px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
}

.bonus-form input[type="file"]::file-selector-button {
    background: #fff;
    color: #333;
    border: 1px solid #333;
    padding: 8px 16px;
    border-radius: 6px;
    margin-right: 15px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.bonus-form input[type="file"]::file-selector-button:hover {
    background: #f0f0f0;
}

.bonus-form select,
.bonus-form input[type="date"] {
    width: 100% !important;
    padding: 12px 12px !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    border: 1px solid transparent !important;
    font-family: inherit;
    color: #333;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23555'%3E%3Cpath d='M10 13l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 14px;
    cursor: pointer;
}

.bonus-form input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    cursor: pointer;
}

.bonus-form input[type="date"]:focus,
.bonus-form select:focus,
.bonus-form input[type="file"]:focus {
    outline: none;
    background-color: #fff !important;
    border-color: #ddd !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

@media only screen and (max-width: 767px) {
    .form-row, 
    .form-grid,
    .bonus-form .form-row {
        display: block !important;
        flex-direction: column !important;
    }
    .form-group {
        width: 100% !important;
        margin-bottom: 16px !important;
    }
    .form-row:last-child, 
    .form-group:last-child {
        margin-bottom: 0 !important;
    }

    .bonus-form input::placeholder,
    .bonus-form textarea::placeholder,
    .wpcf7-form input::placeholder,
    .wpcf7-form textarea::placeholder {
        font-size: 13px !important;
        opacity: 0.8;
    }

    .vf-form-container {
        padding: 0 !important;
        border: none !important;
    }
}

.bonus-form .section-title,
.bonus-form label,
.bonus-form input,
.bonus-form textarea,
.bonus-form select,
.bonus-form .wpcf7-list-item-label,
.wpcf7-form label,
.section-title {
    text-transform: none !important;
}

.consent-wrapper a, 
.consent-hint a,
.wpcf7-acceptance a {
    text-decoration: underline !important;
}

.wpcf7-checkbox input[type="checkbox"],
.wpcf7-acceptance input[type="checkbox"],
.bonus-form input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 0 !important;
    cursor: pointer;
}

.bonus-form div[style*="border"] {
    margin-bottom: 24px !important;
}

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.wpcf7-textarea {
    resize: vertical;
    height: auto !important;
    min-height: 120px;
}

.bonus-form input[type="date"] {
    min-height: 45px;
}

.bonus-form input[type="date"]::-webkit-datetime-edit {
    color: #333;
}

.bonus-form input[type="date"]:invalid::-webkit-datetime-edit {
    color: #999;
}

@media only screen and (max-width: 767px) {
    .bonus-form input[type="date"] {
        appearance: auto !important;
        -webkit-appearance: auto !important;
        background-image: none !important;
    }
}

.wpcf7-form-control-wrap:has(input[type="date"]) {
    position: relative;
    display: block;
}

.wpcf7-form-control-wrap:has(input[type="date"]:not(.has-value))::before {
    content: "tt.mm.jjjj";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none; 
    z-index: 5;
    font-size: 15px; 
}
@media only screen and (max-width: 767px) {
    .wpcf7-form-control-wrap:has(input[type="date"]:not(.has-value))::before {
        font-size: 13px !important;
    }
}

.wpcf7-form-control-wrap:has(input[type="date"]:focus)::before {
    display: none !important;
}
.bonus-form input[type="date"]:not(.has-value):not(:focus)::-webkit-datetime-edit {
    color: transparent;
}
