/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}

#login_main {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    /* background: linear-gradient(cyan 1%, transparent 5% 95%,cyan 99%); */
    background: linear-gradient(135deg, hsl(218, 100%, 85%) 0%, white 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    overflow-x: hidden;
}

.logo-container {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #5b7cff;
    font-size: 28px;
    font-weight: 600;
    text-decoration: none;
}

/* .logo-icon {
    width: auto;
    height: auto;
    max-width: 100%;
    padding: 1rem;
    
    background: url('http://127.0.0.1:8000/static/Images/LAWSaathi_Black.png') no-repeat center center;
    background-size: contain;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    position: relative;
    overflow: hidden;
} */



.logo-icon {
    width: 15rem;   /* Or your desired size */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.logo-icon img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* .logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 4px;
    clip-path: polygon(0% 0%, 70% 0%, 100% 30%, 100% 100%, 30% 100%, 0% 70%);
} */

.login-container {
    /* background: rgba(40, 40, 40, 0.95); */
    background: whitesmoke;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease-out;
}

.region-notice {
    color: #a1a1aa;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 30px;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #71717a;
    font-size: 16px;
    z-index: 2;
}

input[type="number"]{
    width: 100%;
    /* padding: 16px 16px 16px 48px; */
    padding: 16px;
    /* background: rgba(60, 60, 60, 0.8); */
    background: #dadada;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    /* color: #ffffff; */
    color: black;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-align: center;
}

input[type="number"]:focus {
    border-color: #5b7cff;
    /* background: rgba(70, 70, 70, 0.9); */
    background: hsl(0, 0%, 80%);
    box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.1);
    transform: translateY(-1px);
}

input::placeholder {
    color: #71717a;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #71717a;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #a1a1aa;
}

.terms-text {
    font-size: 13px;
    color: #71717a;
    line-height: 1.5;
    margin-bottom: 30px;
    text-align: center;
}

.terms-text a {
    color: #5b7cff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.terms-text a:hover {
    color: #7c9aff;
}

.login-button {
    width: 100%;
    background: linear-gradient(135deg, #5b7cff, #4c6bff);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    background: linear-gradient(135deg, #4c6bff, #3d5cff);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 124, 255, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-button:hover::before {
    left: 100%;
}

.forgot-signup {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 30px 0;
}

.forgot-signup a {
    color: #5b7cff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.forgot-signup a:hover {
    color: #7c9aff;
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: #71717a;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 20px;
}

.google-button {
    width: 100%;
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.google-button:hover {
    background: rgba(70, 70, 70, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.google-icon {
    width: 20px;
    height: 20px;
    background: url('/static/Images/Google_Icon.png') no-repeat center;
    background-size: contain;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 25px;
        border-radius: 12px;
    }

    .logo {
        font-size: 24px;
    }

    .logo-icon {
        width: 100%;
        height: 100%;
    }


    input[type="number"]{
        padding: 14px;
        font-size: 14px; /* Prevents zoom on iOS */
    }

    .otp-input{
        padding: 0 !important;
    }

    .login-button,
    .google-button {
        padding: 14px;
    }

    .forgot-signup {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 320px) {
    .login-container {
        padding: 25px 20px;
    }

    .region-notice {
        font-size: 13px;
    }
}

/* Focus indicators for accessibility */
.login-button:focus,
.google-button:focus {
    outline: 2px solid #5b7cff;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ------------------------------------------------------------------------------------- */
/* OTP Overlay */
/* ------------------------------------------------------------------------------------- */

/* Pop-Up */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0%;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 22;
    backdrop-filter: blur(4px);
    font-family: sans-serif;
  }
  
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 400px;
  text-align: center;
  z-index: 8;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.modal-logo {
  width: 80%;
  height: 98px;
  margin-bottom: 1.0rem;
}

h1 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 0.5rem;
}

p {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

#error_msg{
  color: red;
}

.otp-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.otp-input {
  width: 40px;
  height: 40px;
  border: 2px solid #ddd;
  border-radius: 8px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

.otp-input:focus {
  border-color: #4f46e5;
  outline: none;
}

.verify-button {
  background-color: darkblue;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
}

.verify-button:hover {
  background-color: #4338ca;
}

#countdownText {
    margin: 1rem 0;
  }

/* 
.resend {
  margin-top: 1rem;
  color: darkblue;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
}

.resend:hover {
  text-decoration: underline;
}

.otp-timer-container {
  text-align: center;
  font-family: Arial, sans-serif;
  padding: 2rem;
  max-width: 300px;
  margin: auto;
}

#OTPtimer {
  font-weight: bold;
  color: #d9534f;
}*/

#resendBtn {
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #aaa;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: not-allowed;
  transition: background-color 0.3s ease;
}

#resendBtn.enabled {
  background-color: #28a745;
  cursor: pointer;
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.fade-out {
  animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
  from {
      opacity: 0;
  }

  to {
      opacity: 1;
  }
}

@keyframes fadeOut {
  from {
      opacity: 1;
  }

  to {
      opacity: 0;
  }
}

.signup-trigger {
  background-color: #4f46e5;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

@media(max-width: 435px){
  :root{
    font-size: 14px;
  }

  .modal{
    width: 75%;
  }

  .otp-input{
    width: 30px;
    height: 30px;
  }
}