/* ============================================================
   Konfigurator-Seite Styles
   Extrahiert aus index.html (Z. 3591–4547) am 2026-05-16
   ============================================================ */

/* Polster Konfigurator Modal Styles */
        .polster-konfigurator-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 10002;
            overflow-y: auto;
        }

        .polster-konfigurator-modal * {
            box-sizing: border-box;
        }

        /* Progress Indicator */
        .polster-progress {
            display: flex;
            justify-content: space-between;
            position: relative;
            padding: 0 10px;
            margin-bottom: 30px;
        }

        .polster-progress::before {
            content: '';
            position: absolute;
            top: 18px;
            left: 40px;
            right: 40px;
            height: 2px;
            background: #e0e0e0;
            z-index: 0;
        }

        .polster-progress-item {
            flex: 1;
            text-align: center;
            position: relative;
            z-index: 1;
        }

        .polster-progress-circle {
            width: 36px;
            height: 36px;
            background: white;
            color: #999;
            border: 2px solid #e0e0e0;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            margin-bottom: 6px;
            transition: all 0.3s;
            font-size: 14px;
        }

        /* Active Status - Yellow */
        .polster-progress-item.active .polster-progress-circle {
            background: #ffc107 !important;
            color: #000 !important;
            border-color: #ffc107 !important;
        }

        /* Completed Status - Green */
        .polster-progress-item.completed .polster-progress-circle {
            background: #28a745 !important;
            color: white !important;
            border-color: #28a745 !important;
        }

        .polster-progress-label {
            font-size: 12px;
            color: #666;
        }

        /* Steps Container */
        .polster-content {
            flex: 1;
            padding: 40px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        /* Step Styles */
        .polster-step {
            display: none !important;
            flex: 1;
            flex-direction: column;
        }

        .polster-step.active {
            display: flex !important;
            animation: polsterFadeIn 0.3s ease;
        }

        @keyframes polsterFadeIn {
            from {
                opacity: 0;
                transform: translateX(20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* Button Styles - Yellow Buttons */
        .polster-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .polster-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .polster-btn-primary {
            background: #ffc107 !important;
            color: #000 !important;
        }

        .polster-btn-primary:hover:not(:disabled) {
            background: #ffb300 !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .polster-btn-secondary {
            background: #6c757d !important;
            color: white !important;
        }

        .polster-btn-secondary:hover:not(:disabled) {
            background: #545b62 !important;
        }

        .polster-btn-success {
            background: #28a745 !important;
            color: white !important;
        }

        .polster-btn-success:hover:not(:disabled) {
            background: #218838 !important;
        }

        /* Form Content */
        .polster-form-content {
            flex: 1;
            overflow-y: auto;
            padding-right: 10px;
            margin-bottom: 20px;
        }

        /* Button Group */
        .polster-button-group {
            display: flex;
            justify-content: space-between;
            gap: 15px;
            margin-top: auto;
            padding-top: 30px;
        }

        .polster-button-group.single {
            justify-content: flex-end;
        }

        /* Summary Styles */
        .polster-summary {
            background: white;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 25px;
            border: 1px solid #e0e0e0;
        }

        .polster-summary h3 {
            color: #2c3e50;
            font-size: 18px;
            margin-bottom: 15px;
        }

        .polster-summary-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #f0f0f0;
            font-size: 14px;
        }

        .polster-konfigurator-dialog {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .polster-konfigurator-content {
            background: white;
            width: 100%;
            max-width: 1400px;
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            overflow: hidden;
            animation: polsterSlideIn 0.3s ease-out;
        }

        @keyframes polsterSlideIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Header */
        .polster-konfigurator-header {
            background: #ffc107;
            color: #000;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .polster-konfigurator-header h2 {
            margin: 0;
            font-size: 24px;
            color: #000;
            font-weight: 600;
        }

        .polster-konfigurator-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: #000000;
            font-size: 28px;
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .polster-konfigurator-close:hover {
            background: rgba(255, 255, 255, 0.4);
            transform: rotate(90deg);
        }

        /* Body */
        .polster-konfigurator-body {
            display: flex;
            min-height: 700px;
        }

        /* Sidebar */
        .polster-konfigurator-sidebar {
            width: 400px;
            padding: 30px;
            background: #f8f9fa;
            overflow-y: auto;
        }

        /* Summary Item */
        .polster-summary-item:last-child {
            border-bottom: none;
        }

        .polster-summary-label {
            color: #666;
        }

        .polster-summary-value {
            color: #333;
            font-weight: 500;
        }

        /* Steps Header */
        .polster-step h2 {
            color: #2c3e50;
            font-size: 24px;
            margin-bottom: 15px;
        }

        .polster-step>p {
            color: #666;
            margin-bottom: 25px;
            font-size: 16px;
        }

        /* Shape Grid */
        .polster-shapes-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 15px;
            padding: 5px;
        }

        .polster-shape-item {
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s;
            text-align: center;
        }

        .polster-shape-item:hover {
            border-color: #ffc107;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .polster-shape-item.selected {
            border-color: #ffc107;
            background: #fff8dc;
        }

        .polster-shape-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 15px;
            position: relative;
            background: #f8f9fa;
            border-radius: 8px;
            overflow: hidden;
        }

        .polster-shape-icon img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 1;
        }

        .polster-shape-item.selected .polster-shape-icon::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border: 3px solid #ffc107;
            border-radius: 8px;
            z-index: 2;
            pointer-events: none;
        }

        .polster-shape-icon svg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 60px;
            height: 60px;
            display: none;
            z-index: 1;
        }

        .polster-view-gallery {
            position: absolute;
            top: 5px;
            right: 5px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            border: none;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            transition: all 0.3s;
            font-size: 12px;
            z-index: 3;
        }

        .polster-shape-item:hover .polster-view-gallery {
            opacity: 1;
        }

        .polster-view-gallery:hover {
            background: #ffc107;
            color: #000;
        }

        .polster-shape-name {
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }

        /* Form Groups */
        .polster-form-group {
            margin-bottom: 25px;
        }

        .polster-form-group label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: #333;
        }

        .polster-form-group label i {
            margin-right: 8px;
            color: #ffc107;
        }

        /* Dimension Visual */
        .polster-dimension-visual {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
            border: 1px solid #e0e0e0;
        }

        /* Dimension Visualization */
        .polster-shape-diagram {
            position: relative;
            display: inline-block;
            margin: 20px auto;
        }

        .polster-dimension-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .polster-dimension-label {
            display: flex;
            align-items: center;
            justify-content: center;
            transform: translate(-50%, -50%);
        }

        .polster-dimension-marker {
            width: 30px;
            height: 30px;
            background: #ffc107;
            color: #000;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 16px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        }

        /* Dimension Inputs */
        .polster-dimension-inputs {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .polster-dimension-input {
            display: flex;
            flex-direction: column;
        }

        .polster-dimension-input label {
            font-size: 14px;
            color: #666;
            margin-bottom: 5px;
        }

        .polster-dimension-input input {
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 16px;
            transition: border-color 0.2s;
        }

        .polster-dimension-input input:focus {
            outline: none;
            border-color: #ffc107;
        }

        /* Select */
        .polster-select {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 16px;
            background: white;
            cursor: pointer;
            transition: border-color 0.2s;
        }

        .polster-select:focus {
            outline: none;
            border-color: #ffc107;
        }

        /* Radio Group */
        .polster-radio-group {
            display: flex;
            gap: 15px;
            margin-top: 15px;
        }

        .polster-radio-item {
            flex: 1;
        }

        .polster-radio-item input[type="radio"] {
            position: absolute;
            opacity: 0;
        }

        .polster-radio-item label {
            display: block;
            padding: 12px 20px;
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .polster-radio-item input[type="radio"]:checked+label {
            background: #fff8dc;
            border-color: #ffc107;
            color: #000;
            font-weight: 500;
        }

        /* Material Categories */
        .polster-category-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            border-bottom: 2px solid #e0e0e0;
            padding-bottom: 0;
        }

        .polster-category-tab {
            padding: 10px 20px;
            background: none;
            border: none;
            color: #666;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            position: relative;
            transition: color 0.3s;
        }

        .polster-category-tab:hover {
            color: #ffc107;
        }

        .polster-category-tab.active {
            color: #ffc107;
        }

        .polster-category-tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 2px;
            background: #ffc107;
        }

        /* Material Grid */
        .polster-material-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 15px;
            max-height: 400px;
            overflow-y: auto;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .polster-material-item {
            position: relative;
            cursor: pointer;
        }

        .polster-material-item input[type="radio"] {
            position: absolute;
            opacity: 0;
        }

        .polster-material-item label {
            display: block;
            text-align: center;
            padding: 10px;
            border-radius: 8px;
            transition: all 0.3s;
        }

        .polster-material-swatch {
            width: 70px;
            height: 70px;
            border-radius: 8px;
            margin: 0 auto 8px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
            border: 2px solid transparent;
            transition: all 0.3s;
        }

        .polster-material-name {
            font-size: 12px;
            color: #666;
        }

        .polster-material-item:hover .polster-material-swatch {
            transform: scale(1.05);
        }

        .polster-material-item input[type="radio"]:checked+label {
            background: #fff8dc;
            border-radius: 8px;
        }

        .polster-material-item input[type="radio"]:checked+label .polster-material-swatch {
            border-color: #ffc107;
            box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
        }

        /* File Upload */
        .polster-file-upload {
            border: 2px dashed #e0e0e0;
            border-radius: 8px;
            padding: 40px;
            text-align: center;
            transition: all 0.3s;
            cursor: pointer;
            background: #fafafa;
        }

        .polster-file-upload:hover {
            border-color: #ffc107;
            background: #fffbf0;
        }

        .polster-file-upload.dragover {
            background: #fff8dc;
            border-color: #ffc107;
        }

        .polster-file-upload-icon {
            font-size: 48px;
            color: #ffc107;
            margin-bottom: 15px;
        }

        .polster-file-upload-text {
            color: #666;
            font-size: 16px;
            margin-bottom: 5px;
        }

        .polster-file-upload-text small {
            display: block;
            font-size: 14px;
            color: #999;
            margin-top: 5px;
        }

        /* Success Screen */
        .polster-success {
            text-align: center;
            padding: 60px 40px;
        }

        .polster-success-icon {
            font-size: 80px;
            color: #28a745;
            margin-bottom: 25px;
        }

        .polster-success h2 {
            color: #28a745;
            margin-bottom: 15px;
            font-size: 28px;
        }

        .polster-success p {
            color: #666;
            margin-bottom: 20px;
            font-size: 16px;
        }

        /* Notice Box */
        .polster-notice {
            background: #fff8dc;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            color: #856404;
            font-size: 14px;
            border: 1px solid #ffeaa7;
        }

        .polster-notice i {
            margin-right: 8px;
        }

        /* Gallery Modal */
        .polster-gallery-modal {
            display: none;
            position: fixed;
            z-index: 10005;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.95);
            animation: fadeIn 0.3s;
        }

        .polster-gallery-content {
            position: relative;
            width: 90%;
            max-width: 1000px;
            max-height: 90vh;
            margin: 5vh auto;
            background: white;
            padding: 20px;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
        }

        .polster-gallery-close {
            position: absolute;
            right: 15px;
            top: 15px;
            font-size: 30px;
            color: #666;
            cursor: pointer;
            background: none;
            border: none;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s;
            z-index: 10;
        }

        .polster-gallery-close:hover {
            background: #f0f0f0;
        }

        #polster-gallery-title {
            text-align: center;
            margin-bottom: 20px;
            color: #333;
            font-size: 24px;
            font-weight: 600;
        }

        .polster-gallery-main {
            width: 100%;
            height: 60vh;
            min-height: 400px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #fff;
            margin-bottom: 20px;
            border-radius: 8px;
            overflow: hidden;
        }

        .polster-gallery-main img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            display: block;
        }

        .polster-gallery-thumbs {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
            padding: 10px;
            background: #f8f9fa;
            border-radius: 8px;
            max-height: 120px;
            overflow-x: auto;
            overflow-y: hidden;
        }

        .polster-gallery-thumb {
            width: 80px;
            height: 80px;
            border: 2px solid #e0e0e0;
            border-radius: 4px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s;
            flex-shrink: 0;
        }

        .polster-gallery-thumb:hover,
        .polster-gallery-thumb.active {
            border-color: #ffc107;
            transform: scale(1.05);
        }

        .polster-gallery-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* Scrollbar */
        .polster-konfigurator-sidebar::-webkit-scrollbar,
        .polster-content::-webkit-scrollbar,
        .polster-material-grid::-webkit-scrollbar,
        .polster-form-content::-webkit-scrollbar,
        .polster-gallery-thumbs::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        .polster-konfigurator-sidebar::-webkit-scrollbar-track,
        .polster-content::-webkit-scrollbar-track,
        .polster-material-grid::-webkit-scrollbar-track,
        .polster-form-content::-webkit-scrollbar-track,
        .polster-gallery-thumbs::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }

        .polster-konfigurator-sidebar::-webkit-scrollbar-thumb,
        .polster-content::-webkit-scrollbar-thumb,
        .polster-material-grid::-webkit-scrollbar-thumb,
        .polster-form-content::-webkit-scrollbar-thumb,
        .polster-gallery-thumbs::-webkit-scrollbar-thumb {
            background: #ccc;
            border-radius: 4px;
        }

        .polster-konfigurator-sidebar::-webkit-scrollbar-thumb:hover,
        .polster-content::-webkit-scrollbar-thumb:hover,
        .polster-material-grid::-webkit-scrollbar-thumb:hover,
        .polster-form-content::-webkit-scrollbar-thumb:hover,
        .polster-gallery-thumbs::-webkit-scrollbar-thumb:hover {
            background: #999;
        }

        /* Responsive */
        @media (max-width: 1200px) {
            .polster-konfigurator-body {
                flex-direction: column;
            }

            .polster-konfigurator-sidebar {
                width: 100%;
                padding: 20px;
                order: 2;
            }

            .polster-content {
                padding: 20px;
                order: 1;
            }
        }

        @media (max-width: 768px) {
            .polster-konfigurator-header {
                padding: 15px 20px;
            }

            .polster-konfigurator-header h2 {
                font-size: 20px;
            }

            .polster-dimension-inputs {
                grid-template-columns: 1fr;
            }

            .polster-radio-group {
                flex-direction: column;
            }

            .polster-button-group {
                flex-direction: column-reverse;
            }

            .polster-btn {
                width: 100%;
                justify-content: center;
            }

            .polster-progress-label {
                display: none;
            }

            .polster-shapes-grid {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            }

            .polster-material-grid {
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            }
        }

/* ============================================================
   STANDALONE-MODUS — FAQ-Style (grauer Body, weißer Container)
   ============================================================ */

body.polster-konfigurator-standalone {
    background: #eeeeee !important;
}

body.polster-konfigurator-standalone main {
    padding: 60px 0 80px !important;
}

/* Modal als statische Sektion */
body.polster-konfigurator-standalone .polster-konfigurator-modal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    overflow: visible !important;
    animation: none !important;
    z-index: auto !important;
    width: auto !important;
    height: auto !important;
}

body.polster-konfigurator-standalone .polster-konfigurator-dialog {
    min-height: auto !important;
    display: block !important;
    padding: 0 15px !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
}

/* Weißer FAQ-Container in der Mitte */
body.polster-konfigurator-standalone .polster-konfigurator-content {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    max-height: none !important;
    animation: none !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    display: block !important;
}

/* Gelben Modal-Header (Titel + Schließen-X) komplett verstecken */
body.polster-konfigurator-standalone .polster-konfigurator-header {
    display: none !important;
}

/* Kein horizontaler Scroll im Wizard / Form-Bereich */
body.polster-konfigurator-standalone .polster-konfigurator-body {
    overflow-x: hidden !important;
}
body.polster-konfigurator-standalone .polster-summary-section,
body.polster-konfigurator-standalone .polster-content {
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Auf engen Viewports: Spalten stapeln (Sidebar oben, Hauptbereich unten) */
@media (max-width: 991px) {
    body.polster-konfigurator-standalone .polster-konfigurator-body {
        flex-direction: column !important;
        height: auto !important;
    }
    body.polster-konfigurator-standalone .polster-summary-section,
    body.polster-konfigurator-standalone .polster-content {
        width: 100% !important;
        flex: none !important;
    }
}
