/* ===== ОСНОВНЫЕ СТИЛИ ===== */
.shc-calculator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.shc-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== ЛЕВАЯ ПАНЕЛЬ ===== */
.shc-left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shc-block {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.shc-block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.shc-block-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    line-height: normal;
    font-weight: 600;
    color: #000;
}

/* ===== ПЕРЕКЛЮЧАТЕЛИ ===== */
.shc-toggle-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.shc-toggle-option {
    flex: 1;
    min-width: 120px;
    cursor: pointer;
}

.shc-toggle-option input[type="radio"] {
    display: none;
}

.shc-toggle-label {
    display: block;
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.shc-toggle-option input[type="radio"]:checked + .shc-toggle-label {
    background: #2e5fda;
    border-color: #2e5fda;
    color: #fff;
}

.shc-toggle-label:hover {
    border-color: #2e5fda;
}

/* ===== СЛАЙДЕР ===== */
.shc-slider-wrapper {
    position: relative;
}

.shc-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #2e5fda 0%, #2e5fda 50%, #e0e0e0 50%, #e0e0e0 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.shc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2e5fda;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.shc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.shc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2e5fda;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.shc-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.shc-slider-value {
    margin-top: 15px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #2e5fda;
}

/* ===== СЧЕТЧИК ===== */
.shc-counter {
    display: flex;
    align-items: center;
    gap: 20px;
}

.shc-counter-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #2e5fda;
    background: #fff;
    color: #2e5fda;
    font-size: 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.shc-counter-btn:hover {
    background: #2e5fda;
    color: #fff;
}

.shc-counter-btn:active {
    transform: scale(0.95);
}

.shc-counter-input {
    width: 80px;
    height: 45px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #000;
}

/* ===== ОПЦИИ (ЧЕКБОКСЫ) ===== */
.shc-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.shc-checkbox {
    display: block;
    cursor: pointer;
}

.shc-checkbox input[type="checkbox"] {
    display: none;
}

.shc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.shc-checkbox input[type="checkbox"]:checked + .shc-checkbox-label {
    background: #2e5fda;
    border-color: #2e5fda;
    color: #fff;
}

.shc-checkbox-label:hover {
    border-color: #2e5fda;
    background: #fff;
}

.shc-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ===== ПРАВАЯ ПАНЕЛЬ ===== */
.shc-right-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* ===== ТАБЛИЦА СИСТЕМ ===== */
.shc-systems-table {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.shc-table-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    line-height: normal;
    font-weight: 600;
    color: #000;
}

.shc-table {
    width: 100%;
    border-collapse: collapse;
}

.shc-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.shc-table tbody tr:last-child {
    border-bottom: none;
}

.shc-table td {
    padding: 5px !important;
    font-size: 15px;
    border: none !important;
}

.shc-table td:first-child {
    color: #555;
    font-weight: 500;
}

.shc-table td:last-child {
    text-align: right;
    color: #000;
    font-weight: 600;
}

/* ===== БЛОК ИТОГОВОЙ СТОИМОСТИ ===== */
.shc-total-block {
    background: #2e5fda;
    padding: 20px;
    border-radius: 8px;
    color: #fff;
}

.shc-total-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

.shc-total-price {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 25px;
    animation: priceUpdate 0.3s ease;
}

@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.shc-breakdown {
    margin-bottom: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.shc-breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    opacity: 0.9;
}

.shc-breakdown-item:last-child {
    margin-bottom: 0;
}

/* ===== КНОПКА CTA ===== */
.shc-cta-button {
    width: 100%;
    padding: 16px 20px;
    background: #fff;
    color: #2e5fda;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shc-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.shc-cta-button:active {
    transform: translateY(0);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.shc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.shc-modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.shc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.shc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
}

.shc-modal-close:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.shc-modal-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    color: #000;
}

/* ===== ФОРМА ===== */
.shc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shc-form-group {
    display: flex;
    flex-direction: column;
}

.shc-form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

.shc-form-group input,
.shc-form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.shc-form-group input:focus,
.shc-form-group textarea:focus {
    outline: none;
    border-color: #2e5fda;
    box-shadow: 0 0 0 3px rgba(46, 95, 218, 0.1);
}

.shc-form-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 10px;
}

.shc-form-summary p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #000;
}

.shc-form-summary ul {
    margin: 0;
    padding-left: 20px;
}

.shc-form-summary li {
    margin-bottom: 5px;
    color: #555;
}

.shc-submit-button {
    padding: 16px 30px;
    background: linear-gradient(135deg, #2e5fda 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.shc-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.shc-submit-button:active {
    transform: translateY(0);
}

.shc-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.shc-form-message {
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.shc-form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.shc-form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .shc-container {
        grid-template-columns: 1fr;
    }
    
    .shc-right-panel {
        position: static;
    }
    
    .shc-options-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .shc-calculator {
        padding: 15px;
    }
    
    .shc-container {
        gap: 25px;
    }
    
    .shc-block {
        padding: 20px;
    }
    
    .shc-total-price {
        font-size: 36px;
    }
    
    .shc-options-grid {
        grid-template-columns: 1fr;
    }
    
    .shc-toggle-group {
        flex-direction: column;
    }
    
    .shc-modal-content {
        padding: 25px;
        width: 95%;
    }
    
    .shc-modal-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .shc-total-price {
        font-size: 28px;
    }
    
    .shc-block-title,
    .shc-table-title {
        font-size: 16px;
    }
    
    .shc-counter-btn {
        width: 40px;
        height: 40px;
    }
    
    .shc-counter-input {
        width: 60px;
        height: 40px;
        font-size: 20px;
    }
}

/* ===== ВИДЖЕТ ===== */
.widget .shc-calculator {
    box-shadow: none;
}

.widget .shc-container {
    gap: 20px;
}
