/* rental-login.css */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500&display=swap");

/* Modal Backdrop - Handled by Bootstrap .modal-backdrop now */
/* .rental-login-backdrop styles removed to avoid conflict with Bootstrap */

/* Rectangle 13 - Main Modal Container */
.rental-login-modal {
  width: 100%;
  min-height: 500px;
  background: #ffffff;
  border-radius: 30px; /* Updated from Figma */
  padding: 65px 60px 20px 60px; /* Reduced bottom padding for sticky footer */
  border: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  position: relative; /* Ensure relative for absolute children if needed */
}

/* Desktop sizing */
@media (min-width: 577px) {
  .rental-modal-dialog {
    max-width: 500px; /* Width: 500px from Figma */
    margin: 1.75rem auto;
  }
}

/* Close Icon */
.rental-login-close {
  position: absolute;
  width: 14px;
  height: 14px;
  /* Top/Left from Figma relative to global frame were 713, 165. 
     Inside 500x500 box centered, this is roughly top-right. 
     We keep responsive positioning. */
  top: 25px;
  right: 25px;
  cursor: pointer;
  font-size: 24px;
  line-height: 14px;
  color: #303030; /* Figma says #303030 for lines */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

@media (max-width: 768px) {
  /* Enforce full screen if bootstrap class misses anything */
  #rental-login-backdrop .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    height: 100% !important;
    transform: none !important; /* Prevent transform offsets */
  }

  .rental-login-modal {
    min-height: 100vh !important;
    height: 100% !important;
    border-radius: 0 !important; /* Remove corners */
    box-shadow: none !important;
    padding: 20px;
    border: none !important;
  }

  /* Reposition Close Button to Top Left and make it an Arrow */
  .rental-login-close {
    top: 20px;
    left: 20px;
    right: auto;
    width: 30px;
    height: 30px;
    font-size: 0; /* Hide the &times; text */
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  /* Ensure arrow is visible */
  .rental-login-close::before {
    content: "←"; /* Unicode Left Arrow */
    font-size: 32px;
    color: #000;
    display: block;
    line-height: 1;
    font-weight: 300;
  }

  /* Typography Adjustments */
  .rental-login-title {
    text-align: left;
    margin-top: 60px; /* Push down below the arrow */
    font-size: 32px;
    line-height: 1.2;
  }

  .rental-login-subtitle {
    text-align: left;
    font-size: 16px;
    margin-bottom: 30px;
  }

  .phone-input-wrapper {
    height: 55px;
  }

  .gender-toggle-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Main Step Container */
.step-content {
  display: none; /* Hidden by default */
  width: 100%;
  /* No fixed height, let content drive it or modal container constrain it */
}

.step-content.active {
  display: block; /* Visible when active */
  animation: fadeIn 0.3s ease-in-out;
  margin-top: 65px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Optional: Centering logic if needed, but flex in parent or margins work better */
/* If the design requires specific vertical centering within the modal for shorter steps */

/* Typography & Elements */

.rental-login-title {
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 28px;
  line-height: 36px;
  color: #000000;
  margin-bottom: 5px;
  text-align: left;
}

.rental-login-title span {
  color: #00a5f1;
  font-weight: 600;
}

.rental-login-subtitle {
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  color: #95a1a7;
  text-align: left;
  margin-bottom: 25px;
}

/* Input Group */
.rental-input-container {
  margin-bottom: 20px;
}

/* Phone Input Styling matching design */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%; /* Max width controlled by parent or max-width */
  max-width: 335px; /* From Figma Group 26 width */
  height: 50px;
  background: #ffffff;
  border: 1px solid #e7edf0;
  border-radius: 10px;
  padding: 0 15px; /* Inside padding */
  /* margin: 0 auto; Center it */
  position: relative;
}

.phone-flag {
  /* Rectangle 7 & 8 logic - keeping simple image */
  margin-right: 10px;
  display: flex;
  align-items: center;
  /* +91 9920742313 style */
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  color: #303030;
}
.phone-flag img {
  width: 31px; /* Rectangle 7 width */
  height: 26px;
  border-radius: 5px;
  margin-right: 10px;
  object-fit: cover;
}

.rental-input-clean {
  border: none;
  outline: none;
  width: 100%;
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 21px;
  color: #303030;
  background: transparent;
}

/* Buttons */
.rental-action-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(180deg, #21b9ff 0%, #00a5f1 100%);
  border-radius: 200px;
  border: none;

  /* Text Style */
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 21px;
  text-align: center;
  color: #ffffff;

  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
}

.rental-action-btn:hover {
  background-color: #00a5f1;
}

/* OTP Digits */
.otp-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 335px;
  margin: 0 auto 25px auto;
}

.otp-box {
  width: 76px;
  height: 50px;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  text-align: center;
  font-size: 20px;
  font-family: "DM Sans", sans-serif;
  outline: none;
}
.otp-box:focus {
  border-color: #00a5f1;
}

.resend-otp-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.resend-text {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: #000000;
}

.resend-otp-link {
  display: inline-block;
  font-size: 14px;
  color: #ffffff;
  background: #00a5f1;
  padding: 6px 15px;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.resend-otp-link:hover {
  opacity: 0.9;
}

/* Registration Form Specifics */
.rental-login-modal.register-mode {
  min-height: 624px; /* From Figma Group 54 */
  display: flex;
  flex-direction: column;
}

.step-content-register.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.reg-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
  margin-bottom: 10px;
}

.reg-footer {
  position: sticky;
  bottom: 0px;
  background: #ffffff;
  padding: 15px 0 10px 0;
  z-index: 10;
  border-top: 1px solid #f0f0f0;
}

/* Custom Dropdown Arrow */
.rental-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23303030' 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");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px !important;
}

/* Height Input Group */
.height-input-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  height: 50px;
  border: 1px solid #e7edf0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.height-val-clean {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 15px;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  color: #303030;
  background: transparent;
  width: 100%;
}

.height-divider {
  width: 1px;
  height: 30px;
  background-color: #e7edf0;
  flex-shrink: 0;
}

.unit-select-clean {
  width: 80px;
  border: none;
  outline: none;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  color: #303030;
  background: transparent;
  cursor: pointer;
}

/* Floating Label Form Group */
.rental-form-group {
  position: relative;
  margin-bottom: 20px;
}

.rental-form-control {
  width: 100%;
  height: 50px;
  border: 1px solid #e7edf0;
  border-radius: 10px;
  padding: 0 15px;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  color: #303030;
  outline: none;
  background: #ffffff;
  appearance: none; /* Remove default browser styling for consistency */
}

.rental-form-control:focus {
  border-color: #00a5f1;
}

.rental-form-label {
  position: absolute;
  top: -9px;
  left: 15px;
  background: #ffffff;
  padding: 0 5px;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: #95a1a7;
  z-index: 5;
  line-height: 1;
}

/* Specific for Readonly Phone */
#reg-phone-display {
  background: #eef5f8;
  color: rgba(48, 48, 48, 0.4);
}

.reg-row {
  display: flex;
  gap: 15px;
}
.reg-col {
  flex: 1;
}

/* Gender Toggle */
.gender-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: 10px;
}

.gender-label-text {
  font-size: 16px;
  color: #303030;
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
}

.gender-selector {
  display: flex;
  align-items: center;
  background: transparent;
}

.gender-btn {
  border: 1px solid #e7edf0;
  background: #ffffff;
  color: #303030;
  padding: 8px 24px;
  font-size: 14px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  border-radius: 0;
}

/* Joined Pills Style */
.gender-btn:first-child {
  border-radius: 6px 0 0 6px;
  border-right: none;
}
.gender-btn:last-child {
  border-radius: 0 6px 6px 0;
  border-left: 1px solid #e7edf0; /* Add border back if needed, but overlap logic is safer */
}
/* Fix double border issue by making the second one overlap or handle border-left differently */
.gender-btn + .gender-btn {
  border-left: none;
}

.gender-btn.selected {
  background: #303030;
  color: #ffffff;
  border-color: #303030;
}

/* Status Messages */
.error-msg {
  color: red !important;
  font-size: 14px;
  /* margin-top: 10px; */
  font-weight: 500;
}

.success-msg {
  color: green !important;
  font-size: 14px;
  margin-top: 10px;
  font-weight: 500;
}
