.calculator-section {
    width: 100%;
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f7f7f7;
}

.calculator-wrapper {
    width: 100%;
    max-width: 1240px;
}

.calculator-container {
    display: flex;
    gap: 30px;
    width: 100%;
}

.calculator-left {
    flex: 1;
    max-width: 550px;
}

.calculator-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
}

.calculator-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.guarantee-block {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.guarantee-block img {
    width: 65px;
    height: 66px;
}

.guarantee-text {
    display: flex;
    flex-direction: column;
}

.guarantee-text span {
    font-size: 14px;
    line-height: 1.4;
}

.rating-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
}

.rating-block .stars {
    color: #ffb400;
    font-size: 18px;
}

.form-section {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #8c8c8c;
    margin-bottom: 10px;
}

.area-selector {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.area-button {
    flex-grow: 1;
    padding: 12px 5px;
    border: none;
    border-right: 1px solid #e0e0e0;
    background-color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.2s;
}

.area-button.active {
    background-color: #F98820;
    color: #fff;
    font-weight: 600;
}

.area-input-wrapper {
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.area-input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
}

/* Remove arrows from number input */
.area-input::-webkit-outer-spin-button,
.area-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.area-input[type=number] {
  -moz-appearance: textfield;
}

.area-input::placeholder {
    color: #ccc;
}

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    pointer-events: none;
}

#service-select,
#regularity-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    cursor: pointer;
}

.price-section {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 30px;
    margin-bottom: 20px;
}

.price-label {
    font-size: 24px;
    font-weight: 600;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.order-button {
    width: 100%;
    padding: 16px;
    background-color: #F98820;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
}

.order-button:hover {
    background-color: #e37a1c;
}


/* Mobile Styles */
@media (max-width: 992px) {
    body {
        padding: 20px 15px;
    }
    .calculator-container {
        flex-direction: column;
    }
    .calculator-right {
        display: none;
    }
    .calculator-left {
        max-width: 100%;
    }
    .calculator-title {
        font-size: 32px;
    }
    .area-selector {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .area-selector::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    .area-button {
        flex: 0 0 70px; /* Не сжимать, не растягивать, ширина 70px */
        width: 70px;
        border-bottom: none;
    }
    
    /* Сбрасываем правила для сетки, возвращаем правые границы */
    .area-button:nth-child(3n) {
        border-right: 1px solid #e0e0e0;
    }
     .area-button:nth-child(n+4) {
       border-bottom: none;
    }
    
    .area-input-wrapper {
        flex: 0 0 auto;
        width: auto;
        border-top: none;
        border-left: 1px solid #e0e0e0;
        padding: 0 15px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .area-button {
        padding: 10px 5px;
        font-size: 14px;
    }
    #service-select,
    #regularity-select {
        padding: 10px 12px;
        font-size: 14px;
    }
    .calculator-title {
        font-size: 28px;
    }
}


/* --- Modal Styles --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
}

.modal-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 30px;
}

.modal-form input[type="text"],
.modal-form input[type="tel"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

.contact-method-selector {
    text-align: left;
    margin-top: 20px;
    margin-bottom: 25px;
}

.contact-method-selector p {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
}

.contact-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.icon-wrapper:hover {
    border-color: #ccc;
    background-color: #f9f9f9;
}

.icon-wrapper.active {
    border-color: #ff6e2d;
    border-width: 2px;
}

.icon-wrapper img {
    width: 28px;
    height: 28px;
}

.contact-icons .icon-wrapper i {
    font-size: 2.5em;
    line-height: 1;
    display: block;
    margin: 0 auto;
}


.agreement-checkbox {
    text-align: left;
    margin-bottom: 30px;
}

.agreement-checkbox input {
    margin-right: 10px;
}

.agreement-checkbox label {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.agreement-checkbox a {
    color: #ff6e2d;
    text-decoration: none;
}
.agreement-checkbox a:hover {
    text-decoration: underline;
}


.modal-submit-button {
    width: 100%;
    padding: 16px;
    background-color: #f0f0f0;
    color: #aaa;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: not-allowed;
}

/* Let's assume a class 'valid' enables the button */
.modal-submit-button.valid {
    background-color: #ff6e2d;
    color: #fff;
    cursor: pointer;
}
.modal-submit-button.valid:hover {
     background-color: #e65c1a;
}

@media (min-width: 993px) {
    .calculator-section {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 60px 15px;
    }

    .calculator-container {
        flex-direction: row;
        gap: 40px;
    }

    .calculator-right {
        display: flex;
    }
} 