/* ===== MALINGGUIDE STYLES ===== */

/* Trigger Button - Unik klasse for at undgå tema konflikter */
.kvali-mg-open-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 15px 30px !important;
    background-color: #ca0707 !important;
    background: #ca0707 !important;
    color: white !important;
    border: none !important;
    border-radius: 30px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(202, 7, 7, 0.3) !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    outline: none !important;
}

.kvali-mg-open-button:hover,
.kvali-mg-open-button:focus,
.kvali-mg-open-button:active {
    background-color: #b20606 !important;
    background: #b20606 !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(202, 7, 7, 0.4) !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}

/* Banner Style */
.kvali-mg-banner-trigger {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 25px 30px !important;
    background: #ca0707 !important;
    border-radius: 15px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(202, 7, 7, 0.3) !important;
    border: none !important;
}

.kvali-mg-banner-trigger:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 30px rgba(202, 7, 7, 0.4) !important;
}

.kvali-mg-banner-icon {
    font-size: 40px !important;
}

.kvali-mg-banner-content {
    flex: 1 !important;
}

.kvali-mg-banner-content h3 {
    color: white !important;
    margin: 0 0 5px 0 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}

.kvali-mg-banner-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
    font-size: 14px !important;
}

.kvali-mg-banner-arrow {
    font-size: 24px !important;
    color: white !important;
    transition: transform 0.3s ease !important;
}

.kvali-mg-banner-trigger:hover .kvali-mg-banner-arrow {
    transform: translateX(5px) !important;
}

/* Overlay */
.malingguide-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.malingguide-overlay.active {
    display: block;
    opacity: 1;
}

/* Popup */
.malingguide-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    width: 95%;
    max-width: 1000px;
    height: 90vh;
    max-height: 850px;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.malingguide-popup.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Header */
.malingguide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 25px;
    background: #ca0707;
    color: white;
    flex-shrink: 0;
}

.malingguide-header h2 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: white !important;
}

.malingguide-close {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
}

.malingguide-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Progress */
.malingguide-progress {
    padding: 10px 25px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.malingguide-question-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.progress-text {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* Content */
.malingguide-content {
    padding: 25px 30px;
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
    flex: 1;
    overflow-y: auto;
}

.malingguide-left {
    flex: 1;
}

.malingguide-right {
    flex: 0 0 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.malingguide-right img {
    max-width: 100%;
    max-height: 350px;
    border-radius: 10px !important;
    object-fit: cover;
}

.malingguide-right .question-image-placeholder {
    width: 300px;
    height: 250px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #ccc;
}

/* Options List */
.malingguide-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.malingguide-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.malingguide-option:hover {
    border-color: #ca0707;
    background: #fffafa;
    transform: translateX(5px);
}

.malingguide-option.selected {
    border-color: #ca0707;
    background: rgba(202, 7, 7, 0.05);
}

.malingguide-option-label {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.malingguide-option-arrow {
    font-size: 18px;
    color: #ccc;
    transition: all 0.2s ease;
}

.malingguide-option:hover .malingguide-option-arrow {
    color: #ca0707;
    transform: translateX(3px);
}

.malingguide-option-description {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #888;
    text-align: center;
}

/* Footer */
.malingguide-footer {
    padding: 10px 25px;
    background: #f8f8f8;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.malingguide-back-btn {
    padding: 8px 16px !important;
    background: #fff !important;
    border: 2px solid #ca0707 !important;
    border-radius: 20px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ca0707 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.malingguide-back-btn:hover {
    background: #ca0707 !important;
    color: #fff !important;
}

/* Result Screen */
.malingguide-result {
    text-align: center;
    width: 100%;
}

.malingguide-content:has(.malingguide-result) {
    display: block;
}

.malingguide-result-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
}

.malingguide-result-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.4;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.malingguide-product-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.malingguide-product-card.hovedprodukt {
    border: 2px solid #ca0707;
    background: #fffafa;
}

.malingguide-product-step {
    display: inline-block;
    background: #ca0707;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.malingguide-product-step.grunder {
    background: #4a7c4a;
}

.malingguide-product-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.malingguide-product-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 10px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #eee;
    padding: 4px;
}

.malingguide-product-image.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border: none;
}

.malingguide-product-details {
    flex: 1;
}

.malingguide-product-name {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.malingguide-product-desc {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.malingguide-desc-wrapper {
    margin: 0;
}

.malingguide-desc-toggle {
    background: none !important;
    border: none !important;
    padding: 2px 0 !important;
    margin: 0 !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #ca0707 !important;
    cursor: pointer !important;
    display: inline-block !important;
}

.malingguide-desc-toggle:hover {
    text-decoration: underline !important;
}

.malingguide-product-price {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ca0707;
    margin: 0;
}

.malingguide-product-price del {
    color: #999;
    font-weight: 400;
    margin-right: 8px;
}

.malingguide-product-price ins {
    text-decoration: none;
}

.malingguide-product-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding: 10px 18px !important;
    background: #ca0707 !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.malingguide-product-btn:hover {
    background: #b20606 !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

/* Produkt actions - dropdown og tilføj til kurv */
.malingguide-product-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 10px !important;
    flex-wrap: wrap !important;
}

.malingguide-variant-select {
    flex: 1 !important;
    min-width: 180px !important;
    max-width: 280px !important;
    padding: 10px 36px 10px 12px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    height: auto !important;
    background: #fff !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

.malingguide-variant-select:hover,
.malingguide-variant-select:focus {
    border-color: #ca0707 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(202, 7, 7, 0.1) !important;
}

.malingguide-add-to-cart-btn {
    padding: 10px 16px !important;
    background: #ca0707 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(202, 7, 7, 0.3) !important;
}

.malingguide-add-to-cart-btn:hover {
    background: #b20606 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(202, 7, 7, 0.4) !important;
}

.malingguide-add-to-cart-btn:disabled {
    background: #999 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.malingguide-add-to-cart-btn.added {
    background: #28a745 !important;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3) !important;
}

.malingguide-result-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.malingguide-result-help {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #666;
    margin: 0 0 10px 0;
}

.malingguide-result-help a {
    color: #ca0707;
    font-weight: 600;
    text-decoration: none;
}

.malingguide-result-help a:hover {
    text-decoration: underline;
}

.malingguide-restart-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 5px !important;
    padding: 8px 18px !important;
    background: #fff !important;
    color: #ca0707 !important;
    border: 2px solid #ca0707 !important;
    border-radius: 20px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.malingguide-restart-btn:hover {
    background: #ca0707 !important;
    color: #fff !important;
}

/* Mobile Responsive */
@media only screen and (max-width: 768px) {
    .malingguide-popup {
        width: 98%;
        max-width: 100%;
        height: 90vh;
        max-height: none;
        border-radius: 15px;
        top: 50%;
        transform: translate(-50%, -50%) scale(1);
    }
    
    .malingguide-header {
        padding: 15px 20px;
    }
    
    .malingguide-header h2 {
        font-size: 18px;
    }
    
    .malingguide-progress {
        padding: 10px 15px;
    }
    
    .malingguide-question-title {
        font-size: 17px;
    }
    
    .malingguide-content {
        padding: 25px 20px;
        flex-direction: column-reverse;
        gap: 20px;
    }
    
    .malingguide-left {
        width: 100%;
    }
    
    .malingguide-right {
        flex: none;
        width: 100%;
        display: none; /* Skjul billede på mobil for at spare plads */
    }
    
    .malingguide-option {
        padding: 14px 16px;
    }
    
    .malingguide-option-label {
        font-size: 14px;
    }
    
    .kvali-mg-banner-trigger {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px !important;
    }
    
    .kvali-mg-banner-arrow {
        transform: rotate(90deg) !important;
    }
    
    .kvali-mg-banner-trigger:hover .kvali-mg-banner-arrow {
        transform: rotate(90deg) translateX(5px) !important;
    }
}

/* Animation for options */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.malingguide-option {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.malingguide-option:nth-child(1) { animation-delay: 0.05s; }
.malingguide-option:nth-child(2) { animation-delay: 0.1s; }
.malingguide-option:nth-child(3) { animation-delay: 0.15s; }
.malingguide-option:nth-child(4) { animation-delay: 0.2s; }
.malingguide-option:nth-child(5) { animation-delay: 0.25s; }
.malingguide-option:nth-child(6) { animation-delay: 0.3s; }
.malingguide-option:nth-child(7) { animation-delay: 0.35s; }
.malingguide-option:nth-child(8) { animation-delay: 0.4s; }
.malingguide-option:nth-child(9) { animation-delay: 0.45s; }
.malingguide-option:nth-child(10) { animation-delay: 0.5s; }
