/* =============================================================================
   COLLAPSIBLE.CSS - Collapsible Details Sections
   =============================================================================
   Contains: Calculation Details, Toggle Icons, Summary Headers, Animations
   ============================================================================= */

/* =============================================================================
   COLLAPSIBLE DETAILS COMPONENT - Shared for all sections
   ============================================================================= */

.collapsible-section {
    position: relative;
}

/* Details element base */
.calculation-details {
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

/* Summary (clickable header) */
.calculation-details summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(156, 39, 176, 0.12) 100%);
    border-radius: 8px;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    list-style: none;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

/* Remove default marker for Chrome/Safari */
.calculation-details summary::-webkit-details-marker {
    display: none;
}

/* Remove default marker for Firefox */
.calculation-details summary::marker {
    display: none;
    content: '';
}

/* Hover state */
.calculation-details summary:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.28) 0%, rgba(156, 39, 176, 0.18) 100%);
    border-color: rgba(212, 175, 55, 0.4);
}

/* Focus state for accessibility */
.calculation-details summary:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.calculation-details summary:focus:not(:focus-visible) {
    outline: none;
}

/* Toggle icon */
.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.15);
    border-radius: 4px;
}

.calculation-details[open] .toggle-icon {
    transform: rotate(90deg);
}

/* Hint text */
.toggle-hint {
    margin-left: auto;
    font-weight: normal;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
}

.calculation-details[open] .toggle-hint {
    display: none;
}

/* Content container with animation */
.details-content {
    padding: 15px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    animation: detailsSlideDown 0.3s ease-out;
}

@keyframes detailsSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Open state indicator */
.calculation-details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(156, 39, 176, 0.15) 100%);
}

/* Results section styling */
.results-section {
    padding: 15px;
}