/* === POPUP === */

#custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#custom-popup {
    background: white;
    border-radius: 10px;
    max-width: 80%;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: max-width 0.3s ease;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popup-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    min-height: 569px;
}

.popup-content {
    padding: 40px; 
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    font-size: 16px;
}
.text {
    margin-bottom: 1rem;
}
.popup-content h2 {
    font-size: 28px;
    font-weight: 700;
}

.popup-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popup-image {
    flex: 1;
    overflow: hidden;
    position: relative;
    border-radius: 0 10px 10px 0;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popup-page {
    display: none;
    color: #000;
    font-family: 'Gilroy', Arial, sans-serif;
    font-weight: 400;
    line-height: normal;
}

.popup-page.active {
    display: block;
}

#popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.popup-close-icon {
    width: 40px;
    height: 40px;
}

.input-group,
.checkbox-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
}

.input-group input,
.checkbox-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

label[for="name"],
label[for="email"] {
    color: #000;
    font-size: 16px;
    font-weight: 700;
}

label[for="agree"] {
    color: #737373;
    font-size: 13px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #000;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    position: relative;
    outline: none;
    display: inline-block;
    margin-top: 4px;
}

.checkbox-group input[type="checkbox"]:checked {
    background: #000;
    border-color: #000;
}

.checkbox-group input[type="checkbox"]:checked::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 9px;
    background: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="9" viewBox="0 0 12 9" fill="none"><path d="M11.854 0.646a.5.5 0 0 1 .708.708L4.708 8.207a.5.5 0 0 1-.708 0L.146 4.353a.5.5 0 1 1 .708-.708L4.5 7.207l7.354-7.354z" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    transform: translate(-50%, -50%);
}

.checkbox-group label {
    cursor: pointer;
    flex: 1;
}

input::-webkit-input-placeholder, 
textarea::-webkit-input-placeholder {
    color: #9A9A9A;
}

input::-moz-placeholder, 
textarea::-moz-placeholder {
    color: #9A9A9A;
}

input:-ms-input-placeholder, 
textarea:-ms-input-placeholder {
    color: #9A9A9A;
}

input::-ms-input-placeholder, 
textarea::-ms-input-placeholder {
    color: #9A9A9A;
}


.button-with-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: right;
    line-height: normal;
    letter-spacing: 1px;
}

.button-with-arrow:hover {
    background-color: #333;
}

.button-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-arrow svg {
    width: 17px;
    height: 10px;
    fill: #fff;
}

#success-message,
#error-message {
    display: none;
    text-align: center;
}

#success-message.active,
#error-message.active {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.confirmation-text,
.error-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: black;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
}

.confirmation-text {
    background-color: #DFF5DA;
}

.error-text {
    background-color: #FFDBDC;
}

/* === Стили для опций === */

.options {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.option {
    position: relative;
    text-align: center;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.option img {
    max-width: 100%;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.option img:hover,
.option.selected img {
    background: lightgray;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.option .check-circle {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #F2E8E4;
    display: none;
    justify-content: center;
    align-items: center;
}

.option.selected .check-circle {
    display: flex;
}

.option h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 16px;
    width: 100%;
    text-align: left;
}

#popup-page-1 #popup-close svg {
    stroke: #FFF;
}

#popup-page-2 .popup-container {
    align-items: center;
}

#popup-page-2 #popup-form {
    display: flex;
    flex-direction: column;
    margin: 0 40px 0 0;
}

#popup-page-2 #form-submit {
    position: absolute;
    right: 40px;
    bottom: 40px;
    z-index: 10;
}

/* Страница 3 */
#popup-page-3 .popup-content {
    width: 100%;
}

#custom-popup.page-3 {
    width: 800px;
    max-width: 80%;
}

#popup-page-3 #popup-close svg {
    width: 32px;
    height: 32px;
}





#mini-popup {
    display: none;
    position: fixed;
    bottom: 124px;
    right: 50px;
    width: 130px;
    height: 50px; 
    background-color: #C1111F; 
    border-radius: 10px;
    cursor: pointer;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: Cabin;
    color: #fff;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 0 8px;
}

#mini-popup .mini-popup-icon {
    margin-right: 4px;
    margin-bottom: 4px;
    font-size: 14px;
}
#mini-popup .mini-popup-text {
    font-size: 14px;
}





#mini-popup-close {
    position: absolute;
    top: -8px;
    left: -8px;

    display: inline-flex;
    align-items: center;
    justify-content: center; 
    gap: 4px;

    border: 1px solid transparent;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #1f2937;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;

    transition: background-color 0.2s ease, color 0.2s ease;
}

#mini-popup-close:hover {
    background: #e5e7eb;
}

#mini-popup-close:focus {
    outline: 2px solid #ccc; 
    outline-offset: 2px;
}

#mini-popup-close:disabled {
    pointer-events: none;
    opacity: 0.5;
}

#mini-popup:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}


@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(5px);
    }
    75% {
        transform: translateX(-5px);
    }
}

#mini-popup.shake {
    animation: shake 0.5s ease-in-out;
    animation-iteration-count: 3;
}













@media (max-width: 767px) {
    #mini-popup {
        right: 10px;
    }
    #mini-popup:hover {
        transform: none;
        box-shadow: none;
    }
    label[for="agree"] {
        font-size: 8px;
    }
    .text p {
        display:none;
    }
    .input-group input, .checkbox-group input, button {
    font-size: 16px;
    line-height: normal;
    }

    #custom-popup #popup-close svg {
        width: 32px;
        height: 32px;
        stroke: #9A9A9A;
    }
    .popup-container {
        flex-direction: column;
        min-height: auto;
    }

    .popup-content {
        width: 100%;
    }
    
    .popup-image {
    border-radius: 0 0 10px 10px;
    height: 204px;
    flex: none;

    }
    
    .popup-image img {
        object-position: bottom;
    }
    .popup-content {
        padding: 40px 20px 20px;
        font-size: 14px;
    }

    .popup-content h2 {
        font-size: 20px;

    }

    .popup-content p {
        font-size: 14px;
    }

    .button-with-arrow {
        padding: 12px 24px;
        font-size: 14px;
    }

    #popup-close {
        top: 10px;
        right: 10px;
    }
    #popup-page-2 .popup-content {
        text-align: center;
    }
    #popup-page-2 .popup-container {
        align-items: stretch;
    }

    #popup-page-2 #popup-form {
        margin: 0;
        padding: 0 0 40px;
    }

    .options {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .option {
        flex: 0 1 40%;
        max-width: 133px;
        justify-content: flex-start;
    }

    .option h3 {
        font-size: 11px;
        margin-top: 8px;
        text-align: center;
    }

    #popup-page-2 #form-submit {
        position: static;
        margin: 20px auto;
    }

    #popup-page-3 .popup-content {
        padding: 20px;
    }
    #popup-page-3.active #custom-popup {
        max-width: 80% !important;
        width: 100%; 
        padding: 20px; 
        box-sizing: border-box;
    }

    #custom-popup.page-3 {
        width: 100%;
        max-width: 100%;
    }
}
