/* Immobilien Bewertung Plugin - Frontend Styles */

.ib-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Progress Bar */
.ib-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.ib-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    background: #e5e7eb;
    border-radius: 6px;
    min-width: 150px;
    transition: all 0.3s ease;
}

.ib-progress-step.active {
    background: var(--ib-progress-active, #1e3a8a);
    color: white;
}

.ib-progress-step.completed {
    background: var(--ib-progress-completed, #10b981);
    color: white;
}

.ib-step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.ib-progress-step.active .ib-step-number {
    background: var(--ib-secondary-color, #f97316);
}

.ib-progress-step.completed .ib-step-number {
    background: rgba(255, 255, 255, 0.3);
}

.ib-step-label {
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
}

.ib-progress-arrow {
    font-size: 20px;
    color: #9ca3af;
}

/* Form Steps */
.ib-step {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.ib-step-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #1f2937;
}

/* Property Types Grid */
.ib-property-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ib-property-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.ib-property-type-card:hover {
    border-color: var(--ib-primary-color, #1e3a8a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ib-property-type-card.selected {
    border-color: var(--ib-primary-color, #1e3a8a);
    background: var(--ib-primary-color, #1e3a8a);
    color: white;
}

.ib-property-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ib-property-type-card.selected .ib-property-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Icon Styles - Emoji Icons */
.ib-icon-house::before { 
    content: '🏠'; 
    font-size: 48px;
}
.ib-icon-house-construction::before { 
    content: '🏗️'; 
    font-size: 48px;
}
.ib-icon-houses::before { 
    content: '🏘️'; 
    font-size: 48px;
}
.ib-icon-apartment::before { 
    content: '🏢'; 
    font-size: 48px;
}
.ib-icon-apartment-building::before { 
    content: '🏬'; 
    font-size: 48px;
}
.ib-icon-building-shop::before { 
    content: '🏪'; 
    font-size: 48px;
}
.ib-icon-building-office::before { 
    content: '🏛️'; 
    font-size: 48px;
}
.ib-icon-land::before { 
    content: '🌳'; 
    font-size: 48px;
}

.ib-property-type-card.selected .ib-property-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

.ib-property-label {
    font-size: 14px;
    text-align: center;
    font-weight: 500;
}

/* Fields Container */
.ib-fields-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.ib-field-group {
    margin-bottom: 25px;
}

.ib-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.ib-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #f9fafb;
}

.ib-input:focus {
    outline: none;
    border-color: var(--ib-primary-color, #1e3a8a);
    background: white;
}

/* Slider */
.ib-slider-container {
    position: relative;
}

.ib-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.ib-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ib-primary-color, #1e3a8a);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ib-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ib-primary-color, #1e3a8a);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ib-slider-value {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: #374151;
    color: white;
    border-radius: 4px;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

/* Star Rating */
.ib-stars-container {
    margin-top: 10px;
}

.ib-stars-wrapper {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.ib-star {
    font-size: 28px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ib-star.active,
.ib-star:hover {
    color: var(--ib-star-active, #1e3a8a);
}

.ib-star-description {
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
    min-height: 20px;
    margin-top: 5px;
    display: none;
}

.ib-star-description:not(:empty) {
    display: block;
}

/* Toggle Switch */
.ib-toggle-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.ib-toggle-label-left {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    min-width: 50px;
    text-align: right;
}

.ib-toggle-label-right {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    min-width: 50px;
    text-align: left;
}

.ib-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.ib-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ib-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 30px;
}

.ib-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.ib-toggle-switch input:checked + .ib-toggle-slider {
    background-color: var(--ib-toggle-active, #1e3a8a);
}

.ib-toggle-switch input:checked + .ib-toggle-slider:before {
    transform: translateX(30px);
}

.ib-toggle-switch:hover .ib-toggle-slider {
    box-shadow: 0 0 1px var(--ib-toggle-active, #1e3a8a);
}

.ib-toggle-label-right.active {
    color: var(--ib-toggle-active, #1e3a8a);
    font-weight: 600;
}

.ib-toggle-label-left.active {
    color: var(--ib-toggle-active, #1e3a8a);
    font-weight: 600;
}

/* Validation Styles */
.ib-input.error,
.ib-select.error,
.ib-slider.error,
.ib-stars-container.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.ib-field-group.error .ib-label {
    color: #ef4444;
}

.ib-error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Select Dropdown */
.ib-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.ib-select:focus {
    outline: none;
    border-color: var(--ib-primary-color, #1e3a8a);
    background: white;
}

/* Address & Map */
.ib-address-container {
    margin-bottom: 20px;
}

.ib-address-input {
    margin-bottom: 20px;
}

.ib-map-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    position: relative;
}

.ib-map-container .leaflet-container {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Summary */
.ib-summary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.ib-summary-section {
    background: #f9fafb;
    padding: 20px;
    border-radius: 6px;
}

.ib-summary-section h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1f2937;
}

.ib-summary-item {
    margin-bottom: 10px;
    font-size: 14px;
}

.ib-summary-item strong {
    color: #374151;
}

/* Personal Fields */
.ib-personal-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

@media (max-width: 768px) {
    .ib-personal-fields {
        grid-template-columns: 1fr;
    }
}

.ib-personal-fields .ib-field-group {
    display: flex;
    flex-direction: column;
}

.ib-personal-fields .ib-label {
    margin-bottom: 8px;
}

.ib-personal-fields .ib-input {
    width: 100%;
}

.ib-info-text {
    margin: 20px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.ib-consent-box {
    border: 2px solid #ef4444;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    background: #fef2f2;
    transition: border-color 0.3s ease;
}

.ib-consent-box.valid {
    border-color: #10b981;
    background: #d1fae5;
}

.ib-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
}

.ib-checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.ib-checkbox-label a {
    color: var(--ib-primary-color, #1e3a8a);
    text-decoration: underline;
}

/* Buttons */
.ib-step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.ib-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ib-btn-next,
.ib-btn-submit {
    background: var(--ib-button-bg, #1e3a8a);
    color: white;
}

.ib-btn-next:hover,
.ib-btn-submit:hover {
    background: var(--ib-button-hover, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.ib-btn-back {
    background: #e5e7eb;
    color: #374151;
}

.ib-btn-back:hover {
    background: #d1d5db;
}

.ib-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ib-btn-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Messages */
.ib-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
    font-weight: 500;
}

.ib-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.ib-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .ib-progress-bar {
        flex-direction: column;
    }
    
    .ib-progress-arrow {
        transform: rotate(90deg);
    }
    
    .ib-property-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ib-fields-container,
    .ib-personal-fields {
        grid-template-columns: 1fr;
    }
    
    .ib-step {
        padding: 20px;
    }
    
    .ib-step-actions {
        flex-direction: column;
    }
    
    .ib-btn {
        width: 100%;
        justify-content: center;
    }
}

