/**
 * BEM Styles for Account Registration Page
 */

.auth-register {
    width: 100%;
    max-width: 820px;
    margin: 20px auto;
}

.auth-register__card {
    background: #ffffff;
    border-radius: 20px;
    padding: 38px 44px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
    box-sizing: border-box;
}

.auth-register__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 14px;
    text-decoration: none;
}

.auth-register__logo-img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.auth-register__brand-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #024f30;
    text-transform: uppercase;
}

.auth-register__header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-register__title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
    letter-spacing: -0.015em;
}

.auth-register__subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.auth-register__form {
    width: 100%;
}

.auth-register__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    row-gap: 16px;
}

.auth-register__group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-register__group--full {
    grid-column: 1 / -1;
}

.auth-register__label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.auth-register__required {
    color: #dc2626;
    font-weight: 700;
    font-size: 14px;
    margin-right: 4px;
    line-height: 1;
}

.auth-register__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-register__input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 13.5px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #111827;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.auth-register__input-wrapper .auth-register__input {
    padding-right: 40px;
}

.auth-register__input::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.auth-register__input:focus {
    border-color: #065d35;
    box-shadow: 0 0 0 3px rgba(6, 93, 53, 0.12);
}

.auth-register__input--select {
    padding-right: 36px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.auth-register__input--error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.auth-register__icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
    z-index: 2;
}

.auth-register__icon-btn:hover {
    color: #4b5563;
}

.auth-register__icon-btn .material-icons-outlined {
    font-size: 18px;
}

.auth-register__error-text {
    font-size: 11.5px;
    color: #dc2626;
    margin-top: 2px;
    display: block;
    line-height: 1.4;
}

.auth-register__action {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.auth-register__submit {
    width: 100%;
    height: 44px;
    background: #01B750;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(1, 183, 80, 0.28);
}

.auth-register__submit:hover {
    background: #019a43;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(1, 183, 80, 0.35);
}

.auth-register__submit:active {
    transform: translateY(0);
}

.auth-register__submit:disabled,
.auth-register__submit--loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.auth-register__footer {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 10px;
}

.auth-register__login-link {
    color: #065d35;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-register__login-link:hover {
    text-decoration: underline;
    color: #024f30;
}

@media (max-width: 860px) {
    .auth-register {
        max-width: 100%;
        margin: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .auth-register__card {
        width: 100%;
        max-width: 520px;
        padding: 26px 20px;
        border-radius: 16px;
    }

    .auth-register__grid {
        grid-template-columns: 1fr;
        row-gap: 14px;
    }

    .auth-register__title {
        font-size: 21px;
    }
}

/* Mobile (360px - 540px) Bottom Sheet Native App UX */
@media (max-width: 540px) {
    .auth-register {
        margin: 0;
        padding: 18vh 0 0 0; /* Thừa 1 khoảng trống phía trên nhìn thoáng ảnh phong cảnh */
        box-sizing: border-box;
        width: 100%;
        display: block;
    }

    .auth-register__card {
        max-width: 100%;
        width: 100%;
        background: #ffffff;
        border-radius: 32px 32px 0 0;
        padding: 20px 22px 36px;
        box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.14);
        border: none;
        box-sizing: border-box;
        position: relative;
    }

    /* Drag Handle Bar Indicator */
    .auth-register__card::before {
        content: "";
        display: block;
        width: 38px;
        height: 4px;
        border-radius: 2px;
        background: #e5e7eb;
        margin: 0 auto 16px;
    }

    .auth-register__header {
        margin-bottom: 20px;
        text-align: center;
    }

    .auth-register__title {
        font-size: 22px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #065d35;
        margin-bottom: 6px;
    }

    .auth-register__subtitle {
        font-size: 13px;
        line-height: 1.45;
        color: #6b7280;
    }

    .auth-register__grid {
        grid-template-columns: 1fr;
        row-gap: 13px;
    }

    .auth-register__group {
        gap: 5px;
    }

    .auth-register__label {
        font-size: 12.5px;
        font-weight: 600;
        color: #374151;
    }

    .auth-register__input {
        height: 46px;
        padding: 0 16px;
        border-radius: 24px;
        background-color: #f0f4f9;
        border: 1px solid transparent;
        font-size: 14px;
        color: #111827;
        transition: all 0.2s ease;
    }

    .auth-register__input::placeholder {
        color: #8c9ba8;
    }

    .auth-register__input:focus {
        background-color: #ffffff;
        border-color: #065d35;
        box-shadow: 0 0 0 4px rgba(6, 93, 53, 0.12);
    }

    .auth-register__input-wrapper .auth-register__input {
        padding-right: 44px;
    }

    .auth-register__icon-btn {
        right: 12px;
        padding: 6px;
    }

    .auth-register__icon-btn .material-icons-outlined {
        font-size: 20px;
        color: #8c9ba8;
    }

    .auth-register__submit {
        height: 48px;
        font-size: 15px;
        font-weight: 700;
        border-radius: 24px;
        margin-top: 8px;
        box-shadow: 0 4px 14px rgba(1, 183, 80, 0.25);
    }

    .auth-register__footer {
        margin-top: 16px;
    }

    .auth-register__login-link {
        font-size: 13.5px;
        font-weight: 700;
        color: #01B750;
    }
}

/* Custom Flatpickr Calendar Styling */
.flatpickr-calendar {
    font-family: inherit;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.prevMonthDay.selected,
.flatpickr-day.nextMonthDay.selected {
    background: #065d35;
    border-color: #065d35;
}

.flatpickr-day.today {
    border-color: #065d35;
}

.flatpickr-day.today:hover {
    background: #e6f4ea;
    color: #065d35;
}

.flatpickr-day:hover {
    background: #f3f4f6;
}

.flatpickr-months .flatpickr-month {
    color: #111827;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 600;
}
