/* --- GOL FREIGHT CALCULATOR STYLES --- */

/* 1. Global & Wrapper */
.gol-calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    box-sizing: border-box;
}

.gol-calculator-wrapper * {
    box-sizing: border-box;
}

/* 2. Main Layout (Two Columns) */
.gol-calc-layout {
    display: flex;
    gap: 30px;
    align-items: stretch;
    margin-bottom: 30px;
}

/* 3. Left Column: Form Box */
.gol-calc-form-container {
    flex: 0 0 50%;
    background: #001b3a; 
    padding: 35px 25px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gol-calc-form-container p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 4. Inputs */
.gol-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* Horizontal group for numbers */
.gol-input-group-row {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.gol-calculator-wrapper input[type="text"],
.gol-calculator-wrapper input[type="number"] {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    background: #ffffff;
    color: #333;
    transition: box-shadow 0.2s;
}

.gol-calculator-wrapper input:focus {
    box-shadow: 0 0 0 3px rgba(19, 141, 182, 0.3);
}

/* 5. Checkbox (Refrigerated) */
.gol-checkbox-group {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 6px;
}

.gol-checkbox-group label {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.gol-checkbox-group input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #138db6;
}

/* 6. Button */
#gol-calc-submit {
    width: 100%;
    background: #138db6;
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

#gol-calc-submit:hover {
    background: #005a8d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(19, 141, 182, 0.3);
}

#gol-calc-submit:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 7. Right Column: Map */
.gol-map-container {
    flex: 0 0 calc(50% - 30px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

#gol-map {
    width: 100%;
    height: 100%;
    min-height: 450px;
}

/* 8. Bottom Result Block */
#gol-result-box {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-top: 10px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.gol-result-header {
    background: #F7F7F7;
    padding: 25px 40px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gol-result-price-label {
    font-size: 14px;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.gol-result-price-value {
    margin: 0;
    font-size: 36px;
    color: #004b87;
    font-weight: 800;
    line-height: 1;
}

.gol-result-price-value .currency {
    font-size: 20px;
    color: #004b87;
    font-weight: 600;
}

.gol-result-stats {
    padding: 25px 30px;
    display: flex;
    gap: 40px;
}

.gol-stat-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.gol-stat-box span.label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.gol-stat-box span.value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

#gol-error-msg {
    margin: 0;
    padding: 20px 30px;
    color: #d63031;
    background: #fff2f2;
    border-top: 1px solid #ffdede;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
}

/* 9. Disclaimer */
.gol-disclaimer {
    background: white;
    border-top: 1px solid #d4e3f0;
    padding: 12px 30px;
    font-size: 13px;
    color: #4a6b8c;
    text-align: center;
    line-height: 1.4;
}

.gol-disclaimer a {
    color: #004b87;
    font-weight: 600;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.2s;
    white-space: nowrap;
}

.gol-disclaimer a:hover {
    color: #138db6;
    text-decoration: underline;
}

#gol-error-msg:not([style*="display: none"]) ~ .gol-disclaimer {
    display: none;
}

/* 11. Swap Route Button */
.gol-route-group {
    display: flex;
    flex-direction: row; /* Располагаем инпуты и кнопку в один ряд */
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.gol-route-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1; /* Инпуты занимают всё доступное место */
}

#gol-swap-route {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 6px; /* Круглая кнопка */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

#gol-swap-route:hover {
    background: #138db6;
    border-color: #138db6;
    transform: rotate(180deg); /* Крутой эффект прокрутки при наведении */
}

#gol-swap-route svg {
    transition: transform 0.3s ease;
}

/* 12. Loading Animation */
#gol-loading-box {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 50px 30px;
    margin-top: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gol-loader {
    width: 50px;
    height: 50px;
    border: 4px solid #eef4fa; /* Светло-голубой контур */
    border-bottom-color: #138db6; /* Фирменный синий акцент */
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gol-loader-text {
    margin-top: 20px;
    color: #004b87;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* 10. Mobile Adaptation */
@media (max-width: 992px) {
    .gol-calc-layout {
        flex-direction: column;
    }
    
    .gol-calc-form-container {
        flex: none;
        width: 100%;
    }
    
    .gol-map-container {
        flex: none;
        width: 100%;
        height: 400px;
    }
}

@media (max-width: 600px) {
    /* 1. Делаем саму форму компактнее */
    .gol-calc-form-container {
        padding: 20px 15px; 
    }

    /* 2. Уменьшаем размер текстовых полей */
    .gol-calculator-wrapper input[type="text"],
    .gol-calculator-wrapper input[type="number"] {
        padding: 12px 15px;
        font-size: 14px;
    }

    /* 3. Кнопка смены маршрута: возвращаем сбоку (как на ПК), но уменьшаем */
    .gol-route-group {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    #gol-swap-route {
        width: 38px;
        height: 38px;
        transform: none; /* Убираем поворот 90 градусов */
        align-self: center;
    }
    #gol-swap-route:hover {
        transform: rotate(180deg);
    }
    #gol-swap-route svg {
        width: 16px;
        height: 16px;
    }

    /* 4. Чекбокс рефрижератора делаем аккуратнее */
    .gol-checkbox-group {
        padding: 12px;
        margin-bottom: 15px;
    }
    .gol-checkbox-group label {
        font-size: 13px;
    }

    /* 5. Детали груза: выстраиваем в сетку (Вес и Объем рядом, Паллеты внизу) */
    .gol-input-group-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        flex-direction: unset; /* Отключаем старый flex */
    }
    .gol-input-group-row input:nth-child(3) {
        grid-column: span 2; /* Паллеты растягиваются на всю ширину */
    }

    /* 6. Кнопка расчета */
    #gol-calc-submit {
        padding: 14px;
        font-size: 15px;
    }

    /* 7. Адаптация нижнего блока с результатами (оставляем центрирование) */
    .gol-result-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }
    .gol-stat-box {
        align-items: center;
    }
    .gol-result-stats {
        flex-direction: column;
        gap: 15px;
    }
}