/**
 * Coupon step styled to match Chargebee hosted checkout.
 */

.ride-coupon-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(2px);
}

.ride-coupon-modal-overlay .ride-coupon-modal-close {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 1000000;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-size: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.ride-coupon-modal-overlay .ride-coupon-modal-close:before {
  content: "✕";
  font-size: 14px;
  position: absolute;
  top: 7px;
  left: 9px;
}

.ride-coupon-modal {
  position: relative;
  width: 100%;
  max-width: 435px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cb-coupon-panel__brand {
  padding: 28px 24px 12px;
  text-align: center;
}

.cb-coupon-panel__brand-title {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3d979e;
}

.cb-coupon-panel__body {
  padding: 8px 24px 4px;
}

.cb-coupon-panel__price {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
  text-align: left;
}

.cb-coupon-panel__description {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
  text-align: left;
}

.cb-coupon-panel__coupon {
  margin-top: 18px;
}

.cb-coupon-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #1a73e8;
  text-decoration: none;
  cursor: pointer;
}

.cb-coupon-link:hover {
  text-decoration: underline;
}

.cb-coupon-link.is-hidden {
  display: none;
}

.cb-coupon-field-row {
  display: none;
  gap: 10px;
  align-items: stretch;
}

.cb-coupon-field-row.is-visible {
  display: flex;
}

.cb-coupon-field-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cb-coupon-field-row input:focus {
  outline: none;
  border-color: #3d979e;
  box-shadow: 0 0 0 3px rgba(61, 151, 158, 0.15);
}

.cb-coupon-apply-btn {
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cb-coupon-apply-btn:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.cb-coupon-apply-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cb-coupon-feedback {
  min-height: 22px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.cb-coupon-feedback.is-success {
  color: #166534;
  font-weight: 500;
}

.cb-coupon-feedback.is-error {
  color: #b91c1c;
}

.cb-coupon-feedback.is-loading {
  color: #6b7280;
}

.cb-coupon-panel__divider {
  margin: 18px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.cb-coupon-panel__total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cb-coupon-panel__total-label {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.cb-coupon-panel__total-amount {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  text-align: right;
}

.cb-coupon-panel__footer {
  padding: 20px 24px 28px;
}

.cb-coupon-continue-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  border: 1px solid #3d979e;
  border-radius: 10px;
  background: #3d979e;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cb-coupon-continue-btn:hover:not(:disabled) {
  background: #347e84;
  border-color: #347e84;
}

.cb-coupon-continue-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cb-coupon-continue-btn__arrow {
  font-size: 16px;
  line-height: 1;
}

body.ride-coupon-modal-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .ride-coupon-modal-overlay {
    padding: 16px;
    align-items: flex-start;
    padding-top: 72px;
  }

  .ride-coupon-modal-overlay .ride-coupon-modal-close {
    top: 20px;
    right: 20px;
  }

  .cb-coupon-field-row {
    flex-direction: column;
  }

  .cb-coupon-field-row.is-visible {
    display: flex;
  }

  .cb-coupon-apply-btn {
    width: 100%;
  }
}
