/* ==============================================================================
   4Achievers - Student Fee Payment Portal Stylesheet
   ============================================================================== */

:root {
  --pf-primary: #059669;
  --pf-primary-dark: #047857;
  --pf-primary-light: #10b981;
  --pf-primary-soft: #ecfdf5;
  --pf-slate-900: #0f172a;
  --pf-slate-800: #1e293b;
  --pf-slate-600: #475569;
  --pf-slate-500: #64748b;
  --pf-slate-200: #e2e8f0;
  --pf-slate-100: #f1f5f9;
  --pf-slate-50: #f8fafc;
  --pf-border-color: #cbd5e1;
}

.fee-page-wrapper {
  background-color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero Header */
.fee-hero-section {
  background: linear-gradient(135deg, #064e3b 0%, #047857 55%, #059669 100%);
  color: #ffffff;
  padding: 48px 20px 42px;
  position: relative;
  overflow: hidden;
}

.fee-hero-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.22) 0%, rgba(5, 150, 105, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.fee-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

.fee-portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.fee-hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.fee-hero-desc {
  font-size: 16px;
  color: #e6fdf2;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Main Container Grid */
.fee-main-section {
  max-width: 1200px;
  margin: -24px auto 60px;
  padding: 0 20px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.fee-grid-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 960px) {
  .fee-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Left: Form Card */
.fee-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
}

.fee-card-header {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.fee-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fee-card-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
}

/* Form Groups */
.fee-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .fee-form-row {
    grid-template-columns: 1fr;
  }
}

.fee-form-group {
  margin-bottom: 20px;
}

.fee-form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 7px;
}

.fee-form-group label .req {
  color: #ef4444;
  margin-left: 2px;
}

.fee-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.fee-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fee-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.fee-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.fee-input::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

.fee-input-currency-prefix {
  position: absolute;
  left: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #047857;
  pointer-events: none;
}

.fee-input-amount {
  padding-left: 36px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #065f46 !important;
}

.fee-help-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Quick Amount Selector Chips */
.quick-amount-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  margin: 10px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.quick-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.quick-chip:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.quick-chip.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

/* Right Column: Order Summary Card */
.fee-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
  position: sticky;
  top: 90px;
}

.fee-summary-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fee-summary-badge {
  font-size: 11px;
  font-weight: 700;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.fee-summary-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.fee-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
}

.fee-summary-label {
  color: #64748b;
  font-weight: 500;
}

.fee-summary-val {
  color: #1e293b;
  font-weight: 600;
  text-align: right;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fee-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 12px;
  border-top: 2px solid #0f172a;
  margin-top: 8px;
}

.fee-total-label {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.fee-total-val {
  font-size: 26px;
  font-weight: 800;
  color: #059669;
}

.btn-pay-now {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.35);
  transition: all 0.25s ease;
  margin-top: 14px;
}

.btn-pay-now:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #064e3b 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.45);
}

.btn-pay-now:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Trust Badges in Summary */
.fee-trust-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.fee-trust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #475569;
  margin-bottom: 10px;
}

.fee-trust-row:last-child {
  margin-bottom: 0;
}

.fee-trust-icon {
  color: #059669;
  flex-shrink: 0;
}

.supported-gateways-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  opacity: 0.8;
  filter: grayscale(20%);
}

.gateway-text-pill {
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Success Modal */
.fee-success-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.fee-success-modal.active {
  opacity: 1;
  visibility: visible;
}

.fee-success-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fee-success-modal.active .fee-success-card {
  transform: scale(1);
}

.fee-success-icon-wrap {
  width: 72px;
  height: 72px;
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.12);
}

.fee-success-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}

.fee-success-msg {
  font-size: 14.5px;
  color: #64748b;
  margin: 0 0 24px;
  line-height: 1.5;
}

.fee-receipt-details-table {
  width: 100%;
  border-collapse: collapse;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
  font-size: 13.5px;
  text-align: left;
}

.fee-receipt-details-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.fee-receipt-details-table tr:last-child td {
  border-bottom: none;
}

.fee-receipt-details-table .receipt-lbl {
  color: #64748b;
  font-weight: 500;
  width: 40%;
}

.fee-receipt-details-table .receipt-val {
  color: #0f172a;
  font-weight: 600;
}

.fee-success-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-receipt-print {
  padding: 12px 18px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-receipt-print:hover {
  background: #e2e8f0;
}

.btn-success-close {
  padding: 12px 18px;
  background: #059669;
  border: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-success-close:hover {
  background: #047857;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  .fee-success-card, .fee-success-card * {
    visibility: visible;
  }
  .fee-success-modal {
    position: static;
    background: transparent;
    padding: 0;
  }
  .fee-success-actions {
    display: none;
  }
}
