/* ============================================
   BODENPLATTEN-KOSTEN RECHNER CSS - EINGEBETTET
   ============================================ */

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Widget Container mit lokalen Variablen */
.bodenplatten-widget {
    /* Lokale CSS Variablen nur für Widget */
    --bp-primary: #1a1f36;
    --bp-accent: #2d5016;
    --bp-accent-light: #4a7c28;
    --bp-accent-dark: #1e3a0f;
    --bp-success: #4a7c28;
    --bp-warning: #ffb800;
    --bp-danger: #ff4757;
    --bp-background: #f8f9fb;
    --bp-surface: #ffffff;
    --bp-text-primary: #1a1f36;
    --bp-text-secondary: #6b7280;
    --bp-text-muted: #9ca3af;
    --bp-border: #e5e7eb;
    --bp-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --bp-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --bp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Widget Basis-Styles - OHNE RAHMEN & SCHATTEN */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent; /* Transparent statt weiß */
    border-radius: 0; /* Kein Rahmen */
    padding: 32px 0; /* Seitliches Padding entfernt */
    max-width: 600px;
    width: 100%;
    margin: 40px auto;
    box-shadow: none; /* Kein Schatten */
    position: relative;
    overflow: visible; /* Overflow sichtbar */
    box-sizing: border-box;
}

/* Reset nur für Widget-Elemente */
.bodenplatten-widget * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Top-Linie als dezentes Trennelement */
.bodenplatten-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bp-accent), var(--bp-accent-light));
    border-radius: 2px;
}

/* Header */
.bodenplatten-widget .widget-header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 20px; /* Mehr Abstand zur Top-Linie */
}

.bodenplatten-widget .widget-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bp-accent), var(--bp-accent-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    box-shadow: 0 8px 16px rgba(45, 80, 22, 0.2);
    line-height: 1;
}

.bodenplatten-widget .widget-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--bp-text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.bodenplatten-widget .widget-subtitle {
    color: var(--bp-text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* Form Sections */
.bodenplatten-widget .form-section {
    margin-bottom: 28px;
}

.bodenplatten-widget .form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bodenplatten-widget .label-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-text-primary);
}

.bodenplatten-widget .label-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--bp-accent);
    background: rgba(45, 80, 22, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Area Slider */
.bodenplatten-widget .slider-container {
    position: relative;
    padding: 8px 0;
}

.bodenplatten-widget .slider {
    width: 100%;
    height: 8px;
    background: var(--bp-border);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    position: relative;
}

.bodenplatten-widget .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--bp-surface);
    border: 3px solid var(--bp-accent);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.bodenplatten-widget .slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
}

.bodenplatten-widget .slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.bodenplatten-widget .slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--bp-surface);
    border: 3px solid var(--bp-accent);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.bodenplatten-widget .slider-track-fill {
    position: absolute;
    height: 8px;
    background: linear-gradient(90deg, var(--bp-accent), var(--bp-accent-light));
    border-radius: 4px;
    pointer-events: none;
    transition: width 0.2s ease;
}

.bodenplatten-widget .slider-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
}

.bodenplatten-widget .slider-mark {
    font-size: 11px;
    color: var(--bp-text-muted);
}

/* Selection Cards */
.bodenplatten-widget .selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bodenplatten-widget .selection-card {
    border: 2px solid var(--bp-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bp-surface);
    position: relative;
}

.bodenplatten-widget .selection-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--bp-shadow-md);
    border-color: var(--bp-accent);
}

.bodenplatten-widget .selection-card.active {
    border-color: var(--bp-accent);
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.05), rgba(45, 80, 22, 0.02));
}

.bodenplatten-widget .selection-card.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--bp-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.bodenplatten-widget .card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-text-primary);
    margin-bottom: 4px;
}

.bodenplatten-widget .card-price {
    font-size: 12px;
    color: var(--bp-text-secondary);
}

/* Toggle Switches */
.bodenplatten-widget .extras-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bodenplatten-widget .extra-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: var(--bp-background);
    border-radius: 10px;
    transition: all 0.2s;
}

.bodenplatten-widget .extra-item:hover {
    background: linear-gradient(90deg, var(--bp-background), rgba(45, 80, 22, 0.03));
}

.bodenplatten-widget .extra-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bodenplatten-widget .extra-icon {
    width: 36px;
    height: 36px;
    background: var(--bp-surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.bodenplatten-widget .extra-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bodenplatten-widget .extra-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-text-primary);
    line-height: 1.2;
}

.bodenplatten-widget .extra-price {
    font-size: 12px;
    color: var(--bp-text-secondary);
    line-height: 1.2;
}

/* Toggle Switch */
.bodenplatten-widget .toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    display: block;
}

.bodenplatten-widget .toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.bodenplatten-widget .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bp-border);
    transition: 0.3s;
    border-radius: 24px;
}

.bodenplatten-widget .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bodenplatten-widget .toggle-input:checked + .toggle-slider {
    background: var(--bp-accent);
}

.bodenplatten-widget .toggle-input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Results */
.bodenplatten-widget .results-container {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 2px solid var(--bp-border);
}

.bodenplatten-widget .total-cost {
    background: linear-gradient(135deg, var(--bp-accent), var(--bp-accent-light));
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(45, 80, 22, 0.3);
}

.bodenplatten-widget .total-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 8px;
    line-height: 1;
}

.bodenplatten-widget .total-amount {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.bodenplatten-widget .total-per-sqm {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1;
}

/* Cost Breakdown */
.bodenplatten-widget .breakdown-container {
    background: var(--bp-background);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.bodenplatten-widget .breakdown-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.bodenplatten-widget .breakdown-item {
    margin-bottom: 16px;
}

.bodenplatten-widget .breakdown-item:last-child {
    margin-bottom: 0;
}

.bodenplatten-widget .breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bodenplatten-widget .breakdown-label {
    font-size: 13px;
    color: var(--bp-text-secondary);
}

.bodenplatten-widget .breakdown-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text-primary);
}

.bodenplatten-widget .breakdown-bar {
    height: 8px;
    background: var(--bp-border);
    border-radius: 4px;
    overflow: hidden;
}

.bodenplatten-widget .breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bodenplatten-widget .fill-material {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.bodenplatten-widget .fill-labor {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.bodenplatten-widget .fill-extra {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* Savings Tips */
.bodenplatten-widget .tips-container {
    background: linear-gradient(135deg, #f0f9e8, #e8f5e0);
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid var(--bp-accent);
}

.bodenplatten-widget .tips-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-accent);
    margin-bottom: 12px;
    line-height: 1;
}

.bodenplatten-widget .tips-list {
    font-size: 13px;
    line-height: 1.6;
    color: var(--bp-text-primary);
}

.bodenplatten-widget .tip-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.bodenplatten-widget .tip-item:last-child {
    margin-bottom: 0;
}

.bodenplatten-widget .tip-bullet {
    color: var(--bp-accent);
    font-weight: 700;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 480px) {
    .bodenplatten-widget {
        padding: 24px 0;
        margin: 20px auto;
    }

    .bodenplatten-widget .widget-title {
        font-size: 22px;
    }

    .bodenplatten-widget .selection-grid {
        grid-template-columns: 1fr;
    }

    .bodenplatten-widget .total-amount {
        font-size: 36px;
    }
}

/* Animations nur für Widget */
@keyframes bp-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bodenplatten-widget .form-section {
    animation: bp-slideIn 0.4s ease-out backwards;
}

.bodenplatten-widget .form-section:nth-child(2) { 
    animation-delay: 0.1s; 
}

.bodenplatten-widget .form-section:nth-child(3) { 
    animation-delay: 0.2s; 
}

.bodenplatten-widget .form-section:nth-child(4) { 
    animation-delay: 0.3s; 
}

.bodenplatten-widget .results-container { 
    animation: bp-slideIn 0.5s ease-out backwards; 
    animation-delay: 0.4s; 
}