/* Modal Login */
.modal-login {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.modal-login.active {
    display: flex;
}

.modal-login::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
    opacity: 0;
    animation: modalBackdropFadeIn 225ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.modal-login-open {
    overflow: hidden;
}

@keyframes modalBackdropFadeIn {
    to {
        opacity: 1;
    }
}

.modal-login-paper {
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2),
                0px 24px 38px 3px rgba(0,0,0,0.14),
                0px 9px 46px 8px rgba(0,0,0,0.12);
    overflow: hidden;
    animation: modalSlideIn 225ms cubic-bezier(0.4, 0, 0.2, 1);
    font-family: Montserrat, 'Public Sans', sans-serif;
    position: relative;
    z-index: 1;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.modal-login-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-login-header-left svg {
    width: 24px;
    height: 24px;
}

.modal-login-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    font-family: Montserrat, 'Public Sans', sans-serif;
}

.modal-login-close {
    cursor: pointer;
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.modal-login-close:hover {
    opacity: 0.7;
}

.modal-login-divider {
    margin: 0;
    border: none;
    border-top: 1px solid rgba(145, 158, 171, 0.2);
}

.modal-login-content {
    padding: 24px;
}

.modal-login-content .mui-phone-field {
    display: flex;
    align-items: stretch;
    margin-bottom: 16px;
    border: 1px solid rgba(145, 158, 171, 0.32);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.modal-login-content .mui-phone-field:focus-within {
    border-color: var(--color-website);
}

.modal-login-content .country-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px 0 12px;
    background-color: transparent;
    border: none;
    border-radius: 8px 0 0 8px;
    flex-shrink: 0;
    height: 54px;
}

.modal-login-content .country-divider {
    width: 1px;
    height: 24px;
    margin-left: 8px;
}

.modal-login-content .flag-icon {
    width: 28px;
    height: 20px;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.modal-login-content .flag-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-login-content .mui-text-field {
    flex: 1;
    position: relative;
}

.modal-login-content .mui-label {
    position: absolute;
    top: 0;
    left: -70px;
    padding: 0 5px;
    font-size: 0.75rem;
    font-weight: 400;
    font-family: Montserrat, 'Public Sans', sans-serif;
    z-index: 1;
    pointer-events: none;
    transform: translateY(-50%);
}

.modal-login-content .mui-label .required {
    color: #FF5630;
}

.modal-login-content .mui-input-container {
    height: 56px;
}

.modal-login-content .mui-input-container input {
    width: 100%;
    height: 100%;
    padding: 16.5px 14px;
    font-size: 1rem;
    font-weight: 400;
    background-color: transparent;
    border: none;
    border-radius: 0 8px 8px 0;
    outline: none;
    font-family: Montserrat, 'Public Sans', sans-serif;
    box-sizing: border-box;
}

.modal-login-content .mui-input-container input:focus {
    outline: none;
    box-shadow: none;
}

.modal-login-content .mui-input-container input::placeholder {
    color: #637381;
}

.modal-login-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.modal-login-alert-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.modal-login-alert-text {
    font-size: 0.875rem;
    font-weight: 400;
    font-family: Montserrat, 'Public Sans', sans-serif;
}

.modal-login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: Montserrat, 'Public Sans', sans-serif;
    min-height: 48px;
    box-shadow: 0px 3px 1px -2px rgba(0,0,0,0.2),
                0px 2px 2px 0px rgba(0,0,0,0.14),
                0px 1px 5px 0px rgba(0,0,0,0.12);
    transition: filter 0.2s;
}

.modal-login-submit:hover {
    filter: brightness(0.9);
}

/* Message Empty */
.message-empty {
    font-size: 0.9em;
    text-align: center;
    font-weight: 400;
    padding-top: 20px;
}

/* Order Item Card Hover */
.order-item-card:hover {
    opacity: 0.9;
}

/* Mobile */
@media only screen and (max-width: 789px) {
    .modal-login {
        padding: 16px;
    }

    .modal-login-paper {
        max-width: 100%;
    }

    .modal-login-header {
        padding: 16px 20px;
    }

    .modal-login-content {
        padding: 20px;
    }

    .modal-login-content .mui-input-container input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
