/* assets/css/emi-calculation.css */

/* Main Section */
.emi-calculation-section {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  margin-top: 2rem;
  padding: 1rem;
  scroll-margin-top: 6rem;
}

@media (max-width: 768px) {
  .emi-calculation-section {
    margin-top: 2rem;
    padding-top: 0.5rem;
  }
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.line-text-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.line-text-container hr {
  flex: 1;
  border: none;
  border-top: 2px solid;
  opacity: 0.8;
}

.line-text-container h2 {
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 1.25rem;
  text-align: center;
}

/* EMI Header */
.emi-header {
  color: white;
  border-radius: 0.5rem 0.5rem 0 0;
  text-align: center;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  user-select: none;
}

.emi-header span {
  font-weight: 400;
  font-size: 1.125rem;
}

.emi-header i {
  width: 20px;
  height: 20px;
}

/* EMI Content Container */
.emi-content {
  overflow-x: auto;
  border-radius: 0 0 1rem 1rem;
}

/* EMI Cards Wrapper */
.emi-cards-wrapper {
  width: 100%;
  padding: 0 1rem 1.25rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
}

.emi-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* EMI Card */
.emi-card {
  background-color: white;
  flex: 1;
  border: 2px solid;
  padding: 1rem;
  min-width: 150px;
  border-radius: 0 0 1rem 1rem;
}

.emi-card.last-cards {
  border-radius: 0 0 1rem 1rem;
}

.emi-label {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.emi-value {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.emi-value:last-child {
  margin-bottom: 0;
}

.lock-icon {
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
}

.lock-icon:hover {
  opacity: 0.8;
}

/* EMI Form Section */
.emi-form-section {
  color: white;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  gap: 1rem;
  width: 100%;
}

.emi-form-section h3 {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  width: 100%;
}

.emi-form {
  display: flex;
  width: 100%;
  max-width: 28rem;
}

.form-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: flex;
  width: 100%;
  position: relative;
}

/* Country Select */
.country-select {
  appearance: none;
  border-radius: 0.5rem 0 0 0.5rem;
  font-weight: 600;
  border: 2px solid;
  font-size: 0.9375rem;
  outline: none;
  cursor: pointer;
  color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

/* Force white text and white arrow ONLY in Amenities brochure form */
.emi-calculation-section .country-select {
  color: white !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-color: transparent !important;
}

.emi-calculation-section .country-select option {
  color: #1a1a1a; /* Dark text when dropdown opens */
  background: white;
}

/* Phone Input */
.input-container {
  position: relative;
  flex-grow: 1;
}

.phone-input {
  appearance: none;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  color: white;
  border-top: 2px solid;
  border-right: 2px solid;
  border-bottom: 2px solid;
  border-left: none;
  border-radius: 0 0.5rem 0.5rem 0;
  outline: none;
  background-color: transparent;
}

.phone-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Remove number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="tel"]::-webkit-inner-spin-button,
input[type="tel"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"],
input[type="tel"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Submit Buttons */
.submit-btn {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s;
  border: none;
  white-space: nowrap;
}

.submit-btn:hover {
  opacity: 0.9;
}

.submit-btn i {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.desktop-btn {
  display: none;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.mobile-btn {
  margin-top: 0.75rem;
  justify-content: center;
  width: 100%;
}

/* Responsive Styles */
@media (min-width: 640px) {
  .emi-label {
    font-size: 1.125rem;
  }

  .emi-value {
    font-size: 1.125rem;
  }

  .emi-form-section h3 {
    font-size: 1.25rem;
  }

  .country-select,
  .phone-input {
    padding: 0.75rem;
  }

  .submit-btn {
    padding: 0.875rem 1.25rem;
  }
}

@media (min-width: 768px) {
  .emi-cards-grid {
    flex-wrap: nowrap;
  }

  .emi-card {
    border-top: 0;
  }

  .emi-card.last-cards {
    border-radius: 0 0 1rem 1rem;
  }

  .phone-input {
    padding-right: 8rem;
  }

  .desktop-btn {
    display: flex;
  }

  .mobile-btn {
    display: none;
  }

  .emi-form-section {
    flex-direction: row;
    padding: 1rem 1rem;
    gap: 0;
  }

  .emi-form-section h3 {
    text-align: left;
    width: auto;
  }
}

@media (min-width: 1024px) {
  .emi-form-section h3 {
    font-size: 1.25rem;
  }
}
