/* Advance EMI Refund Module - front page styling */

:root {
  --aemr-green: #1f8a70;
  --aemr-teal: #0f9d58;
  --aemr-orange: #f7941d;
  --aemr-dark: #0f172a;
  --aemr-muted: #64748b;
  --aemr-border: #e2e8f0;
  --aemr-surface: #ffffff;
  --aemr-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --aemr-error: #ef4444;
}

.advance-emi-refund-page {
  background: #f8fafc;
  color: var(--aemr-dark);
  font-family: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  padding-bottom: 4rem;
}

.advance-emi-refund-page .container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.hero-section {
  position: relative;
  overflow: hidden;
  background: url("../images/Banner Section.jpg") center / cover no-repeat;
  padding: 40px 0 0;
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-copy {
  max-width: 540px;
  color: #ffffff;
}

.hero-copy h1 {
  font-weight: 700;
  margin-bottom: 4rem;
}

.hero-copy p {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.85;
}

.hero-visual {
  display: none;
}

.breadcrumb-section {
  background: #ffffff;
  border-bottom: 1px solid var(--aemr-border);
  padding: 0px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  font-size: 0.95rem;
  color: var(--aemr-muted);
}

.breadcrumb-nav a {
  color: var(--aemr-dark);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-nav a:hover {
  color: var(--aemr-orange);
}

.breadcrumb-separator {
  color: rgba(100, 116, 139, 0.6);
}

.advance-emi-refund-section .container {
  max-width: 1100px;
  margin-top: 50px;
}

.advance-emi-refund-card {
  margin-top: -2.8rem;
  background: var(--aemr-surface);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.advance-emi-refund-card__header {
  padding: 2rem 2.5rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.advance-emi-refund-card__header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--aemr-dark);
  text-align: center;
}

.advance-emi-refund-card__header p {
  margin: 0;
  color: var(--aemr-muted);
  font-size: 1.02rem;
}

.advance-emi-refund-card__body {
  padding: 2rem 2.5rem 2.5rem;
}

.form-grid {
  display: grid;
  gap: 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-field label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aemr-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.required {
  color: var(--aemr-error);
  font-size: 1rem;
  line-height: 1;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action.no-button {
  display: block;
}

.input-with-action.no-button .form-control {
  width: 100%;
}

.form-control {
  flex: 1;
  border: 1.5px solid var(--aemr-border);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #f8fafc;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--aemr-teal);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.15);
  outline: none;
  background: #ffffff;
}

.form-control[readonly] {
  background-color: #f5f5f5 !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.error-message {
  color: var(--aemr-error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
  font-weight: 500;
}

.error-message:not(:empty) {
  display: block;
}

.btn {
  border-radius: 14px;
  padding: 0.85rem 1.6rem;
  font-size: 0.98rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-orange {
  border-radius: 14px;
  background: #f7941d !important;
  color: #fff !important;
  box-shadow: 0 12px 25px rgba(255, 122, 24, 0.25) !important;
}

.btn-orange:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(255, 122, 24, 0.35);
}

.btn:disabled {
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.helper-text {
  font-size: 0.85rem;
  color: var(--aemr-muted);
  line-height: 1.4;
}

.form-actions {
  margin-top: 1.2rem;
  display: flex;
  justify-content: center;
}

.or-separator {
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 0.25rem 0;
}

.or-separator::before {
  /* content: ""; */
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-top: 1px solid var(--aemr-border);
}

.or-text {
  position: relative;
  display: inline-block;
  padding: 0.2rem 0.75rem;
  background: var(--aemr-surface);
  color: var(--aemr-muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.alert-container {
  margin-top: 2rem;
}

.alert-container-general {
  margin-top: 1.5rem;
}

.alert {
  border-radius: 16px;
  border: none;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease;
}

.alert-success {
  background: rgba(15, 157, 88, 0.12);
  color: var(--aemr-teal);
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-weight: 500;
}

.alert-icon {
  font-weight: 700;
  font-size: 1.1rem;
}

.alert-message {
  flex: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Result styling */
#resultContainer {
  margin-top: 1rem;
}

.emi-refund-result {
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  animation: fadeIn 0.3s ease;
}

.emi-refund-eligible {
  background: rgba(15, 157, 88, 0.12);
  color: var(--aemr-teal);
  border: 1px solid rgba(15, 157, 88, 0.3);
}

.emi-refund-already {
  background: rgba(247, 148, 29, 0.12);
  color: #de7e0d;
  border: 1px solid rgba(247, 148, 29, 0.3);
}

.emi-refund-not-eligible {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.emi-refund-result p {
  margin: 0.5rem 0;
  font-weight: 500;
}

.emi-refund-result p:first-child {
  margin-top: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.emi-refund-result p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .hero-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .advance-emi-refund-card__body {
    padding: 2rem 2.4rem 2.6rem;
  }
}

@media (max-width: 768px) {
  .hero-overlay {
    padding: 2.2rem 0 3rem;
  }

  .hero-copy {
    text-align: center;
  }

  .advance-emi-refund-card {
    margin-top: -2.5rem;
  }

  .advance-emi-refund-card__header,
  .advance-emi-refund-card__body {
    padding: 2rem 1.6rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-copy h1 {
    font-size: 2.1rem;
  }

  .hero-copy p {
    font-size: 0.98rem;
  }

  .advance-emi-refund-section .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .advance-emi-refund-card__header h2 {
    font-size: 1.55rem;
  }

  .advance-emi-refund-card__header p {
    font-size: 0.95rem;
  }

  .advance-emi-refund-card__body {
    padding: 1.8rem;
  }

  .btn {
    width: 100%;
  }

  .form-actions {
    justify-content: stretch;
  }
}

/* Popup Styles */
#success-popup.popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.5) !important;
  z-index: 1000 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
}

#success-popup.popup-overlay.show {
  display: flex !important;
}

#success-popup .popup-content {
  background: white !important;
  border-radius: 8px !important;
  max-width: 500px !important;
  width: 90% !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  animation: popupSlideIn 0.3s ease-out !important;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#success-popup .popup-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 20px !important;
  border-bottom: 1px solid #e0e0e0 !important;
  background: #F78F35 !important;
  color: white !important;
  border-radius: 8px 8px 0 0 !important;
}

#success-popup.popup-overlay.error .popup-header {
  background: #dc2626 !important;
}

#success-popup .popup-header h3 {
  margin: 0 !important;
  font-size: 18px !important;
}

#success-popup .close-popup {
  background: none !important;
  border: none !important;
  color: white !important;
  font-size: 24px !important;
  cursor: pointer !important;
  padding: 0 !important;
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

#success-popup .close-popup:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
}

#success-popup .popup-body {
  padding: 20px !important;
}

#success-popup .popup-body p {
  margin: 0 !important;
  color: #333 !important;
  line-height: 1.5 !important;
  word-wrap: break-word !important;
}

.success-message {
  color: #333;
  font-size: 15px;
  line-height: 1.5;
}

.error-message {
  color: #dc2626;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
}