/* Product Description Dropdown Styles */
.product-description-dropdown-wrapper {
    width: 100%;
    font-family: inherit;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.description-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.description-toggle:hover {
    background: #f8fafc;
}

.description-toggle:focus {
    box-shadow: 0 0 0 3px rgba(137, 174, 69, 0.1);
}

.product-title-section {
    padding: 16px 20px 8px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: none;
}

.dropdown-product-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    display: none;
}

.toggle-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    transition: all 0.3s ease;
}

.description-toggle:hover .toggle-button {
    background: linear-gradient(135deg, #89AE45 0%, #7a9b3e 100%);
}

.description-toggle:hover .toggle-text {
    color: white;
}

.description-toggle:hover .toggle-arrow {
    color: white;
}

.toggle-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    transition: color 0.3s ease;
}

.toggle-arrow {
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.description-toggle.active .toggle-arrow {
    transform: rotate(180deg);
    color: #89AE45;
}

.description-toggle.active .toggle-button {
    background: linear-gradient(135deg, #89AE45 0%, #7a9b3e 100%);
    border-bottom: 1px solid #7a9b3e;
}

.description-toggle.active .toggle-text {
    color: white;
}

.description-toggle.active .toggle-arrow {
    color: white;
}

/* Updated: Dynamic height dropdown content */
.description-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    background: #ffffff;
    opacity: 0;
}

.description-content.expanded {
    /* Will be set dynamically by JavaScript */
    max-height: none;
    opacity: 1;
}

/* Fallback for browsers without JavaScript */
.no-js .description-content.expanded {
    max-height: 2000px;
}

.description-text {
    padding: 20px;
    color: #374151;
    line-height: 1.6;
    font-size: 14px;
}

.description-text p {
    margin: 0 0 12px 0;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.description-text ul,
.description-text ol {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.description-text li {
    margin-bottom: 4px;
}

.description-text strong {
    color: #1f2937;
    font-weight: 600;
}

.description-text em {
    font-style: italic;
    color: #64748b;
}

.description-text h1,
.description-text h2,
.description-text h3,
.description-text h4,
.description-text h5,
.description-text h6 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-weight: 600;
}

.description-text h1 { font-size: 20px; }
.description-text h2 { font-size: 18px; }
.description-text h3 { font-size: 16px; }
.description-text h4 { font-size: 15px; }
.description-text h5 { font-size: 14px; }
.description-text h6 { font-size: 13px; }

/* Hover effekt på hele komponenten */
.product-description-dropdown-wrapper:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
    .product-description-dropdown-wrapper {
        width: 100%;
        border-radius: 6px;
    }
    
    .toggle-button {
        padding: 10px 16px;
    }
    
    .toggle-text {
        font-size: 13px;
    }
    
    .description-text {
        padding: 16px;
        font-size: 13px;
    }
}

/* Accessibility forbedringer */
.description-toggle:focus-visible {
    outline: 2px solid #89AE45;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .product-description-dropdown-wrapper {
        border: none;
        box-shadow: none;
    }
    
    .description-content {
        max-height: none !important;
        overflow: visible !important;
        opacity: 1 !important;
    }
    
    .toggle-button::after {
        content: " (udfoldet)";
        font-size: 12px;
        color: #64748b;
    }
}