/* Calculator specific styles */
.calculator-container {
    max-width: 650px;
    margin: 15px auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    padding: 20px 15px;
}

.option-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.option-item {
    background-color: var(--light-bg);
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 3px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.option-label {
    font-size: 1.05rem;
    font-weight: 500;
    flex: 1;
}

/* Direct input fields */
.direct-input {
    width: 120px;
    padding: 8px 12px;
    margin-right: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: right;
    font-size: 1rem;
}

/* Custom toggle button */
.toggle-btn {
    position: relative;
    display: inline-block;
    width: 76px;
    height: 30px;
}

.toggle-btn input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
    border: 1px solid #bbb;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.2);
}

.toggle-switch:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: .4s;
    border-radius: 50%;
}

.toggle-btn input:checked + .toggle-switch {
    background-color: var(--primary-color);
}

.toggle-btn input:checked + .toggle-switch:before {
    transform: translateX(46px);
}

.toggle-text {
    position: absolute;
    top: 6px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    user-select: none;
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.toggle-text.off {
    left: 10px;
}

.toggle-text.on {
    right: 10px;
}

/* Range slider */
.range-container {
    margin: 25px 5px 10px;
    overflow: visible;
    position: relative;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--slider-track);
    outline: none;
    border-radius: 3px;
    position: relative;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 2;
    position: relative;
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.range-slider-progress {
    height: 6px;
    background: var(--slider-progress);
    position: absolute;
    border-radius: 3px;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    will-change: width;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: width 0.05s linear;
}

.range-marks {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    width: 100%;
}

.mark {
    position: relative;
    width: 12px;
    height: 12px;
    background-color: #999;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.mark.active {
    background-color: var(--primary-color);
    transform: scale(1.2) translateZ(0);
}

.mark-label {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    white-space: nowrap;
}

.conditional {
    display: none;
    margin-top: 8px;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateZ(0); }
    to { opacity: 1; transform: translateZ(0); }
}

.price-display {
    background-color: var(--highlight);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 85px;
}

.price-display .amount {
    font-size: 1.9rem;
    font-weight: bold;
    color: var(--primary-hover);
}

.highlighted-option {
    border: 2px solid var(--primary-color);
    background-color: var(--highlight);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive design for mobile */
@media (max-width: 650px) {
    .calculator-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 15px 12px;
    }
    
    .direct-input {
        width: 110px;
        font-size: 0.95rem;
    }
    
    .toggle-btn {
        width: 72px;
    }
    
    .toggle-btn input:checked + .toggle-switch:before {
        transform: translateX(42px);
    }
    
    .price-display .amount {
        font-size: 1.7rem;
    }
    
    .option-item {
        padding: 10px 12px;
    }
}