/*========================================================================================
 * ALL-IN-ONE AUTHENTICATION FORM STYLESHEET
 *========================================================================================*/

/*----------------------------------------------------------------------------------------
 * GLOBAL & CONTAINER STYLES
 *----------------------------------------------------------------------------------------*/
body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-container {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    color: #333;
}

/*----------------------------------------------------------------------------------------
 * FORM STYLES
 *----------------------------------------------------------------------------------------*/
.auth-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1a1a1a;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.input-icon-group {
    position: relative;
    width: 100%;
}

/* Common input field styling */
.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Add padding to the left for the icon */
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Icon within input field */
.input-icon-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.input-icon-group:focus-within i {
    color: #007bff;
}

/* Password visibility toggle */
.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #333;
}

/* Phone input adjustments for intl-tel-input */
.phone-group .form-control {
    padding-left: 15px; /* No icon in this input */
}

/* Validation messages */
.valid-message, .error-message {
    font-size: 0.85rem;
    margin-top: 5px;
    text-align: left;
    display: block;
}

.valid-message {
    color: forestgreen;
}

.error-message {
    color: tomato;
}

.hide {
    display: none;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.terms-text a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.terms-text a:hover {
    color: #0056b3;
}

/*----------------------------------------------------------------------------------------
 * BUTTON STYLES
 *----------------------------------------------------------------------------------------*/
.btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

.form-button {
    margin-top: 10px;
}

/*----------------------------------------------------------------------------------------
 * LINKS & SIGNUP/LOGIN TOGGLE
 *----------------------------------------------------------------------------------------*/
.auth-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-links a:hover {
    color: #0056b3;
}

.auth-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.auth-link a {
    background-color: #f0f2f5;
    color: #007bff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.auth-link a:hover {
    background-color: #e0e0e0;
}

.password-link {
    text-align: right;
    margin-top: 5px;
}

.password-link a {
    color: #007bff;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.password-link a:hover {
    color: #0056b3;
}

/*----------------------------------------------------------------------------------------
 * MESSAGE & MODAL STYLES
 *----------------------------------------------------------------------------------------*/
.success, .failure {
    padding: 15px 20px;
    margin: 20px 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.success {
    background-color: #e6f7e9;
    color: #38a169;
    border: 1px solid #c6f6d5;
    animation: fadeIn 0.5s ease-in-out;
}

.failure {
    background-color: #fff0f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.success i, .failure i {
    margin-right: 10px;
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Modal and Loader */
.bst-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none; /* Hide by default */
}

.bst-modal-content {
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/*----------------------------------------------------------------------------------------
 * KEYFRAME ANIMATIONS
 *----------------------------------------------------------------------------------------*/
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/*========================================================================================
 * MODAL AND LOADER STYLES
 *========================================================================================*/
/* The modal container, now centered and ready for jQuery show/hide */
.bst-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    height:100%;
    width:100%;
    
    /* Using Flexbox to center the content within the modal */
    display: flex;
    justify-content: center;
    align-items: center;

    /* A simple semi-transparent background */
    background-color: rgba(255, 255, 255, 0.466);
    backdrop-filter: blur(15px);
    
    /* Initially hide the modal using 'display' */
    display: none;
}

.bst-modal-content {
  margin: auto;
  background-color:ghostwhite;
  position: relative;
  padding: 0;
  outline: 0;
  width: 600px
}

.close-icon {
  position: absolute !important;
  left: 95% !important;
}

@media (max-width:600px) {
  .bst-modal-content {
    margin: 0 10px;
    width: auto !important
  }

  .bst-modal {
    padding-top: 30px
  }

}

@media (max-width:768px) {
  .bst-modal-content {
    width: 500px
  }

  .bst-modal {
    padding-top: 50px
  }

}


@media (min-width:993px) {
  .bst-modal-content {
    width: 900px
  }
}

/* The loader itself */
.loader {
    border: 5px solid #f3f3f3; /* Light gray border */
    border-top: 5px solid #007bff; /* Blue top border for the spin effect */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/* Keyframe animation for the spinning loader */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}