/* ==================== OVERLAY ДЛЯ ЛОГІНУ ==================== */

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;

    border-radius: 10px;
    text-align: center;
    color: white;
}

/* Контейнер форми */
.overlay .form-container {
    background: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    box-sizing: border-box; /* обов'язково для відступів */
}

/* Поля форми */
.overlay input[type="text"],
.overlay input[type="password"] {
    width: 100%;
    box-sizing: border-box; /* ключове! */
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 16px;
    background-color: #f7f7f7;
}

/* Чекбокс */
.overlay label {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 15px;
    font-size: 15px;
    padding-left: 12px; /* вирівнювання з input'ами */
}

.overlay button.btn {
    width: auto; /* Замість 100% — тепер ширина визначається контентом */
    padding: 10px 30px;
    font-size: 16px;
    background-color: #0E8388;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay button.btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    background-color: #09696C;
}

.overlay button.btn[disabled] {
    background-color: grey;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Помилки */
.overlay #login-errors {
    color: red;
    margin-top: 10px;
    font-weight: bold;
    font-size: 14px;
}

/* Адаптивність */
@media (max-width: 768px) {
    .overlay .form-container {
        padding: 5px 15px;
        width: 100%;
        height: 100%;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .overlay input[type="text"],
    .overlay input[type="password"],

    .overlay button.btn {
        font-size: 14px;
        padding: 6px;
    }

    .overlay h2 {
        font-size: 16px;
        margin: 6px;
    }

    .overlay label {
        font-size: 10px;
    }
}
