/* CSS Variables for easy theme customization */
:root {
    --lhr-bg-dark: #1a1a2e;
    --lhr-bg-panel: rgba(30, 42, 71, 0.7);
    --lhr-text-light: #f0f0f8;
    --lhr-text-medium: #a9a9d4;
    --lhr-primary-accent: #e94560;
    --lhr-secondary-accent: #0f3460;
    --lhr-glow: rgba(233, 69, 96, 0.6);
    --lhr-border-color: rgba(142, 68, 173, 0.3);
    --lhr-success-color: #2ecc71;
    --lhr-font: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Main Wrapper - IMPORTANT: This contains all the styles and prevents them from leaking. */
#lhr-calculator-wrapper {
    font-family: var(--lhr-font);
    background: var(--lhr-bg-dark);
    background-image: linear-gradient(145deg, var(--lhr-bg-dark) 0%, #1e2a47 100%);
    color: var(--lhr-text-light);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--lhr-border-color);
}

/* Main container for the calculator layout */
.lhr-calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Controls Panel (Left side) */
.lhr-controls {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Summary Panel (Right side) */
.lhr-summary {
    flex: 1;
    min-width: 300px;
    background: var(--lhr-bg-panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--lhr-border-color);
    position: sticky;
    top: 2rem;
    height: fit-content;
}

/* Header Styles */
.lhr-header h2, .lhr-summary-header h3 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    color: var(--lhr-text-light);
    text-shadow: 0 0 10px var(--lhr-glow);
}
.lhr-header h2 {
    font-size: 1.8rem;
    color: var(--lhr-primary-accent);
}
.lhr-header p {
    margin: 0 0 1.5rem 0;
    color: var(--lhr-text-medium);
    font-size: 0.95rem;
}

/* Session Type Toggle Switch */
.lhr-session-type {
    background-color: var(--lhr-secondary-accent);
    border-radius: 30px;
    padding: 0.5rem;
    display: flex;
    position: relative;
}
.lhr-session-type input[type="radio"] {
    display: none;
}
.lhr-session-type label {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2;
    font-weight: 500;
}
#lhr-glider {
    position: absolute;
    height: calc(100% - 1rem);
    width: calc(50% - 0.5rem);
    background-color: var(--lhr-primary-accent);
    border-radius: 25px;
    top: 0.5rem;
    left: 0.5rem;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1;
}
.lhr-session-type input[type="radio"]:checked + label {
    color: var(--lhr-text-light);
}

/* Body Area Categories - Accordion Style */
.lhr-category {
    border-bottom: 1px solid var(--lhr-border-color);
}
.lhr-category:last-child {
    border-bottom: none;
}
.lhr-category-header {
    width: 100%;
    background: none;
    border: none;
    color: var(--lhr-text-light);
    text-align: left;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}
.lhr-category-header:hover {
    color: var(--lhr-primary-accent);
}
.lhr-category-header .lhr-icon {
    transition: transform 0.3s ease-out;
    font-style: normal;
}
.lhr-category-header.active .lhr-icon {
    transform: rotate(45deg);
}
.lhr-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

/* Individual Item Checkboxes */
.lhr-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}
.lhr-item:hover {
    background-color: rgba(142, 68, 173, 0.1);
}
.lhr-item input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}
.lhr-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--lhr-text-medium);
    font-size: 0.95rem;
}
.lhr-item label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--lhr-border-color);
    border-radius: 5px;
    margin-right: 12px;
    transition: all 0.2s ease;
}
.lhr-item input:checked + label::before {
    background-color: var(--lhr-primary-accent);
    border-color: var(--lhr-primary-accent);
    content: '✓';
    color: white;
    text-align: center;
    line-height: 18px;
    font-weight: bold;
}
.lhr-item-price {
    font-weight: 500;
    color: var(--lhr-text-light);
    font-size: 0.95rem;
}

/* Summary Panel Styling */
#lhr-summary-items {
    margin-bottom: 1.5rem;
    min-height: 50px;
    border-bottom: 1px solid var(--lhr-border-color);
    padding-bottom: 1rem;
}
.lhr-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--lhr-text-medium);
}
.lhr-summary-total > div {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}
.lhr-summary-total .lhr-discount {
    color: var(--lhr-success-color);
}
.lhr-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--lhr-border-color);
}
.lhr-total span:first-child {
    font-weight: 600;
    font-size: 1.2rem;
}
.lhr-total-amount {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--lhr-primary-accent);
    text-shadow: 0 0 15px var(--lhr-glow);
}
.lhr-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--lhr-text-medium);
    text-align: center;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    #lhr-calculator-wrapper {
        padding: 1.5rem 1rem;
    }
    .lhr-calculator-container {
        flex-direction: column;
    }
    .lhr-summary {
        position: relative;
        top: 0;
    }
    .lhr-header h2 {
        font-size: 1.6rem;
    }
    .lhr-total-amount {
        font-size: 1.8rem;
    }
}