/* modules/sticky-calc/sticky-calc.css */

.sticky-calc-wrapper {
    position: fixed;
    bottom: 15px;
    left: 0;
    right: 0;
    z-index: 999;
    pointer-events: none;
    display: flex;
    justify-content: center;
    padding: 0 40px;
}

.sticky-calc {
    background: var(--bg-card);
    box-shadow: 0 8px 32px var(--shadow-lg);
    border-radius: 16px;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    transform: translateY(150%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s;
    pointer-events: auto;
    width: 100%;
    max-width: 1120px;
    border: 1px solid var(--border-color);
    margin: 0;
}

.sticky-calc.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.sticky-calc__sliders {
    display: flex;
    flex: 1;
    gap: 32px;
    min-width: 0;
}

.sticky-calc__item {
    flex: 1;
    min-width: 0;
}

.sticky-calc__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.sticky-calc__label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: 'Gilroy', sans-serif;
}

.sticky-calc__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    font-family: 'Gilroy', sans-serif;
}

/* ===== СЛАЙДЕРЫ ===== */
.sticky-calc .slider {
    width: 100%;
    height: 4px;
    border-radius: 3px;
    background: var(--calc-slider-track);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.sticky-calc .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--calc-slider-fill);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 169, 247, 0.4);
    transition: all 0.2s ease;
}

.sticky-calc .slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 169, 247, 0.5);
}

.sticky-calc .slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--calc-slider-fill);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 169, 247, 0.4);
}

.sticky-calc .slider::-moz-range-track {
    height: 4px;
    border-radius: 3px;
    background: var(--calc-slider-track);
}

.sticky-calc .slider-labels {
    font-size: 10px;
    color: var(--text-muted);
}

/* ===== РЕЗУЛЬТАТЫ ===== */
.sticky-calc__results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    text-align: right;
    border-left: 1px solid var(--border-color);
    padding-left: 24px;
}

.sticky-calc__results-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Gilroy', sans-serif;
}

.sticky-calc__results-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--calc-value);
    white-space: nowrap;
    font-family: 'Gilroy', sans-serif;
}

/* ===== КНОПКА ===== */
.sticky-calc__button {
    background: var(--calc-button-bg);
    color: var(--text-inverse);
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 160px;
    font-family: 'Gilroy', sans-serif;
}

.sticky-calc__button:hover {
    background: var(--calc-button-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-md);
}

.sticky-calc__button:active {
    transform: translateY(0);
}

.sticky-calc__button:focus-visible {
    outline: 2px solid var(--calc-slider-fill);
    outline-offset: 2px;
}

/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 920px) {
    .sticky-calc-wrapper { padding: 0 40px; }
    .sticky-calc { padding: 16px 20px; }
}

@media (max-width: 768px) {
    .sticky-calc-wrapper { padding: 0 20px; }
    .sticky-calc { padding: 12px 20px; gap: 16px; }
    .sticky-calc__sliders { gap: 16px; }
    .sticky-calc__results { min-width: 100px; padding-left: 16px; }
    .sticky-calc__button { min-width: 120px; padding: 12px 20px; font-size: 13px; }
}

@media (max-width: 580px) {
    .sticky-calc-wrapper { padding: 0 20px; }
    .sticky-calc__sliders { gap: 12px; }
    .sticky-calc__item { min-width: 100px; }
    .sticky-calc__value { font-size: 14px; }
    .sticky-calc .slider { height: 5px; }
    .sticky-calc .slider::-webkit-slider-thumb { width: 20px; height: 20px; }
    .sticky-calc .slider::-moz-range-thumb { width: 20px; height: 20px; }
    .sticky-calc__results { min-width: 80px; }
    .sticky-calc__results-value { font-size: 15px; }
    .sticky-calc__button { min-width: 100px; padding: 10px 16px; font-size: 12px; }
}

@media (max-width: 480px) {
    .sticky-calc-wrapper { bottom: 15px; padding: 20px; }
    .sticky-calc {
        padding: 12px 16px;
        gap: 12px;
        border-radius: 12px;
        flex-direction: column;
    }
    .sticky-calc__sliders { flex-direction: row; gap: 12px; width: 100%; }
    .sticky-calc__item { min-width: 0; flex: 1; }
    .sticky-calc__row { margin-bottom: 4px; gap: 6px; }
    .sticky-calc__label { font-size: 11px; }
    .sticky-calc__value { font-size: 13px; }
    .sticky-calc .slider { height: 4px; }
    .sticky-calc .slider::-webkit-slider-thumb { width: 18px; height: 18px; border-width: 3px; }
    .sticky-calc .slider::-moz-range-thumb { width: 18px; height: 18px; border-width: 3px; }
    .sticky-calc .slider-labels { display: none; }
    .sticky-calc__results { display: none; }
    .sticky-calc__button {
        min-width: 80px;
        padding: 10px 16px;
        font-size: 12px;
        white-space: nowrap;
        width: 100%;
    }
}

@media (max-width: 360px) {
    .sticky-calc__sliders { display: none; }
    .sticky-calc__results { display: none; }
    .sticky-calc__button { width: 100%; min-width: auto; }
    .sticky-calc { padding: 12px; }
    .sticky-calc-wrapper { padding: 0 12px; }
}

/* ===== ДОСТУПНОСТЬ ===== */
@media (prefers-reduced-motion: reduce) {
    .sticky-calc,
    .sticky-calc__button,
    .sticky-calc .slider::-webkit-slider-thumb,
    .sticky-calc .slider::-moz-range-thumb {
        transition: none !important;
    }
}

/* ===== ТЁМНАЯ ТЕМА ===== */
@media (prefers-color-scheme: dark) {
    .sticky-calc {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
}