/* Калькулятор ремонта - Стили для фронтенда */

.repair-calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Радиобаттоны для филиалов */
.repair-calc-branches-wrapper {
    margin-top: 10px;
}

.repair-calc-branches-wrapper select {
    display: none; /* Скрываем оригинальный select */
}

.repair-calc-branch-radio {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.repair-calc-branch-radio:hover {
    border-color: #cbd5e0;
    background-color: #f7fafc;
}

.repair-calc-branch-radio input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.repair-calc-branch-radio input[type="radio"]:checked + label {
    color: #2d3748;
    font-weight: 500;
}

.repair-calc-branch-radio.checked {
    border-color: #4299e1;
    background-color: #ebf8ff;
}

.repair-calc-branch-radio label {
    cursor: pointer;
    color: #4a5568;
    font-size: 15px;
    flex: 1;
    margin: 0;
}

.repair-calc-title {
    font-size: 32px;
    font-weight: bold;
    color: #1a365d;
    margin-bottom: 30px;
    text-align: center;
}

.repair-calc-section {
    margin-bottom: 30px;
}

.repair-calc-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
}

.repair-calc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.repair-calc-btn {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    color: #4a5568;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

.repair-calc-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.repair-calc-btn.active {
    background: #1a365d;
    color: #ffffff;
    border-color: #1a365d;
}

.repair-calc-price-info {
    margin: 20px 0;
    font-size: 14px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 8px;
}

.repair-calc-info-icon {
    cursor: help;
    font-size: 16px;
}

.repair-calc-table-wrapper {
    margin-top: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.repair-calc-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 600px;
}

.repair-calc-table thead {
    background: #4299e1;
    color: #ffffff;
}

.repair-calc-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.repair-calc-table thead th:first-child {
    border-top-left-radius: 8px;
}

.repair-calc-table thead th:last-child {
    border-top-right-radius: 8px;
}

.repair-calc-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.repair-calc-table tbody tr:last-child {
    border-bottom: none;
}

.repair-calc-table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.repair-calc-table tbody tr:hover {
    background: #edf2f7;
}

.repair-calc-table tbody td {
    padding: 15px;
    font-size: 14px;
    color: #2d3748;
    vertical-align: middle;
}

/* Улучшаем отображение бейджа акции в таблице */
.repair-calc-table tbody td .repair-calc-discount-label {
    margin-top: 4px;
    display: inline-block;
}

.repair-calc-row-hidden {
    display: none;
}

.repair-calc-card-hidden {
    display: none;
}

/* Мобильная версия - карточки */
.repair-calc-mobile-cards {
    display: none;
}

.repair-calc-service-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.repair-calc-service-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.repair-calc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.repair-calc-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
    margin: 0;
    flex: 1;
}

.repair-calc-card-hit-badge {
    display: inline-block;
    background: #ffc107;
    color: #000000;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 10px;
}

.repair-calc-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.repair-calc-card-row:last-child {
    border-bottom: none;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #e2e8f0;
}

.repair-calc-card-label {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
    min-width: 120px;
}

.repair-calc-card-value {
    font-size: 15px;
    color: #2d3748;
    font-weight: 600;
    text-align: right;
    flex: 1;
}

.repair-calc-card-price {
    font-size: 20px;
    color: #1a365d;
    font-weight: 700;
}

.repair-calc-card-price-old {
    display: block;
    font-size: 14px;
    color: #a0aec0;
    text-decoration: line-through;
    font-weight: 400;
    margin-top: 4px;
}

.repair-calc-card-price-free {
    color: #48bb78;
    font-weight: 700;
    font-size: 18px !important;
}

.repair-calc-card-price-request {
    color: #4299e1;
    font-weight: 600;
    font-size: 18px !important;
}

.repair-calc-card-discount {
    display: inline-block;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 6px;
    margin-left: 0;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1.2;
    transition: all 0.3s ease;
    width: fit-content;
}

.repair-calc-card-discount:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.repair-calc-card-btn-wrapper {
    padding: 15px 0 0 0;
}

.repair-calc-price-free {
    color: #48bb78;
    font-weight: 600;
}

.repair-calc-price-request {
    color: #4299e1;
    font-weight: 500;
}

.repair-calc-price-from {
    color: #2d3748;
    font-weight: 500;
}

.repair-calc-price-fixed {
    color: #2d3748;
    font-weight: 600;
    font-size: 16px;
}

.repair-calc-price-old {
    display: block;
    color: #a0aec0;
    text-decoration: line-through;
    font-size: 14px;
    margin-top: 4px;
}

.repair-calc-discount-label {
    display: inline-block;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 10px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.repair-calc-discount-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.repair-calc-hit-label {
    display: inline-block;
    background: #ffc107;
    color: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.repair-calc-show-full {
    text-align: center;
    margin-top: 30px;
    display: none; /* Скрыта по умолчанию, показывается только если услуг больше 5 */
}

.repair-calc-show-full-link {
    display: inline-block;
    color: #ff6b6b;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.repair-calc-show-full-link:hover {
    color: #ff5252;
    border-bottom-color: #ff5252;
}

.repair-calc-show-full-link:active {
    color: #ff3838;
}

.repair-calc-btn-full { }

/* Адаптивность */
@media (max-width: 768px) {
    .repair-calculator-wrapper {
        padding: 15px 10px;
    }
    
    .repair-calc-title {
        font-size: 22px;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    .repair-calc-section {
        margin-bottom: 20px;
    }
    
    .repair-calc-label {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .repair-calc-buttons {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        margin-bottom: 5px;
        scrollbar-width: thin;
    }
    
    .repair-calc-buttons::-webkit-scrollbar {
        height: 4px;
    }
    
    .repair-calc-buttons::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .repair-calc-buttons::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 4px;
    }
    
    .repair-calc-btn {
        flex-shrink: 0;
        padding: 10px 18px;
        font-size: 14px;
        white-space: nowrap;
        min-height: 42px;
    }
    
    /* Скрываем таблицу на мобильных */
    .repair-calc-table-wrapper .repair-calc-table {
        display: none;
    }
    
    /* Показываем карточки на мобильных */
    .repair-calc-mobile-cards {
        display: block;
    }
    
    .repair-calc-service-card {
        padding: 18px;
        margin-bottom: 16px;
    }
    
    .repair-calc-card-title {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .repair-calc-card-row {
        padding: 10px 0;
    }
    
    .repair-calc-card-label {
        font-size: 12px;
        min-width: 100px;
    }
    
    .repair-calc-card-value {
        font-size: 14px;
    }
    
    .repair-calc-card-price {
        font-size: 18px;
    }
    
    .repair-calc-card-price-old {
        font-size: 13px;
    }
    
    .repair-calc-card-discount {
        font-size: 10px;
        padding: 5px 10px;
        margin-top: 6px;
        display: block;
        width: fit-content;
    }
    
    .repair-calc-discount-label {
        font-size: 10px;
        padding: 5px 10px;
        margin-left: 6px;
    }
    
    .repair-calc-price-info {
        font-size: 12px;
        margin: 15px 0;
    }
    
    .repair-calc-show-full {
        margin-top: 20px;
    }
    
    .repair-calc-show-full-link {
        font-size: 14px;
        padding: 6px 0;
    }
    
    .repair-calc-btn-full {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .repair-calc-table {
        font-size: 13px;
    }
    
    .repair-calc-table thead th,
    .repair-calc-table tbody td {
        padding: 12px 10px;
    }
}

/* Большие экраны - скрываем карточки */
@media (min-width: 769px) {
    .repair-calc-mobile-cards {
        display: none !important;
    }
    
    .repair-calc-table-wrapper .repair-calc-table {
        display: table;
    }
}

