/* Popup */
.popup-block {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
}

.popup-block.active {
    opacity: 1;
    visibility: visible;
}

.popup-block_exit-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* Frame */
.popup-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 56px;
    gap: 24px;
    isolation: isolate;
    width: 544px;
    height: 608px;
    background: #FFFFFF;
    border-radius: 12px;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.popup-block.active .popup-wrapper {
    transform: translateY(0);
}

/* Close button */
.popup-close {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 8px;
    gap: 8px;
    position: absolute;
    width: 40px;
    height: 40px;
    right: 24px;
    top: 24px;
    cursor: pointer;
    z-index: 1;
}

/* Title */
.popup-title {
    width: 432px;
    height: 32px;
    font-family: 'Roboto Slab', serif;
    font-style: normal;
    font-weight: 700;
    font-size: 28px;
    line-height: 32px;
    color: #242440;
    margin: 0;
    align-self: stretch;
}

/* Form */
.callback-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 16px;
    width: 432px;
    height: 440px;
    align-self: stretch;
    color: #242440;
}

.form-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 12px;
    width: 432px;
    height: 140px;
    align-self: stretch;
}

.form-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0px;
    gap: 12px;
    width: 432px;
    align-self: stretch;
}

/* Inputs */
.form-input {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 3px;
    height: 48px;
    flex: 1;
    width: 100%;
    color: #242440;
}

.form-input input {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 12px;
    width: 100%;
    height: 48px;
    background: #FFFFFF;
    border: 1px solid #242440;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    /*color: #93A0AD;*/
    color: #242440 !important;
}

.form-input input:focus {
    outline: none;
    border-color: #0FC4AC;
    color: #242440;
}

.form-input input::placeholder{
    color: #242440;
}

.form-textarea {
    height: 80px;
}

.form-textarea textarea {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 12px;
    width: 100%;
    height: 80px;
    background: #FFFFFF;
    border: 1px solid #242440;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #242440;
    resize: none;
}

.form-textarea textarea::placeholder{
    color: #242440;
}

.form-textarea textarea:focus {
    outline: none;
    border-color: #0FC4AC;
    color: #242440;
}

/* Contact methods */
.contact-methods {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 4px;
    width: 195px;
    height: 108px;
}

.radio-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 8px;
    width: 195px;
    height: 24px;
    align-self: stretch;
}
.radio-item input[type="radio"] {
    appearance: none;

    border-radius: 50%;
    width: 20px;
    height: 20px;

    border: 1px solid #242440;
    transition: 0.2s all linear;
    margin: 0 5px 0 0;

    position: relative;
}

.radio-item input[type="radio"]:checked {
    border: 5px solid #0FC4AC;
}





.radio-item label {
    width: 163px;
    height: 18px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #242440;
    cursor: pointer;
    flex: 1;
}

/* Time section */
.time-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;
    width: 225px;
    height: 74px;
    flex: 1;
}

.time-label {
    width: 225px;
    height: 18px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #242440;
    align-self: stretch;
}

.form-select {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 3px;
    width: 225px;
    height: 48px;
    align-self: stretch;
    position: relative;
}

.form-select select {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 12px;
    width: 225px;
    height: 48px;
    background: #FFFFFF;
    border: 1px solid #242440;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #242440;
    appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Form footer */
.form-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 12px;
    width: 432px;
    height: 160px;
    align-self: stretch;
}

.submit-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 13px 24px 14px;
    gap: 8px;
    width: 432px;
    height: 48px;
    background: linear-gradient(273.3deg, #E28949 0%, #EA665F 100%);
    border-radius: 8px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    color: #FFFFFF;
    cursor: pointer;
    align-self: stretch;
    transition: transform 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
}

/* Checkboxes */
.checkboxes {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 4px;
    width: 417px;
    height: 52px;
}

.checkbox-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 8px;
    width: 417px;
    height: 24px;
    align-self: stretch;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    appearance: none;
    accent-color: #0FC4AC;
    border: 1px solid #E9ECEF;
    position: relative;
    border-radius: 4px;
}
input[type="checkbox"]:checked,
input[type="checkbox"]:not(:checked)
{
    position: absolute;
    left: -9999px;
}

input[type="checkbox"]:checked + label,
input[type="checkbox"]:not(:checked) + label{
    display: inline-block;
    position: relative;
    padding-left: 28px;
    line-height: 20px;
    cursor: pointer;
}

input[type="checkbox"]:checked + label:before,
input[type="checkbox"]:not(:checked) + label:before{
    content: "";
    position: absolute;
    left: 0px;
    top: 0px;
    width: 18px;
    height: 18px;
    border: 1px solid #242440;
    background-color: #ffffff;
}

input[type="checkbox"]:checked + label:before,
input[type="checkbox"]:not(:checked) + label:before {
    border-radius: 4px;
}
input[type="checkbox"]:checked + label:before{
    background: #242440;
    border: none;
}

input[type="checkbox"]:checked + label:after,
input[type="checkbox"]:not(:checked) + label:after{
    content: "";
    position: absolute;
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked + label:after,
input[type="checkbox"]:not(:checked) + label:after {
    left: 3px;
    top: 4.5px;
    width: 11px;
    height: 6px;
    border-radius: 1px;
    border-left: 3px solid white;
    border-bottom: 3px solid white;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

input[type="checkbox"]:not(:checked) + label:after {
    opacity: 0;
}

input[type="checkbox"]:checked + label:after{
    opacity: 1;
}
.checkbox-item label {
    width: 385px;
    height: 18px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #242440;
    cursor: pointer;
    flex: 1;
}

.guarantee-text {
    width: 432px;
    height: 36px;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #242440;
    margin: 0;
    align-self: stretch;
}

@media (max-width: 768px) {
    .popup-block {
        padding: 20px;
    }
    
    .popup-wrapper {
        width: 100%;
        max-width: 400px;
        height: auto;
        padding: 40px 30px;
    }
    
    .popup-title,
    .callback-form,
    .form-section,
    .form-row,
    .form-footer,
    .checkboxes {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        height: auto;
    }
    
    .contact-methods,
    .time-section {
        width: 100%;
    }
    
    .form-select select {
        width: 100%;
    }
}