/* Frontend Configurator Styles - 100% SCOPED til at ikke påvirke andre sider */

#loeftek-v2-wizard {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#loeftek-v2-wizard .step-header {
    text-align: center;
    margin-bottom: 40px;
}

#loeftek-v2-wizard .step-header h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

#loeftek-v2-wizard .step-header p {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
}

#loeftek-v2-wizard .choices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

#loeftek-v2-wizard .lk-card {
    position: relative;
    padding: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #fff;
}

#loeftek-v2-wizard .lk-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
}

#loeftek-v2-wizard .lk-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
    top: 0;
    left: 0;
    z-index: 1;
}

#loeftek-v2-wizard .lk-card input[type="radio"]:checked ~ .lk-card-title {
    color: #3498db;
    font-weight: bold;
}

#loeftek-v2-wizard .lk-card:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background-color: #f8fafc;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

#loeftek-v2-wizard .lk-card-img {
    margin-bottom: 15px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

#loeftek-v2-wizard .lk-card-img img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    object-fit: contain;
}

#loeftek-v2-wizard .lk-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    position: relative;
    z-index: 0;
}

/* TILFØJET: WLL Sidebar Styling for Step 2 - RETTET LAYOUT */
#loeftek-v2-wizard .size-selector {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

/* Ny container for billede og WLL sidebar */
#loeftek-v2-wizard .size-top-section {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
    justify-content: center;
}

#loeftek-v2-wizard .size-image-container {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

#loeftek-v2-wizard .loeftek-wll-sidebar {
    flex: 1;
    max-width: 300px;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
    min-height: 200px;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-icon {
    font-size: 18px;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-values {
    margin-bottom: 15px;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-label {
    color: #7f8c8d;
    font-weight: 500;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-value {
    color: #2c3e50;
    font-weight: 700;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-range {
    color: #3498db;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    display: block;
}

#loeftek-v2-wizard .loeftek-wll-sidebar .wll-info {
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    font-style: italic;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 6px;
}

/* Sliders - RETTET: Tilbage til original styling */
#loeftek-v2-wizard .length-selector, 
#loeftek-v2-wizard .size-selector .slider-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

#loeftek-v2-wizard .current-value {
    font-size: 32px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 30px;
}

#loeftek-v2-wizard .length-slider, 
#loeftek-v2-wizard .size-slider {
    width: 100%;
    margin: 30px 0;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

#loeftek-v2-wizard .length-slider::-webkit-slider-thumb, 
#loeftek-v2-wizard .size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

#loeftek-v2-wizard .length-slider::-webkit-slider-thumb:hover, 
#loeftek-v2-wizard .size-slider::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

#loeftek-v2-wizard .length-slider::-moz-range-thumb, 
#loeftek-v2-wizard .size-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

#loeftek-v2-wizard .length-labels, 
#loeftek-v2-wizard .size-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 15px;
    font-weight: 500;
}

/* Fix grid layout - OPDATERET: 4 produkter på én linje for trin 1 og 4 */
#loeftek-v2-wizard .wizard-step[data-step="1"] .choices-grid,
#loeftek-v2-wizard .wizard-step[data-step="4"] .choices-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* OPDATERET: Trin 3 (Opkorter) - 2 valg centreret */
#loeftek-v2-wizard .wizard-step[data-step="3"] .choices-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

#loeftek-v2-wizard .wizard-step[data-step="3"] .lk-card {
    width: 250px; /* Fast bredde for opkorter kort */
}

/* Center wizard container */
#loeftek-v2-wizard {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
}

/* Center antal felt */
#loeftek-v2-wizard .quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
}

#loeftek-v2-wizard .quantity-selector input {
    text-align: center;
}

/* TILFØJET: Summary WLL Styling */
#loeftek-v2-wizard .loeftek-config-summary {
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    font-size: 16px;
    line-height: 1.6;
}

#loeftek-v2-wizard .loeftek-config-summary .config-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e8ed;
}

#loeftek-v2-wizard .loeftek-config-summary .wll-section {
    margin-bottom: 0;
}

#loeftek-v2-wizard .loeftek-config-summary h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
}

#loeftek-v2-wizard .loeftek-config-summary p {
    margin: 8px 0;
    color: #34495e;
}

#loeftek-v2-wizard .loeftek-config-summary .wll-details {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

#loeftek-v2-wizard .loeftek-config-summary .wll-list {
    margin: 10px 0 0 20px;
    padding: 0;
}

#loeftek-v2-wizard .loeftek-config-summary .wll-list li {
    margin-bottom: 8px;
    color: #2c3e50;
}

#loeftek-v2-wizard .loeftek-config-summary .wll-list li strong {
    color: #3498db;
}

/* Original summary styles for fallback */
#loeftek-v2-wizard .configuration-summary {
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    font-size: 16px;
    line-height: 1.6;
}

#loeftek-v2-wizard .configuration-summary p {
    margin: 8px 0;
}

#loeftek-v2-wizard .quantity-selector {
    text-align: center;
    margin: 25px 0;
}

#loeftek-v2-wizard .quantity-selector label {
    font-weight: bold;
    margin-right: 15px;
    font-size: 16px;
    color: #2c3e50;
}

#loeftek-v2-wizard .quantity-selector input {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    width: 80px;
}

#loeftek-v2-wizard .quantity-selector input:focus {
    outline: none;
    border-color: #3498db;
}

#loeftek-v2-wizard .price-display {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    margin: 25px 0;
    line-height: 1.4;
}

/* Step Controls */
#loeftek-v2-wizard .step-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

/* RETTET: Step 1 specifik styling - Næste knap til højre */
#loeftek-v2-wizard .wizard-step[data-step="1"] .step-controls {
    justify-content: flex-end;
}

#loeftek-v2-wizard .step-controls button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

#loeftek-v2-wizard .step-controls button:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

#loeftek-v2-wizard .step-controls button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#loeftek-v2-wizard .step-controls .prev {
    background: #95a5a6;
}

#loeftek-v2-wizard .step-controls .prev:hover {
    background: #7f8c8d;
}

#loeftek-v2-wizard .step-controls .addcart {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    font-size: 18px;
    padding: 16px 32px;
    font-weight: 700;
    min-width: 150px;
}

#loeftek-v2-wizard .step-controls .addcart:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
}

/* Modal - Keep global as it's an overlay */
.lk-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(5px);
}

.lk-modal-inner {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lk-modal-inner h3 {
    color: #27ae60;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
}

.lk-modal-inner p {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.modal-buttons .btn {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 110px;
}

.modal-buttons .btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.modal-buttons .btn[data-act="cart"] {
    background: #e67e22;
}

.modal-buttons .btn[data-act="cart"]:hover {
    background: #d68910;
}

.modal-buttons .btn[data-act="checkout"] {
    background: #27ae60;
}

.modal-buttons .btn[data-act="checkout"]:hover {
    background: #229954;
}

.modal-buttons .btn[data-act="reset"] {
    background: #95a5a6;
}

.modal-buttons .btn[data-act="reset"]:hover {
    background: #7f8c8d;
}

/* Images - RETTET: Responsive billede-størrelser */
#loeftek-v2-wizard #length-img, 
#loeftek-v2-wizard #summary-img, 
#loeftek-v2-wizard #size-img {
    display: block;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    /* RETTET: Responsive størrelse i stedet for fixed */
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 300px;
}

/* Loading States */
#loeftek-v2-wizard .step-controls button.loading {
    position: relative;
    color: transparent;
}

#loeftek-v2-wizard .step-controls button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* TILFØJET: Step 1 intro image styling - NEDERST */
#loeftek-v2-wizard .loeftek-intro-wrapper {
    width: 100%;
    margin-top: 30px;
    text-align: center;
}

#loeftek-v2-wizard .loeftek-intro-image {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Container for de 4 valg-bokse */
#loeftek-v2-wizard .loeftek-choices-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* Klikbare slider labels */
#loeftek-v2-wizard .clickable-label:hover {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

#loeftek-v2-wizard .active-label {
    background-color: #3498db !important;
    color: #fff !important;
    font-weight: bold;
    transform: scale(1.05);
}

#loeftek-v2-wizard .clickable-label {
    transition: all 0.2s ease;
    user-select: none;
}

#loeftek-v2-wizard .clickable-label:active {
    transform: translateY(1px);
}

/* Responsive Design - FORBEDRET MOBILE MED WLL SIDEBAR */
@media (max-width: 768px) {
    #loeftek-v2-wizard {
        margin: 20px;
        padding: 20px;
        max-width: calc(100% - 40px);
    }
    
    #loeftek-v2-wizard .step-header h2 {
        font-size: 24px;
    }
    
    #loeftek-v2-wizard .choices-grid {
        grid-template-columns: 1fr;
    }
    
    #loeftek-v2-wizard .wizard-step[data-step="1"] .choices-grid,
    #loeftek-v2-wizard .wizard-step[data-step="4"] .choices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #loeftek-v2-wizard .wizard-step[data-step="3"] .choices-grid {
        flex-direction: column;
        align-items: center;
    }
    
    #loeftek-v2-wizard .loeftek-choices-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #loeftek-v2-wizard .loeftek-intro-image {
        max-height: 200px;
    }
    
    #loeftek-v2-wizard .lk-card {
        padding: 15px;
    }
    
    #loeftek-v2-wizard .lk-card-img {
        min-height: 100px;
    }
    
    #loeftek-v2-wizard .current-value {
        font-size: 28px;
    }
    
    #loeftek-v2-wizard .step-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    #loeftek-v2-wizard .step-controls button {
        width: 100%;
    }
    
    /* TILFØJET: Mobile WLL sidebar - RETTET LAYOUT */
    #loeftek-v2-wizard .size-top-section {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    #loeftek-v2-wizard .size-image-container,
    #loeftek-v2-wizard .loeftek-wll-sidebar {
        max-width: 100%;
        width: 100%;
    }
    
    /* TILFØJET: Mobile-optimeret billeder */
    #loeftek-v2-wizard #length-img, 
    #loeftek-v2-wizard #summary-img {
        max-width: 90%;
        max-height: 250px;
        margin: 15px auto;
    }
    
    #loeftek-v2-wizard #size-img {
        max-width: 60%;
        max-height: 150px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons .btn {
        width: 100%;
    }
    
    .lk-modal-inner {
        margin: 10px;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    #loeftek-v2-wizard {
        margin: 10px;
        padding: 15px;
        max-width: calc(100% - 20px);
    }
    
    #loeftek-v2-wizard .step-header {
        margin-bottom: 30px;
    }
    
    #loeftek-v2-wizard .step-header h2 {
        font-size: 22px;
    }
    
    #loeftek-v2-wizard .loeftek-choices-container {
        grid-template-columns: 1fr;
    }
    
    #loeftek-v2-wizard .loeftek-intro-image {
        max-height: 150px;
    }
    
    #loeftek-v2-wizard .current-value {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    #loeftek-v2-wizard .length-slider, 
    #loeftek-v2-wizard .size-slider {
        margin: 20px 0;
    }
    
    /* TILFØJET: WLL sidebar mobile styling */
    #loeftek-v2-wizard .loeftek-wll-sidebar {
        padding: 15px;
        font-size: 14px;
    }
    
    #loeftek-v2-wizard .loeftek-wll-sidebar .wll-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    #loeftek-v2-wizard .loeftek-wll-sidebar .wll-title {
        font-size: 14px;
    }
    
    #loeftek-v2-wizard .loeftek-wll-sidebar .wll-row {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    #loeftek-v2-wizard .loeftek-wll-sidebar .wll-info {
        font-size: 11px;
        padding: 6px;
    }
    
    /* TILFØJET: Ekstra små skærme optimering */
    #loeftek-v2-wizard #length-img, 
    #loeftek-v2-wizard #summary-img {
        max-width: 95%;
        max-height: 200px;
        margin: 10px auto;
    }
    
    #loeftek-v2-wizard #size-img {
        max-width: 50%;
        max-height: 120px;
    }
    
    #loeftek-v2-wizard .step-header p {
        font-size: 14px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #loeftek-v2-wizard .lk-card {
        border-width: 3px;
    }
    
    #loeftek-v2-wizard .lk-card:hover {
        border-width: 3px;
    }
    
    #loeftek-v2-wizard .step-controls button:disabled {
        background: #666;
        color: #ccc;
    }
    
    /* TILFØJET: High contrast WLL sidebar */
    #loeftek-v2-wizard .loeftek-wll-sidebar {
        border-width: 3px;
        background: #f0f8ff;
    }
}

/* Step 1 intro image styling - TILFØJET NEDERST */
#loeftek-v2-wizard #step1-choices {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#loeftek-v2-wizard .loeftek-choices-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    margin-bottom: 0;
}

#loeftek-v2-wizard .loeftek-intro-wrapper {
    width: 100%;
    margin-top: 30px;
}

#loeftek-v2-wizard .loeftek-intro-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: block;
}

/* Responsive for intro billede */
@media (max-width: 768px) {
    #loeftek-v2-wizard .loeftek-choices-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #loeftek-v2-wizard .loeftek-choices-container {
        grid-template-columns: 1fr;
    }
    
    #loeftek-v2-wizard .loeftek-intro-wrapper {
        margin-top: 20px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #loeftek-v2-wizard * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    #loeftek-v2-wizard .lk-card:hover {
        transform: none;
    }
    
    #loeftek-v2-wizard .step-controls button:hover:not(:disabled) {
        transform: none;
    }
    /* SKJUL AL WLL I STEP 6 */
.wizard-step[data-step="6"] .wll-summary-section,
.wizard-step[data-step="6"] .wll-section,
.wizard-step[data-step="6"] [class*="wll-info"],
.wizard-step[data-step="6"] #wll-step6,
.wizard-step[data-step="6"] [class*="wll-"] {
    display: none !important;
}

/* Sikr at Step 2 WLL stadig vises */
.wizard-step[data-step="2"] .wll-sidebar {
    display: block !important;
}
    #loeftek-v2-wizard .loeftek-wll-sidebar {
        transition: none;
    }
}