/* ==== Modal ==== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    padding: 2px;
    border-radius: 20px;
    background: linear-gradient(135deg, #97CBEB, #997ADA);
    box-shadow: 0 0 25px rgba(153, 122, 218, 0.5);
    animation: glow 3s infinite alternate;
    overflow: hidden;
}

.modal-wave {
    background-image: url('../img/default-wave.png');
    background-size: 100%;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    position: absolute;
    z-index: 1;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 25px rgba(151, 203, 235, 0.6);
    }

    100% {
        box-shadow: 0 0 45px rgba(153, 122, 218, 0.9);
    }
}

.login-box {

    border-radius: 20px;
    padding: 40px;
    /* backdrop-filter: blur(10.6px);
    -webkit-backdrop-filter: blur(10.6px); */
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 340px;
    color: #fff;
    text-align: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.login-box p {
    font-size: 14px;
    margin: 8px 0;
}

.icon-wrapper {
    font-size: 50px;
    margin-bottom: 10px;
    color: #00c8ff;
}

/* Поля форми */
.modal form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.modal form input,
.modal form select,
.modal form textarea {
    width: calc(100% - 26px);
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Montserrat-Regular', sans-serif;
}

.modal form select {
    width: 100%;
    background-clip: padding-box;
    -webkit-appearance: none;
    /* вимикає стандартний стиль iOS */
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='14' viewBox='0 0 20 20' width='14' xmlns='http://www.w3.org/2000/svg'><path d='M5.516 7.548l4.484 4.956 4.484-4.956a.625.625 0 0 0-.937-.83L10 10.864 6.453 6.718a.625.625 0 0 0-.937.83z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;

}

.modal form input:focus,
.modal form select:focus,
.modal form textarea:focus {
    outline: none;
    border-color: #6a5af98a;
    box-shadow: 0 0 8px rgba(209, 115, 253, 0.6);
}

.modal form input:invalid,
.modal form select:invalid {
    border-color: #ff4d4d;
    box-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
}

.modal form textarea {
    resize: none;
}


/* Кнопка відправки */
.modal form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #6a5af9, #f77fff);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.modal form:has(:invalid) button[type="submit"] {
    background: linear-gradient(90deg, #444, #ccc);
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.modal form button:hover {
    opacity: 0.9;
}

.options {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 20px;
}

.options a {
    color: #00c6ff;
    text-decoration: none;
}


.modal form input:invalid~.modal form button,
.modal form select:invalid~.modal form button {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
}


/* Повідомлення про успіх */
#form-response {
    margin-top: 10px;
    font-family: 'Montserrat-Bold', sans-serif;
    font-weight: bold;
    background-color: #e7f9ed;
    color: #2a7a2a;
    border: 1px solid #b2e3c1;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*  ========= */
@media screen and (max-width: 415px) {
    .login-box h2 {
        font-size: 22px;
        width: 86%;
        margin: 0 auto;
    }

    .login-box {
        width: 96%;
        margin: 0 auto;
        padding: 40px 10px;
    }

    .modal form input,
    .modal form textarea {
        width: calc(100% - 46px);
    }

    .modal form select {
        width: calc(100% - 20px);
    }

    .modal form button {
        width: 80%;
    }

}