/* Fees Calculator Styles */
.fees-calculator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Category Section */
.fees-calc-category {
    border-bottom: 1px solid #eee;
}

.fees-calc-category:last-child {
    border-bottom: none;
}

.fees-calc-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.15s;
}

.fees-calc-category-header:hover {
    background: #f5f5f5;
}

.fees-calc-category-icon {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.fees-calc-category-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.fees-calc-category-chevron {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
}

.fees-calc-category.collapsed .fees-calc-category-chevron {
    transform: rotate(-90deg);
}

.fees-calc-category-items {
    padding: 0 20px 16px;
}

.fees-calc-category.collapsed .fees-calc-category-items {
    display: none;
}

/* Fee Item */
.fees-calc-item {
    padding: 0;
}

.fees-calc-item-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.fees-calc-item-row:last-child {
    border-bottom: none;
}

.fees-calc-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
}

.fees-calc-item-info {
    flex: 1;
}

.fees-calc-item-title {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.fees-calc-item-subtitle {
    font-size: 12px;
    color: #888;
}

.fees-calc-item-costs {
    font-size: 12px;
    color: #666;
}

.fees-calc-item-control {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Fixed Options */
.fees-calc-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.fees-calc-option:last-child {
    border-bottom: none;
}

.fees-calc-option.selected {
    background: #f8faff;
    margin: 0 -20px;
    padding: 12px 20px;
    border-left: 3px solid #4a6cf7;
}

.fees-calc-option-info {
    flex: 1;
}

.fees-calc-option-title {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.fees-calc-option-costs {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.fees-calc-option-selector {
    flex-shrink: 0;
}

/* Quantity Selector */
.fees-calc-qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.fees-calc-qty-btn {
    width: 24px;
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: background 0.15s, color 0.15s;
}

.fees-calc-qty-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.fees-calc-qty-btn:active {
    background: #e0e0e0;
}

.fees-calc-qty-value {
    min-width: 36px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

/* Toggle Switch */
.fees-calc-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 20px;
}

.fees-calc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fees-calc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 20px;
}

.fees-calc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.fees-calc-toggle input:checked + .fees-calc-toggle-slider {
    background-color: #4a9fd4;
}

.fees-calc-toggle input:checked + .fees-calc-toggle-slider:before {
    transform: translateX(24px);
}

/* Summary Section */
.fees-calc-summary {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #eee;
}

.fees-calc-reset {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: color 0.15s;
}

.fees-calc-reset:hover {
    color: #333;
    text-decoration: underline;
}

.fees-calc-totals {
    margin-bottom: 20px;
}

.fees-calc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
}

.fees-calc-total-monthly {
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.fees-calc-total-monthly .fees-calc-total-label {
    font-size: 12px;
    color: #666;
}

.fees-calc-total-monthly .fees-calc-total-value {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.fees-calc-total-label {
    font-size: 12px;
    color: #888;
}

.fees-calc-total-value {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.fees-calc-total-refund {
    color: #2e7d32;
}

/* Apply Button */
.fees-calc-apply {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: #4a6cf7;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 20px;
}

.fees-calc-apply:hover {
    background: #3a5ce5;
}

.fees-calc-apply:active {
    background: #2a4cd5;
}

/* Breakdown Section */
.fees-calc-breakdown {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
}

.fees-calc-breakdown-header {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.fees-calc-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.fees-calc-breakdown-label {
    font-size: 13px;
    color: #666;
}

.fees-calc-breakdown-value {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

/* Responsive */
@media (max-width: 480px) {
    .fees-calculator {
        border-radius: 0;
        box-shadow: none;
    }

    .fees-calc-option.selected {
        margin: 0 -20px;
        padding: 12px 20px;
    }

    .fees-calc-total-monthly .fees-calc-total-value {
        font-size: 24px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .fees-calculator {
        background: #1a1a1a;
        box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    }

    .fees-calc-category-header {
        background: #252525;
    }

    .fees-calc-category-header:hover {
        background: #2a2a2a;
    }

    .fees-calc-category-name,
    .fees-calc-item-title,
    .fees-calc-option-title {
        color: #eee;
    }

    .fees-calc-option-costs,
    .fees-calc-item-subtitle,
    .fees-calc-item-costs {
        color: #999;
    }

    .fees-calc-option.selected {
        background: #252535;
    }

    .fees-calc-qty-selector {
        border-color: #444;
        background: #252525;
    }

    .fees-calc-qty-btn {
        color: #ccc;
    }

    .fees-calc-qty-btn:hover {
        background: #333;
        color: #fff;
    }

    .fees-calc-qty-value {
        color: #eee;
    }

    .fees-calc-summary {
        background: #222;
        border-top-color: #333;
    }

    .fees-calc-total-value,
    .fees-calc-total-monthly .fees-calc-total-value {
        color: #fff;
    }

    .fees-calc-breakdown {
        background: #252525;
        border-color: #333;
    }

    .fees-calc-breakdown-header {
        color: #eee;
        border-bottom-color: #333;
    }

    .fees-calc-breakdown-value {
        color: #ddd;
    }
}

.data-with-pricing {
  max-height: 50vh;
  overflow-y: scroll;
}
