/**
 * QuarryMaster Konfigurator - Frontend Styles
 * Version: 1.0.0
 */

.qm-konfigurator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: #ffffff;
}

/* === CART LAYOUT SYSTEM === */

.qm-konfigurator-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 20px;
}

.qm-konfigurator-main {
    min-width: 0;
    /* Prevents grid overflow */
}

.qm-konfigurator-header {
    display: none;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.qm-konfigurator-header h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.qm-konfigurator-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.qm-konfigurator-content {
    padding: 20px 0;
}

.qm-test-message {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0;
    padding: 20px;
    text-align: center;
}

.qm-test-message p {
    margin: 10px 0;
    color: #495057;
}

.qm-test-message strong {
    color: #0C6934;
    font-size: 18px;
}

/* === STEPPER STYLES === */

/* Progress Bar */
.qm-stepper-progress {
    margin-bottom: 40px;
}

.qm-progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 2px;
    position: relative;
    margin-bottom: 20px;
}

.qm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0C6934, #0C6934);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 16.66%;
}

/* Progress Steps */
.qm-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.qm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qm-step-number {
    width: 40px;
    height: 40px;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.qm-step-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    transition: color 0.3s ease;
}

.qm-step.active .qm-step-number {
    background: #0C6934;
    color: white;
}

.qm-step.active .qm-step-label {
    color: #0C6934;
    font-weight: 600;
}

.qm-step.completed .qm-step-number {
    background: #0C6934;
    color: white;
}

.qm-step.completed .qm-step-label {
    color: #0C6934;
}

/* Stepper Content */
.qm-stepper-content {
    min-height: 400px;
    margin-bottom: 30px;
}

.qm-step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.qm-step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.qm-step-content h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
    border-bottom: 2px solid #0C6934;
    padding-bottom: 10px;
}

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

/* Form Styles */
.qm-form-group {
    margin-bottom: 20px;
}

.qm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.qm-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 0;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.qm-form-control:focus {
    outline: none;
    border-color: #0C6934;
    box-shadow: 0 0 0 3px rgba(12, 105, 52, 0.1);
}

.qm-form-control:invalid {
    border-color: #dc3545;
}

/* Placeholder für kommende Inhalte */
.qm-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 0;
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

.qm-placeholder p {
    margin: 0;
    font-size: 18px;
}

/* Navigation Buttons */
.qm-stepper-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.qm-btn {
    padding: 12px 24px;
    border: 2px solid #0C6934;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.qm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qm-btn-primary {
    background: #0C6934;
    color: white;
}

.qm-btn-primary:hover:not(:disabled) {
    background: #FDD835;
    color: #0C6934;
    transform: none;
}

.qm-btn-secondary {
    background: #FDD835;
    color: #0C6934;
    border-color: #FDD835;
}

.qm-btn-secondary:hover:not(:disabled) {
    background: #0C6934;
    color: white;
    border-color: #0C6934;
    transform: none;
}

.qm-btn-success {
    background: #0C6934;
    color: white;
}

.qm-btn-success:hover:not(:disabled) {
    background: #FDD835;
    color: #0C6934;
    transform: none;
}

/* Hilfe-Texte für Formularfelder */
.qm-field-help {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* Getriebe-Optionen Styling */
.qm-gear-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.qm-gear-option {
    border: 2px solid #e9ecef;
    border-radius: 0;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.qm-gear-option:hover {
    border-color: #0C6934;
    background-color: #f8f9fa;
}

.qm-gear-option input[type="radio"] {
    margin-right: 10px;
}

.qm-gear-option label {
    cursor: pointer;
    margin: 0;
    display: block;
}

.qm-gear-option input[type="radio"]:checked+label {
    color: #0C6934;
    font-weight: 600;
}

/* Hohlwellen-Auswahl Styling (Schritt 2: Abtriebsart) */
.qm-shaft-options-container {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.qm-shaft-option {
    flex: 1;
    min-width: 0;
    /* Verhindert Overflow bei langen Inhalten */
    transition: all 0.3s ease;
}

/* Shaft options - kein grüner "selected/checked" Zustand mehr - bleiben immer grau */

.qm-info-box {
    border-left: 4px solid #17a2b8;
}

/* Responsive: Bei kleinen Bildschirmen vertikal stapeln */
@media (max-width: 768px) {
    .qm-shaft-options-container {
        flex-direction: column;
        gap: 15px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .qm-konfigurator-wrapper {
        margin: 10px;
        padding: 15px;
    }

    .qm-konfigurator-header h2 {
        font-size: 24px;
    }

    .qm-konfigurator-header p {
        font-size: 14px;
    }

    .qm-progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .qm-step {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 80px;
    }

    .qm-step-number {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .qm-step-label {
        font-size: 11px;
    }

    .qm-step-content h3 {
        font-size: 20px;
    }

    .qm-stepper-navigation {
        flex-direction: column;
    }

    .qm-btn {
        width: 100%;
    }
}

/* ===========================
   EINBAULAGE STYLING (SCHRITT 4)
   =========================== */

/* Einbaulage Container */
.qm-mounting-positions-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Einbaulage Grid */
.qm-mounting-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* Einzelne Einbaulage Option */
.qm-mounting-option {
    position: relative;
}

.qm-mounting-image-container {
    border: 2px solid #dee2e6;
    border-radius: 0;
    padding: 10px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.qm-mounting-image-container:hover {
    border-color: #0C6934;
    box-shadow: none;
    transform: none;
}

.qm-mounting-image-container img {
    width: 100%;
    height: auto;
    max-width: 120px;
    display: block;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.qm-mounting-image-container:hover img {
    opacity: 0.9;
}

/* Hidden Radio Button */
.qm-mounting-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Selected State */
.qm-mounting-option input[type="radio"]:checked+.qm-mounting-image-container {
    border-color: #0C6934;
    background: #f8f9ff;
    box-shadow: none;
}

.qm-mounting-option input[type="radio"]:checked+.qm-mounting-image-container::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #0C6934;
    color: white;
    border-radius: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Section Headers */
.qm-mounting-section h4 {
    text-align: center;
    margin-bottom: 16px;
}

/* Responsive Einbaulage Grid */
@media (max-width: 768px) {
    .qm-mounting-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .qm-mounting-image-container {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .qm-mounting-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ===========================
   LACKIERUNG STYLING (SCHRITT 5)
   =========================== */

/* Lackierung Container */
.qm-paint-selection-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Color Grid */
.qm-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

/* Color Option */
.qm-color-option {
    position: relative;
}

.qm-color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Color Swatch */
.qm-color-swatch {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid #dee2e6;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qm-color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: #0C6934;
}

/* Color Checkmark */
.qm-color-checkmark {
    font-size: 24px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Selected Color State */
.qm-color-option input[type="radio"]:checked+.qm-color-swatch {
    border-color: #0C6934;
    box-shadow: none;
    transform: none;
}

.qm-color-option input[type="radio"]:checked+.qm-color-swatch .qm-color-checkmark {
    opacity: 1;
}

/* Color Info */
.qm-color-info {
    text-align: center;
    transition: all 0.3s ease;
}

.qm-color-option:hover .qm-color-info {
    transform: none;
}

/* Section Headers */
.qm-color-section h4,
.qm-custom-color-section h4 {
    text-align: center;
    margin-bottom: 16px;
}

/* Custom RAL Section - Styles entfernt, da jetzt qm-shaft-option verwendet wird */

/* Color Preview */
.qm-color-preview {
    width: 50px;
    height: 50px;
    border: 2px solid #dee2e6;
    border-radius: 0;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

/* Responsive Color Grid */
@media (max-width: 768px) {
    .qm-color-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .qm-color-swatch {
        width: 70px;
        height: 70px;
    }

    .qm-custom-color-container {
        padding: 15px;
        margin: 0 15px;
    }
}

@media (max-width: 480px) {
    .qm-color-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .qm-color-swatch {
        width: 60px;
        height: 60px;
    }

    .qm-color-checkmark {
        font-size: 20px;
    }

    .qm-ral-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .qm-color-preview {
        width: 100%;
        height: 40px;
    }
}

/* === STEP 6: ZUSAMMENFASSUNG (SUMMARY) === */

/* Summary Container */
.qm-summary-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Shimmer-Animation entfernt für eckigeres Design */

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.qm-breakdown-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.qm-breakdown-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Product Number Breakdown */
.qm-product-breakdown {
    border: 1px solid var(--qm-border);
    border-radius: 0;
    padding: 30px;
    margin-bottom: 40px;
    animation: none;
    list-style: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.qm-product-breakdown h3 {
    margin-bottom: 12px;
    text-align: center;
}

.qm-breakdown-segments {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.qm-segment {
    background: white;
    border-radius: 0;
    padding: 15px;
    text-align: center;
    min-width: 100px;
    transition: all 0.3s ease;
    cursor: pointer;
    list-style: none;
}

.qm-segment:hover {
    background: #0C6934;
    color: white;
    transform: none;
    box-shadow: none;
}

.qm-segment-code {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Courier New', Monaco, monospace;
}


.qm-segment-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}


.qm-segment-description {
    font-size: 0.8rem;
    line-height: 1.3;
}


.qm-segment-separator {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
}

/* Configuration Summary */
.qm-configuration-summary {
    margin-bottom: 40px;
}

.qm-configuration-summary h3 {
    font-size: 1.8rem;
    margin: 0 0 25px 0;
    text-align: center;
}

.qm-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.qm-summary-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: none;
}

.qm-summary-card:hover {
    border-color: #0C6934;
    transform: none;
    box-shadow: none;
}

.qm-summary-header {
    background: #f8f9fa;
    padding: 14px 16px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.qm-summary-icon {
    font-size: 1.2rem;
    width: auto;
    height: auto;
    background: none;
    color: #6c757d;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qm-summary-title {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qm-summary-title h4 {
    margin: 0;
    color: #495057;
    font-size: 14px;
    font-weight: bold;
}

.qm-summary-edit {
    margin-left: auto;
}

.qm-summary-edit a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.qm-summary-edit a:hover {
    background: #e9ecef;
    color: #495057;
}

.qm-summary-content {
    padding: 16px;
    min-height: 80px;
    background: white;
}

.qm-summary-loading {
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    animation: pulse 2s infinite;
}

/* Action Card Specific Styling */
.qm-action-card {
    background: white;
    border: 1px solid #dee2e6;
}

.qm-action-card .qm-summary-header {
    background: #0C6934;
    border-color: #0C6934;
    color: white;
}

.qm-action-card .qm-summary-title h4 {
    color: white;
}

.qm-action-card .qm-summary-icon {
    color: white;
}

.qm-action-card .qm-summary-content {
    background: #f8fff9;
}

.qm-action-card ul {
    margin: 15px 0;
    padding-left: 20px;
}

.qm-action-card li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.qm-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.qm-btn-action {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.3s ease;
}

.qm-btn-action:hover {
    transform: none;
    box-shadow: none;
}

/* Summary Status */
.qm-summary-status {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 0;
    padding: 15px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.qm-status-content {
    color: #1976d2;
    font-weight: 500;
}

/* Responsive Design for Summary */
@media (max-width: 768px) {
    .qm-summary-container {
        padding: 15px;
    }

    .qm-product-number-hero {
        padding: 25px 20px;
        margin-bottom: 25px;
        background: var(--qm-gray-100);
        border: 1px solid var(--qm-border);
    }

    .qm-product-number-label h2 {
        font-size: 2rem;
    }

    .qm-product-number-main {
        font-size: 2rem;
        padding: 15px 20px;
        letter-spacing: 1px;
    }

    .qm-breakdown-segments {
        flex-direction: column;
        align-items: center;
    }

    .qm-segment {
        min-width: 80%;
        margin-bottom: 10px;
    }

    .qm-segment-separator {
        transform: rotate(90deg);
        margin: 5px 0;
    }

    .qm-summary-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .qm-summary-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .qm-summary-title {
        flex-direction: column;
        gap: 8px;
    }

    .qm-action-buttons {
        flex-direction: column;
    }
}

/* === INTERACTIVE HIGHLIGHTING STYLES === */

/* Product Number Segment Highlighting */
.qm-pn-segment {
    display: inline;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qm-pn-segment:hover,
.qm-pn-segment.qm-highlight {
    background-color: #FDD835;
    color: var(--qm-dark);
    padding: 2px 4px;
    margin: 0 1px;
    font-weight: bold;
}

.qm-pn-separator {
    margin: 0 2px;
}

/* Breakdown Segment Highlighting */
.qm-segment {
    transition: all 0.3s ease;
    cursor: pointer;
}

.qm-segment:hover,
.qm-segment.qm-highlight {
    background-color: #FDD835;
    color: var(--qm-dark);
    transform: none;
}

.qm-segment:hover .qm-segment-code,
.qm-segment.qm-highlight .qm-segment-code {
    font-weight: bold;
}

.qm-segment:hover .qm-segment-label,
.qm-segment.qm-highlight .qm-segment-label {
    font-weight: 600;
}

/* .qm-segment:hover .qm-segment-description,
.qm-segment.qm-highlight .qm-segment-description {
} */

/* Smooth highlighting animations */
.qm-pn-segment,
.qm-segment {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

/* === IE4 MOTOR TYPE TRANSITIONS === */

/* Smooth transitions for motor type components */
.qm-component-option {
    transition: opacity 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Disabled component styling for IE4 mode */
.qm-component-disabled {
    opacity: 0.6;
    background-color: #f8f9fa;
    pointer-events: none;
}

.qm-component-disabled .qm-component-header {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.qm-component-disabled .qm-component-details {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.qm-component-disabled input[type="radio"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.qm-component-disabled label {
    color: #6c757d !important;
    cursor: not-allowed !important;
}

.qm-lock-icon {
    color: #dc3545;
    font-size: 14px;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/* IE4 breakdown segment transitions */
.qm-segment[data-segment="ie4special"] {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.qm-segment[data-segment="ie4special"][style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

/* Enhanced breakdown segment animations */
.qm-segment {
    transition: all 0.3s ease, opacity 0.3s ease, max-height 0.3s ease;
}

/* === SONDERLACKIERUNG STYLING === */

/* Gradient swatch hover effect */
.qm-special-paint-container:hover div[style*="linear-gradient"] {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Custom RAL container - aktiviert Eingabefeld bei Auswahl */
.qm-custom-color-container input[type="radio"]:checked~.qm-shaft-details .qm-ral-input-group {
    opacity: 1;
}

.qm-custom-color-container .qm-ral-input-group {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.qm-custom-color-container input[type="radio"]:checked~.qm-shaft-details #custom-ral-input {
    border-color: #0C6934;
}

.qm-btn-cart-save,
.qm-btn-cart-new,
.qm-btn-load-productnumber {
    padding: 8px 12px;
    border: 2px solid #0C6934;
    background: white;
    color: #0C6934;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qm-btn-cart-save:hover,
.qm-btn-cart-new:hover,
.qm-btn-load-productnumber:hover {
    background: #0C6934;
    color: white;
}

.qm-cart-items {
    padding: 15px 20px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.qm-cart-empty {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}

.qm-cart-item {
    background: white;
    border: 2px solid #dee2e6;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.qm-cart-item:hover {
    border-color: #0C6934;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.qm-cart-item.active {
    border-color: #FDD835;
    background: #fffbf0;
}

.qm-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.qm-cart-item-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.qm-cart-item-actions {
    display: flex;
    gap: 5px;
}

.qm-btn-edit,
.qm-btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.qm-btn-edit:hover {
    background: #e3f2fd;
}

.qm-btn-delete:hover {
    background: #ffebee;
}

.qm-cart-item-content {
    font-size: 12px;
}

.qm-product-number {
    font-family: monospace;
    font-weight: bold;
    color: #0C6934;
    margin-bottom: 8px;
    font-size: 13px;
}

.qm-cart-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qm-cart-summary span {
    color: #6c757d;
    font-size: 11px;
}

.qm-cart-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qm-btn-cart-request {
    background: #0C6934;
    color: white;
    border: none;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.qm-btn-cart-request:hover {
    background: #0a5a2a;
}

.qm-btn-cart-clear {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.qm-btn-cart-clear:hover {
    background: #c82333;
}

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

@media (max-width: 1024px) {
    .qm-konfigurator-layout {
        grid-template-columns: 1fr 300px;
        gap: 20px;
    }

    .qm-cart-sidebar {
        font-size: 14px;
    }

    .qm-cart-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .qm-konfigurator-wrapper {
        padding: 15px;
        max-width: 100%;
    }

    .qm-konfigurator-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .qm-cart-sidebar {
        order: -1;
        /* Cart erscheint über dem Konfigurator */
        position: relative;
        top: 0;
        max-height: 300px;
    }

    .qm-cart-items {
        max-height: 150px;
    }

    .qm-cart-actions {
        flex-direction: row;
        gap: 10px;
    }

    .qm-btn-cart-save,
    .qm-btn-cart-new,
    .qm-btn-load-productnumber {
        flex: 1;
        font-size: 12px;
        padding: 6px 8px;
    }

    .qm-cart-footer {
        flex-direction: row;
        gap: 10px;
    }

    .qm-btn-cart-request,
    .qm-btn-cart-clear {
        flex: 1;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .qm-konfigurator-wrapper {
        padding: 10px;
    }

    .qm-konfigurator-header h2 {
        font-size: 22px;
    }

    .qm-cart-sidebar {
        max-height: 250px;
    }

    .qm-cart-items {
        max-height: 120px;
        padding: 10px 15px;
    }

    .qm-cart-item {
        padding: 10px;
        margin-bottom: 10px;
    }

    .qm-cart-item-header h4 {
        font-size: 12px;
    }

    .qm-product-number {
        font-size: 11px;
    }

    .qm-cart-summary span {
        font-size: 10px;
    }

    .qm-btn-cart-save,
    .qm-btn-cart-new,
    .qm-btn-load-productnumber {
        font-size: 11px;
        padding: 5px 6px;
    }

    /* Existing mobile styles */

    .qm-product-number-label h2 {
        font-size: 1.6rem;
    }

    .qm-product-number-main {
        font-size: 1.5rem;
        padding: 12px 15px;
    }

    .qm-product-breakdown {
        padding: 20px 15px;
    }

    .qm-summary-content {
        padding: 15px;
    }

    /* Mobile highlighting adjustments */
    .qm-pn-segment:hover,
    .qm-pn-segment.qm-highlight {
        padding: 1px 2px;
        margin: 0;
    }

    .qm-segment:hover,
    .qm-segment.qm-highlight {
        transform: none;
    }
}

/* ====================================
   GEWICHTS-ANZEIGE STYLING
   ==================================== */

/* Gewichts-Card in Schritt 6 */
.qm-weight-card {
    background: white;
    border: 1px solid #dee2e6;
}

.qm-weight-card .qm-summary-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.qm-weight-card .qm-summary-icon {
    font-size: 1.2rem;
    color: #6c757d;
}

.qm-weight-card .qm-summary-content {
    background: white;
}

.qm-weight-estimated {
    font-size: 11px;
    color: #6c757d;
    font-weight: normal;
    margin-left: 8px;
}

.qm-weight-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.qm-weight-value {
    font-size: 36px;
    font-weight: bold;
    color: #0C6934;
    margin-right: 8px;
}

.qm-weight-unit {
    font-size: 18px;
    color: #6c757d;
    font-weight: 500;
}

.qm-weight-display.qm-loading .qm-weight-value {
    color: #ffc107;
    animation: pulse 1.5s infinite;
}

.qm-weight-display.qm-error .qm-weight-value {
    color: #dc3545;
}

.qm-weight-breakdown {
    margin-top: 10px;
    text-align: center;
}

.qm-weight-details {
    color: #6c757d;
    font-style: italic;
}

/* Inline-Gewichtsanzeige unter Produktnummer */
.qm-product-weight-display {
    margin-top: 15px;
    padding-top: 15px;
}

.qm-weight-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qm-weight-icon {
    font-size: 18px;
    opacity: 0.8;
}

.qm-weight-text {
    font-size: 16px;
    color: #0C6934;
    font-weight: 600;
}

.qm-weight-value-inline {
    color: #0C6934;
}

.qm-weight-unit-inline {
    color: #6c757d;
    font-weight: 500;
    margin-left: 2px;
}

.qm-product-weight-display.qm-loading .qm-weight-value-inline {
    color: #ffc107;
    animation: pulse 1.5s infinite;
}

.qm-product-weight-display.qm-error .qm-weight-value-inline {
    color: #dc3545;
}

/* Warenkorb-Gewichtsanzeigen */
.qm-cart-total-weight {
    font-size: 12px;
    color: #0C6934;
    font-weight: 600;
    margin-left: 8px;
}

.qm-cart-item-weight {
    margin-top: 8px;
    font-size: 12px;
    color: #0C6934;
    font-weight: 600;
    text-align: center;
    padding: 4px 8px;
    background: rgba(12, 105, 52, 0.1);
    border-radius: 12px;
    display: inline-block;
}

.qm-cart-item-weight.qm-weight-loading {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
    animation: pulse 1.5s infinite;
}

/* Pulse-Animation für Loading-States */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Responsive Anpassungen für Gewichtsanzeige */
@media (max-width: 768px) {
    .qm-weight-value {
        font-size: 28px;
    }

    .qm-weight-unit {
        font-size: 16px;
    }

    .qm-cart-total-weight {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* === MODAL STYLES - LEISTUNGSBERECHNUNG === */

.qm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.qm-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2;
    width: 90%;
    max-width: 700px;
}

.qm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.qm-modal-header h3 {
    margin: 0;
    color: #495057;
    font-size: 22px;
    font-weight: 600;
}

.qm-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.qm-modal-close:hover {
    color: #dc3545;
}

.qm-modal-body {
    padding: 25px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.qm-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 8px 8px;
}

.qm-calc-section {
    margin-bottom: 20px;
}

.qm-calc-section h4 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.qm-form-group {
    margin-bottom: 15px;
}

.qm-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.qm-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qm-form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.qm-calc-result {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Responsive Modal */
@media (max-width: 768px) {
    .qm-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .qm-modal-body {
        padding: 20px;
        max-height: calc(95vh - 140px);
    }

    .qm-modal-header,
    .qm-modal-footer {
        padding: 15px 20px;
    }

    .qm-modal-footer {
        flex-direction: column;
    }

    .qm-modal-footer .qm-btn {
        width: 100%;
    }
}