/* ------------- Auth Modal ------------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-color: var(--trans-modal); */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
    z-index: 1000;
}

.modal-dialog {
    background-color: var(--white);
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* ------------- Auth Form ------------- */
.form-container {
    transition: opacity 0.3s;
}

.form-container.hidden {
    display: none;
}

.modal-title {
    color: var(--title-color);
    line-height: 1.4;
}

.auth-form {
    text-align: left;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.auth-form span {
    color: var(--red-color);
}

.input-field {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-white);
    background: var(--modal-input-bg);
}

.input-field:focus {
    border-color: var(--title-color-hvr);
    outline: none;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container .input-field {
    flex: 1;
    padding-right: 40px;
    /* Space for the toggle icon */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.submit-button {
    display: block;
    width: 100%;
    padding: 0.6rem;
    border-radius: 9px;
    border: none;
    font-weight: 600;
    color: var(--white);
    background: var(--submit-btn);
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover:not(.disabled) {
    background: var(--title-color);
}

.disabled {
    background: var(--submit-grey) !important;
    cursor: not-allowed;
}

.switch-text {
    font-size: 0.85rem;
    text-align: center;
}

.switch-text .link {
    color: var(--submit-btn);
    text-decoration: none;
}

.switch-text .link:hover {
    text-decoration: underline;
}

/****************** 0Auth signUp Modal ******************/
#socialSignupModal h2 {
    color: var(--content-grey);
    margin-bottom: 10px;
}

#socialSignupModal p {
    color: var(--content-grey);
    line-height: 1.2;
}

#socialSignupErrorMsg {
    color: red !important;
}

/* Gender Selection */
.gender-selection {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.gender-btn {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid var(--border-white);
    background: var(--modal-input-bg);
    color: var(--title-color);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    margin-right: 5px;
}

.gender-btn:last-child {
    margin-right: 0;
}

/* Active gender selection */
.gender-btn.active {
    background: var(--submit-btn);
    color: var(--white);
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari) */
.modal-dialog::-webkit-scrollbar,
.post-dialog::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for Firefox */
.modal-dialog,
.post-dialog {
    scrollbar-width: none;
}

/* Hide scrollbar for Edge & IE */
.modal-dialog,
.post-dialog {
    -ms-overflow-style: none;
}

/* Force autofill to have a suitable color style */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important; /* Bg. */
    -webkit-text-fill-color: #000 !important; /* Text */
}

/* For dark mode */
:root.dark-mode input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1f2a3a inset !important;
    -webkit-text-fill-color: #fff !important;
}
