/* ============================================================
   register.css — Registration Modal Styles
   ============================================================ */

/* Overlay */
.reg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 50, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.reg-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Modal Panel */
.reg-modal {
  background: white;
  border-radius: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.reg-overlay.open .reg-modal {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.reg-modal-header {
  padding: 32px 32px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.reg-modal-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.2;
}

.reg-modal-header p {
  font-size: 14px;
  color: #718096;
  margin: 6px 0 0;
}

.reg-close-btn {
  background: #f0f4ff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a5568;
  flex-shrink: 0;
  transition:
    background 0.2s,
    transform 0.2s;
  margin-left: 16px;
}

.reg-close-btn:hover {
  background: #e0e8ff;
  transform: rotate(90deg);
}

/* Form */
.reg-form {
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tour Selection */
.reg-tour-select-wrap {
  position: relative;
}

.reg-tour-select-wrap select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8eef8;
  border-radius: 14px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a2e;
  background: #f8faff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a73e8' d='M6 8L0 0h12z'/%3E%3C/svg%3E")
    no-repeat right 16px center;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.reg-tour-select-wrap select:focus {
  outline: none;
  border-color: #1a73e8;
  background-color: white;
}

/* Slot indicator bar */
.slot-bar-wrap {
  display: none;
  padding: 12px 16px;
  background: #f0f4ff;
  border-radius: 12px;
  gap: 10px;
  align-items: center;
}

.slot-bar-wrap.visible {
  display: flex;
}

.slot-bar {
  flex: 1;
  height: 6px;
  background: #c8d8f8;
  border-radius: 999px;
  overflow: hidden;
}

.slot-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a73e8, #7b2ff7);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.slot-bar-fill.almost-full {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.slot-text {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
}

/* Input fields */
.reg-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reg-field label {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  letter-spacing: 0.5px;
}

.reg-field label .required {
  color: #ef4444;
  margin-left: 2px;
}

.reg-field input,
.reg-field select {
  padding: 12px 14px;
  border: 2px solid #e8eef8;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a2e;
  background: #f8faff;
  transition:
    border-color 0.2s,
    background 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.reg-field input:focus,
.reg-field select:focus {
  outline: none;
  border-color: #1a73e8;
  background: white;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.reg-field input.error,
.reg-field select.error {
  border-color: #ef4444;
}

/* Error / Status Messages */
.reg-error-msg {
  display: none;
  background: #fff0f0;
  border: 1px solid #ffcdd2;
  color: #c62828;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.reg-error-msg.visible {
  display: block;
}

/* Submit Button */
.reg-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reg-submit-btn:hover {
  opacity: 0.92;
}
.reg-submit-btn:active {
  transform: scale(0.99);
}
.reg-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner */
.reg-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.reg-submit-btn.loading .reg-spinner {
  display: block;
}
.reg-submit-btn.loading .reg-btn-text {
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Terms note */
.reg-terms {
  font-size: 11px;
  color: #a0aec0;
  text-align: center;
  line-height: 1.5;
}

/* ============================================================
   Success Card (shown after registration)
   ============================================================ */

.reg-success-wrap {
  padding: 36px 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.reg-success-icon {
  font-size: 64px;
  line-height: 1;
  animation: popIn 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

@keyframes popIn {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.reg-success-title {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0;
}

.reg-success-sub {
  font-size: 14px;
  color: #718096;
  line-height: 1.6;
  max-width: 360px;
  margin: 0;
}

.reg-success-ticket-id {
  font-family: "Space Grotesk", monospace;
  font-size: 16px;
  font-weight: 700;
  color: #1a73e8;
  background: #f0f4ff;
  padding: 10px 20px;
  border-radius: 12px;
  letter-spacing: 1px;
  margin: 4px 0;
}

.reg-success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

.reg-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition:
    opacity 0.15s,
    transform 0.1s;
  cursor: pointer;
  border: none;
}
.reg-action-btn:active {
  transform: scale(0.99);
}

.reg-action-primary {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: white;
}
.reg-action-primary:hover {
  opacity: 0.9;
}

.reg-action-outline {
  background: #f0f4ff;
  color: #1a73e8;
  border: 1.5px solid #c8d8f8;
}
.reg-action-outline:hover {
  background: #e0ecff;
}

.reg-close-success {
  margin-top: 8px;
  background: none;
  border: none;
  font-size: 13px;
  color: #a0aec0;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s;
}
.reg-close-success:hover {
  color: #4a5568;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 500px) {
  .reg-modal-header,
  .reg-form {
    padding-left: 20px;
    padding-right: 20px;
  }
  .reg-input-row {
    grid-template-columns: 1fr;
  }
}
