/* ============================================
   IMMOBILIEN WERTERMITTLUNG - FINAL VERSION
   ============================================ */

#iw-form-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================
   WRAPPER & CONTAINER
   ============================================ */

#iw-form-wrapper {
    background: transparent;
    padding: 0;
    width: 100%;
}

#iw-form-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 40px 50px;
    position: relative;
    overflow: hidden; /* WICHTIG: Loading bleibt innerhalb des Containers */
    box-sizing: border-box;
    min-height: 700px; /* Mindesthöhe damit Loading vollständig sichtbar ist */
}

#immobilienForm {
    min-height: 500px; /* Mindesthöhe für das Formular */
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.iw-progress-wrapper {
    margin-bottom: 50px;
}

.iw-progress-bar {
    width: 100%;
    height: 10px;
    background: #e8e8e8;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.iw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d084 0%, #00b872 100%);
    width: 7.69%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    position: relative;
}

.iw-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.iw-progress-text {
    text-align: center;
    color: #666;
    font-size: 15px;
    font-weight: 600;
}

.current-step {
    color: var(--iw-primary-color, #1a1a1a);
    font-size: 18px;
}

/* ============================================
   STEPS & ANIMATIONS
   ============================================ */

#iw-form-wrapper .step {
    display: none;
    animation: fadeInUp 0.4s ease;
    padding-top: 20px;
}

#iw-form-wrapper .step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#iw-form-wrapper .step.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

#iw-form-wrapper .step h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    line-height: 1.3;
}

#iw-form-wrapper .step-hint {
    color: #666;
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ============================================
   OPTION GRID (Immobilientyp)
   ============================================ */

#iw-form-wrapper .option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 0 0 15px 0;
}

#iw-form-wrapper .option-card {
    background: #ffffff;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#iw-form-wrapper .option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.05) 0%, rgba(51, 51, 51, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#iw-form-wrapper .option-card:hover {
    border-color: var(--iw-primary-color, #1a1a1a);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

#iw-form-wrapper .option-card:hover::before {
    opacity: 1;
}

#iw-form-wrapper .option-card.selected {
    border-color: var(--iw-primary-color, #1a1a1a);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(-5px);
}

#iw-form-wrapper .option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: var(--iw-primary-color, #1a1a1a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#iw-form-wrapper .option-icon {
    font-size: 56px;
    margin-bottom: 20px;
    display: block;
}

#iw-form-wrapper .option-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

#iw-form-wrapper .form-group {
    margin-bottom: 25px;
}

#iw-form-wrapper .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

#iw-form-wrapper label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

#iw-form-wrapper input[type="text"],
 #iw-form-wrapper input[type="email"],
 #iw-form-wrapper input[type="tel"],
 #iw-form-wrapper input[type="number"],
 #iw-form-wrapper select,
 #iw-form-wrapper textarea {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

/* Pfeile bei Number-Inputs entfernen */
 #iw-form-wrapper input[type="number"]::-webkit-outer-spin-button,
 #iw-form-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

 #iw-form-wrapper input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

 #iw-form-wrapper input[type="text"]:focus,
 #iw-form-wrapper input[type="email"]:focus,
 #iw-form-wrapper input[type="tel"]:focus,
 #iw-form-wrapper input[type="number"]:focus,
 #iw-form-wrapper select:focus,
 #iw-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--iw-primary-color, #1a1a1a);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

 #iw-form-wrapper input.error,
 #iw-form-wrapper select.error,
 #iw-form-wrapper textarea.error {
    border-color: #ff4444;
    animation: shake 0.5s ease;
}

 #iw-form-wrapper .error-message {
    color: #ff4444;
    font-size: 14px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

 #iw-form-wrapper textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* ============================================
   INPUT WITH UNIT (m²)
   ============================================ */

 #iw-form-wrapper .input-with-unit {
    margin-bottom: 30px;
}

 #iw-form-wrapper .input-wrapper {
    position: relative;
}

 #iw-form-wrapper .input-wrapper input {
    padding-right: 70px;
}

 #iw-form-wrapper .unit {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--iw-primary-color, #1a1a1a);
    font-size: 18px;
    font-weight: 700;
    pointer-events: none;
    z-index: 10;
}

/* ============================================
   NUMBER SELECTOR (Zimmer/Badezimmer)
   ============================================ */

 #iw-form-wrapper .number-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 0 0 50px 0;
}

 #iw-form-wrapper .num-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: var(--iw-primary-color, #1a1a1a);
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#iw-form-wrapper .num-btn:hover {
    background: var(--iw-secondary-color, #333333);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

#iw-form-wrapper .num-btn:active {
    transform: scale(0.95);
}

#iw-form-wrapper .number-selector input {
    width: 120px;
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    color: #1a1a1a;
    background: #f8f9fa;
    padding: 15px;
}

/* ============================================
   ENERGY GRID (Energieeffizienzklasse)
   ============================================ */

 #iw-form-wrapper .energy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin: 0 0 30px 0;
}

/* Bebaubarkeit Grid hat gleiche Styles wie Option Grid */
 #iw-form-wrapper #bebaubarkeit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

 #iw-form-wrapper #bebaubarkeit-grid .option-card {
    padding: 20px 15px;
}

 #iw-form-wrapper #bebaubarkeit-grid .option-label {
    font-size: 16px;
    font-weight: 600;
}

 #iw-form-wrapper .energy-card {
    position: relative;
    cursor: pointer;
}

 #iw-form-wrapper .energy-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

 #iw-form-wrapper .energy-label {
    display: block;
    padding: 22px 15px;
    border: 3px solid transparent;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 17px;
    color: white;
    transition: all 0.3s ease;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Farben für Energy Labels */
#iw-form-wrapper .energy-card[data-class="A+"] .energy-label { 
    background: linear-gradient(135deg, #00d084 0%, #00b872 100%);
}
#iw-form-wrapper .energy-card[data-class="A"] .energy-label { 
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}
#iw-form-wrapper .energy-card[data-class="B"] .energy-label { 
    background: linear-gradient(135deg, #95d600 0%, #7cb800 100%);
}
#iw-form-wrapper .energy-card[data-class="C"] .energy-label { 
    background: linear-gradient(135deg, #c8e600 0%, #a8c600 100%);
}
#iw-form-wrapper .energy-card[data-class="D"] .energy-label { 
    background: linear-gradient(135deg, #f1c40f 0%, #d4a706 100%);
}
#iw-form-wrapper .energy-card[data-class="E"] .energy-label { 
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}
#iw-form-wrapper .energy-card[data-class="F"] .energy-label { 
    background: linear-gradient(135deg, #e67e22 0%, #ca6f1e 100%);
}
#iw-form-wrapper .energy-card[data-class="G"] .energy-label { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}
#iw-form-wrapper .energy-card[data-class="H"] .energy-label { 
    background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
}

#iw-form-wrapper .energy-card:hover .energy-label {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#iw-form-wrapper .energy-card input[type="radio"]:checked + .energy-label {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    border-color: white;
}

#iw-form-wrapper .energy-card.unknown .energy-label {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    grid-column: span 2;
}

#iw-form-wrapper .energy-card.unknown input:checked + .energy-label {
    transform: translateY(-5px) scale(1.05);
}

/* ============================================
   INTEREST OPTIONS
   ============================================ */

 #iw-form-wrapper .interest-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0 0 30px 0;
}

 #iw-form-wrapper .interest-card {
    position: relative;
    cursor: pointer;
}

 #iw-form-wrapper .interest-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

 #iw-form-wrapper .card-content {
    display: block;
    padding: 25px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    background: white;
}

#iw-form-wrapper .interest-card:hover .card-content {
    border-color: var(--iw-primary-color, #1a1a1a);
    background: #f5f5f5;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#iw-form-wrapper .interest-card input[type="radio"]:checked + .card-content {
    border-color: var(--iw-primary-color, #1a1a1a);
    background: var(--iw-primary-color, #1a1a1a);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

/* ============================================
   CHECKBOX
   ============================================ */

 #iw-form-wrapper .checkbox-wrapper {
    margin: 35px 0;
}

 #iw-form-wrapper .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

 #iw-form-wrapper .checkbox-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--iw-primary-color, #1a1a1a);
}

 #iw-form-wrapper .checkbox-label a {
    color: var(--iw-primary-color, #1a1a1a);
    text-decoration: none;
    font-weight: 600;
}

#iw-form-wrapper .checkbox-label a:hover {
    text-decoration: underline;
}

/* ============================================
   RADIO GROUP - PROFESSIONELLES DESIGN
   ============================================ */

 #iw-form-wrapper .radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 0 0 30px 0;
}

 #iw-form-wrapper .radio-option {
    position: relative;
}

 #iw-form-wrapper .radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

 #iw-form-wrapper .radio-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 15px;
    color: #333;
    margin-bottom: 0;
    position: relative;
    user-select: none;
}

 #iw-form-wrapper .radio-option label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #b0b0b0;
    border-radius: 50%;
    background: #ffffff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 0 var(--iw-primary-color, #1a1a1a);
}

 #iw-form-wrapper .radio-option:hover label {
    border-color: var(--iw-primary-color, #1a1a1a);
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

 #iw-form-wrapper .radio-option input[type="radio"]:checked + label {
    border-color: var(--iw-primary-color, #1a1a1a);
    background: #ffffff;
    color: var(--iw-primary-color, #1a1a1a);
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

 #iw-form-wrapper .radio-option input[type="radio"]:checked + label::before {
    border-color: var(--iw-primary-color, #1a1a1a);
    background: #ffffff;
    box-shadow: inset 0 0 0 6px var(--iw-primary-color, #1a1a1a);
}

 #iw-form-wrapper .radio-option input[type="radio"]:focus + label {
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BUTTONS
   ============================================ */

 #iw-form-wrapper .button-group {
    display: flex;
    gap: 15px;
    margin-top: 60px;
    flex-wrap: wrap;
    width: 100%;
}

 #iw-form-wrapper button {
    padding: 18px 30px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    min-width: 100px;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%;
}

 #iw-form-wrapper button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

 #iw-form-wrapper button:active::before {
    width: 300px;
    height: 300px;
}

 #iw-form-wrapper .btn-primary,
 #iw-form-wrapper .btn-submit {
    background: var(--iw-secondary-color, #333333);
    color: white;
    flex: 1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: none;
}

 #iw-form-wrapper .btn-primary:hover,
 #iw-form-wrapper .btn-submit:hover {
    background: var(--iw-primary-color, #1a1a1a);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

 #iw-form-wrapper .btn-secondary {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #666;
    flex: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
}

 #iw-form-wrapper .btn-secondary:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #d8d8d8 100%);
    color: #333;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

 #iw-form-wrapper .btn-skip {
    background: transparent;
    color: #999;
    border: 2px solid #e0e0e0;
    box-shadow: none;
    flex: 1;
}

 #iw-form-wrapper .btn-skip:hover {
    background: #f8f9fa;
    border-color: #ccc;
    color: #666;
}

 #iw-form-wrapper button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   MAP
   ============================================ */

 #iw-form-wrapper #map-wrapper {
    margin: 25px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ============================================
   SUCCESS PAGE
   ============================================ */

 #iw-form-wrapper .success-container {
    text-align: center;
    padding: 70px 20px;
}

 #iw-form-wrapper .success-icon {
    width: 100px;
    height: 100px;
    background: var(--iw-primary-color, #1a1a1a);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: bold;
    margin-bottom: 35px;
    animation: successPulse 0.6s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@keyframes successPulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

 #iw-form-wrapper .success-text {
    font-size: 19px;
    color: #666;
    line-height: 1.7;
    margin: 25px 0 35px;
}

 #iw-form-wrapper .success-info {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: 3px solid var(--iw-primary-color, #1a1a1a);
    border-radius: 16px;
    padding: 30px;
    margin-top: 35px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

 #iw-form-wrapper .success-info p {
    color: #333;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* ============================================
   LOADING OVERLAY - Perfekt zentriert & designed
   ============================================ */

#iw-loading {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 9999 !important;
    backdrop-filter: blur(5px);
}

#iw-loading .loading-content {
    width: calc(100% - 80px);
    max-width: 500px;
    background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    padding: 50px 35px;
    box-shadow: 0 25px 70px rgba(16, 185, 129, 0.2), 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#iw-loading .loader-spinner {
    position: relative;
    width: 110px;
    height: 110px;
    margin-bottom: 35px;
    flex-shrink: 0;
}

#iw-loading .loader-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 5px solid rgba(16, 185, 129, 0.15);
    border-radius: 50%;
}

#iw-loading .loader-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 5px solid transparent;
    border-top-color: #10b981;
    border-right-color: #10b981;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

#iw-loading .loader-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 46px;
    line-height: 1;
    animation: pulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.08); 
        opacity: 0.85; 
    }
}

#iw-loading .loading-text {
    color: #065f46;
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
    animation: fadeIn 0.5s ease-in;
    letter-spacing: -0.3px;
}

#iw-loading .loading-subtext {
    color: #059669;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    opacity: 0.85;
    animation: fadeIn 0.5s ease-in 0.2s both;
}

#iw-loading .loading-progress {
    margin-top: 32px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

#iw-loading .progress-dot {
    width: 9px;
    height: 9px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    animation: bounce 1.4s ease-in-out infinite;
}

#iw-loading .progress-dot:nth-child(1) { animation-delay: 0s; }
#iw-loading .progress-dot:nth-child(2) { animation-delay: 0.2s; }
#iw-loading .progress-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: translateY(0) scale(1); 
        opacity: 0.5; 
    }
    40% { 
        transform: translateY(-14px) scale(1.1); 
        opacity: 1; 
    }
}

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

/* Success State */
#iw-loading.success {
    background: rgba(255, 255, 255, 0.98);
}

#iw-loading.success .loading-content {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 25px 70px rgba(16, 185, 129, 0.3), 0 10px 30px rgba(0, 0, 0, 0.15);
}

#iw-loading.success .loader-spinner::after {
    border-top-color: #10b981;
    border-right-color: #10b981;
    animation: spinSuccess 0.6s ease-out forwards;
}

#iw-loading.success .loader-icon {
    animation: checkmarkPop 0.5s ease-out 0.3s both;
    font-size: 52px;
}

@keyframes spinSuccess {
    0% { 
        transform: rotate(0deg); 
        opacity: 1; 
        border-width: 5px;
    }
    100% { 
        transform: rotate(360deg); 
        opacity: 0;
        border-width: 0px;
    }
}

@keyframes checkmarkPop {
    0% { 
        transform: translate(-50%, -50%) scale(0.3); 
        opacity: 0; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.15); 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    #iw-form-container {
        min-height: 600px; /* Reduzierte Mindesthöhe für Mobile */
        padding: 30px 20px;
    }
    
    #immobilienForm {
        min-height: 450px;
    }
    
    #iw-loading .loading-content {
        width: calc(100% - 40px);
        padding: 40px 25px;
        border-radius: 20px;
    }
    
    #iw-loading .loader-spinner {
        width: 95px;
        height: 95px;
        margin-bottom: 28px;
    }
    
    #iw-loading .loader-icon {
        font-size: 40px;
    }
    
    #iw-loading .loading-text {
        font-size: 19px;
    }
    
    #iw-loading .loading-subtext {
        font-size: 14px;
    }
    
    #iw-loading .loading-progress {
        margin-top: 26px;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 900px) {
    #iw-form-wrapper #iw-form-container {
        max-width: 700px;
        padding: 40px 30px;
    }
}

/* ============================================
   TABLET OPTIMIERUNG (bis 768px)
   ============================================ */
@media (max-width: 768px) {
    #iw-form-wrapper {
        padding: 20px 10px;
    }

    #iw-form-wrapper #iw-form-container {
        padding: 30px 20px;
        border-radius: 16px;
    }

    /* Progress Bar */
    .iw-progress-wrapper {
        margin-bottom: 40px;
    }

    /* Überschriften */
    #iw-form-wrapper .step h2 {
        font-size: 24px;
        margin-bottom: 25px;
        line-height: 1.2;
    }

    /* Option Grid - 2 Spalten auf Tablet */
    #iw-form-wrapper .option-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    #iw-form-wrapper .option-card {
        padding: 20px 15px;
    }

    #iw-form-wrapper .option-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    #iw-form-wrapper .option-label {
        font-size: 16px;
    }

    /* Bebaubarkeit Grid - auch 2 Spalten */
    #iw-form-wrapper #bebaubarkeit-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    #iw-form-wrapper #bebaubarkeit-grid .option-card {
        padding: 18px 12px;
    }

    #iw-form-wrapper #bebaubarkeit-grid .option-label {
        font-size: 15px;
    }

    /* Checkmark anpassen */
    #iw-form-wrapper .option-card.selected::after {
        width: 28px;
        height: 28px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }

    /* Form Rows */
    #iw-form-wrapper .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Buttons */
    #iw-form-wrapper .button-group {
        flex-direction: column;
    }

    #iw-form-wrapper button {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Number Selector */
    #iw-form-wrapper .number-selector {
        gap: 20px;
    }

    #iw-form-wrapper .num-btn {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    #iw-form-wrapper .number-selector input {
        width: 100px;
        font-size: 36px;
    }

    /* Energy Grid - 4 Spalten auf Tablet */
    #iw-form-wrapper .energy-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    #iw-form-wrapper .energy-card .energy-label {
        padding: 18px 12px;
        font-size: 16px;
    }

    #iw-form-wrapper .energy-card.unknown .energy-label {
        grid-column: span 2;
    }

    /* Interest Options - 2 Spalten auf Tablet */
    #iw-form-wrapper .interest-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    #iw-form-wrapper .interest-card .card-content {
        padding: 20px 15px;
        font-size: 15px;
    }

    /* Radio Groups - WICHTIG: Immer 1 Spalte auf Tablet/Mobile */
    #iw-form-wrapper .radio-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #iw-form-wrapper .radio-option label {
        padding: 14px 16px;
        font-size: 15px;
    }
}

/* ============================================
   MOBILE OPTIMIERUNG (bis 480px)
   ============================================ */

@media (max-width: 480px) {
    /* Container noch kompakter */
    #iw-form-wrapper {
        padding: 15px 8px;
    }

    #iw-form-wrapper #iw-form-container {
        padding: 25px 15px;
        border-radius: 12px;
    }
    
    #iw-form-container {
        min-height: 550px; /* Angepasst für kleine Handys */
    }
    
    #immobilienForm {
        min-height: 400px;
    }
    
    /* Loading Screen für kleine Handys */
    #iw-loading .loading-content {
        width: calc(100% - 30px);
        padding: 35px 20px;
        border-radius: 16px;
    }
    
    #iw-loading .loader-spinner {
        width: 85px;
        height: 85px;
        margin-bottom: 22px;
    }
    
    #iw-loading .loader-icon {
        font-size: 36px;
    }
    
    #iw-loading .loading-text {
        font-size: 17px;
        margin-bottom: 6px;
    }
    
    #iw-loading .loading-subtext {
        font-size: 13px;
    }
    
    #iw-loading .loading-progress {
        margin-top: 22px;
    }
    
    #iw-loading .progress-dot {
        width: 8px;
        height: 8px;
    }

    /* Progress Bar kompakter */
    .iw-progress-wrapper {
        margin-bottom: 35px;
    }

    .iw-progress-bar {
        height: 8px;
    }

    .iw-progress-text {
        font-size: 14px;
    }

    /* Überschriften optimiert */
    #iw-form-wrapper .step h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    /* Option Grid - 2x2 Grid für Mobile! */
    #iw-form-wrapper .option-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 0 0 10px 0;
    }

    #iw-form-wrapper .option-card {
        padding: 18px 12px;
        border-width: 2px;
        border-radius: 12px;
    }

    #iw-form-wrapper .option-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }

    #iw-form-wrapper .option-label {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
    }

    /* Checkmark kleiner */
    #iw-form-wrapper .option-card.selected::after {
        width: 24px;
        height: 24px;
        font-size: 14px;
        top: 8px;
        right: 8px;
    }

    /* Form Inputs */
    #iw-form-wrapper input[type="text"],
    #iw-form-wrapper input[type="email"],
    #iw-form-wrapper input[type="tel"],
    #iw-form-wrapper input[type="number"],
    #iw-form-wrapper select,
    #iw-form-wrapper textarea {
        padding: 14px 16px;
        font-size: 16px;
    }

    #iw-form-wrapper .form-group {
        margin-bottom: 20px;
    }

    /* Buttons kompakter */
    #iw-form-wrapper button {
        padding: 14px 24px;
        font-size: 15px;
    }

    /* Number Selector */
    #iw-form-wrapper .number-selector {
        gap: 15px;
    }

    #iw-form-wrapper .num-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    #iw-form-wrapper .number-selector input {
        width: 90px;
        font-size: 30px;
    }

    /* Energy Grid - 3 Spalten für bessere Übersicht! */
    #iw-form-wrapper .energy-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    #iw-form-wrapper .energy-card .energy-label {
        padding: 16px 10px;
        font-size: 15px;
        border-width: 2px;
    }

    #iw-form-wrapper .energy-card.unknown .energy-label {
        grid-column: span 3;
        font-size: 15px;
    }

    /* Bebaubarkeit Grid - 1 Spalte auf Mobile für Lesbarkeit */
    #iw-form-wrapper #bebaubarkeit-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #iw-form-wrapper #bebaubarkeit-grid .option-card {
        padding: 16px 14px;
    }

    #iw-form-wrapper #bebaubarkeit-grid .option-label {
        font-size: 15px;
    }

    /* Interest Options - 2 Spalten auf Mobile */
    #iw-form-wrapper .interest-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #iw-form-wrapper .interest-card .card-content {
        padding: 18px 12px;
        font-size: 14px;
    }

    /* Radio Groups - 1 Spalte, kompakter */
    #iw-form-wrapper .radio-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #iw-form-wrapper .radio-option label {
        padding: 12px 14px;
        font-size: 14px;
        gap: 10px;
    }

    #iw-form-wrapper .radio-option label::before {
        width: 18px;
        height: 18px;
    }

    /* Labels kompakter */
    #iw-form-wrapper label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    /* Step-Hint */
    #iw-form-wrapper .step-hint {
        font-size: 14px;
        margin-bottom: 20px;
    }

    /* Map auf Mobile kleiner */
    #iw-form-wrapper #map-wrapper iframe {
        height: 250px !important;
    }
}

/* ============================================
   SEHR KLEINE MOBILE GERÄTE (bis 360px)
   ============================================ */
@media (max-width: 360px) {
    #iw-form-wrapper #iw-form-container {
        padding: 20px 12px;
    }
    
    #iw-form-container {
        min-height: 500px; /* Minimal für sehr kleine Geräte */
    }
    
    #immobilienForm {
        min-height: 350px;
    }
    
    /* Loading Screen für sehr kleine Geräte */
    #iw-loading .loading-content {
        width: calc(100% - 24px);
        padding: 30px 16px;
        border-radius: 14px;
        max-width: 320px;
    }
    
    #iw-loading .loader-spinner {
        width: 75px;
        height: 75px;
        margin-bottom: 18px;
    }
    
    #iw-loading .loader-icon {
        font-size: 32px;
    }
    
    #iw-loading .loading-text {
        font-size: 16px;
        margin-bottom: 5px;
        line-height: 1.2;
    }
    
    #iw-loading .loading-subtext {
        font-size: 12px;
        line-height: 1.4;
    }
    
    #iw-loading .loading-progress {
        margin-top: 18px;
        gap: 8px;
    }
    
    #iw-loading .progress-dot {
        width: 7px;
        height: 7px;
    }

    #iw-form-wrapper .step h2 {
        font-size: 18px;
        margin-bottom: 18px;
    }

    /* Option Grid */
    #iw-form-wrapper .option-grid {
        gap: 8px;
    }

    #iw-form-wrapper .option-card {
        padding: 15px 10px;
    }

    #iw-form-wrapper .option-icon {
        font-size: 36px;
        margin-bottom: 8px;
    }

    #iw-form-wrapper .option-label {
        font-size: 13px;
    }

    /* Energy Grid - kompakter */
    #iw-form-wrapper .energy-grid {
        gap: 6px;
    }

    #iw-form-wrapper .energy-card .energy-label {
        padding: 14px 8px;
        font-size: 14px;
    }

    /* Bebaubarkeit */
    #iw-form-wrapper #bebaubarkeit-grid .option-label {
        font-size: 14px;
    }

    /* Interest Options */
    #iw-form-wrapper .interest-card .card-content {
        padding: 16px 10px;
        font-size: 13px;
    }

    /* Radio Groups */
    #iw-form-wrapper .radio-option label {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Buttons */
    #iw-form-wrapper button {
        padding: 12px 20px;
        font-size: 14px;
    }
}
