/*
  Registration Page Styles - V5 (Detailed Sidebar UI)
*/
:root {
  --color-primary: #4154f1;
  --color-secondary: #717ff5;
  --color-light: #f6f9ff;
  --color-dark: #012970;
  --color-success: #15be56;
  --color-text: #344054;
  --color-gray: #667085;
  --color-border: #D0D5DD;
  --font-default: 'Vazirmatn', sans-serif;
}

body {
  font-family: var(--font-default);
  background-color: #F9FAFB;
  margin: 0;
  line-height: 1.5;
}

.register-page {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ===== Right Sidebar ===== */
.register-sidebar {
  width: 380px;
  background-color: #fff;
  border-left: 1px solid #eaecf0;
  display: flex;
  flex-direction: column;
  padding: 32px;
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
}
.sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.register-sidebar .logo {
  text-decoration: none;
  margin-bottom: 48px;
  display: inline-flex;
  align-items: center;
}
.register-sidebar .logo img { height: 40px; margin-left: 10px; }
.register-sidebar .logo span { font-size: 24px; font-weight: 700; color: var(--color-dark); }

.wizard-steps-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.wizard-step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
  position: relative;
  padding-right: 30px;
}
.wizard-step-item::before {
    content: '';
    position: absolute;
    right: 19px;
    top: 40px;
    bottom: -20px;
    width: 2px;
    background-color: #eaecf0;
    transition: background-color 0.3s;
}
.wizard-steps-list .wizard-step-item:last-child::before {
    display: none;
}
.wizard-step-item.active { opacity: 1; }
.wizard-step-item.current { transform: scale(1.02); }
.wizard-step-item.active::before { background-color: var(--color-primary); }
.wizard-step-item.current i {
    background-color: #fff;
    border-color: var(--color-primary);
}
.wizard-step-item i {
  font-size: 20px;
  color: var(--color-primary);
  background-color: var(--color-light);
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-light);
  transition: all 0.3s;
}
.wizard-step-item h5 { font-size: 16px; font-weight: 600; color: var(--color-text); margin: 0; }
.wizard-step-item p { font-size: 14px; color: var(--color-gray); margin: 4px 0 0 0; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid #eaecf0;
}
.sidebar-footer a { color: var(--color-gray); text-decoration: none; font-weight: 500; }
.sidebar-footer a i { margin-left: 8px; }

/* ===== Main Content Area ===== */
.register-main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  margin-right: 380px;
}
.register-form-container {
  width: 100%;
  max-width: 480px;
}

.register-step { display: none; }
.register-step.active { display: block; animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.step-header { text-align: right; margin-bottom: 32px; }
.step-header h3 { font-size: 30px; font-weight: 700; color: var(--color-dark); }
.step-header p { color: var(--color-gray); font-size: 16px; }

.progress-container { margin-top: 32px; }
.progress-bar-custom { width: 100%; height: 8px; background-color: #eaecf0; border-radius: 4px; overflow: hidden; }
.progress-bar-custom-fill { width: 0%; height: 100%; background-color: var(--color-primary); border-radius: 4px; transition: width 0.4s ease-in-out; }

/* Step 1: Plan Selection */
.plan-card { border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; transition: all 0.3s; cursor: pointer; }
.plan-card:hover { border-color: var(--color-secondary); }
.plan-card.selected { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(65, 84, 241, 0.1); }
.plan-card .form-check { display: flex; align-items: center; width: 100%; padding-left: 0; }
.plan-card .form-check-input { float: right; margin-left: 16px; width: 1.25em; height: 1.25em; }
.plan-card .form-check-label { width: 100%; text-align: right; cursor: pointer; }
.plan-title { font-size: 16px; font-weight: 600; color: var(--color-text); }
.plan-description { font-size: 14px; color: var(--color-gray); display: block; margin-top: 4px; }

/* Common Form Styles */
.form-group { margin-bottom: 20px; text-align: right;}
.form-label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 14px; color: var(--color-text); }
.form-control, .form-select {
  height: 48px; font-size: 16px; border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); border-radius: 8px; width: 100%;
}
.form-control.is-invalid { border-color: #dc3545 !important; }
.form-control:focus, .form-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(65, 84, 241, 0.1); }
.btn-submit {
  width: 100%; padding: 12px; font-size: 16px; font-weight: 600;
  background: var(--color-primary); color: #fff; border: none;
  border-radius: 8px; transition: 0.3s;
}
.btn-submit:hover { background: var(--color-secondary); }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }
.message-box { margin-top: 15px; padding: 12px; border-radius: 8px; display: none; text-align: center; font-weight: 500; }
.message-box.error { background: #f8d7da; color: #721c24; display: block; }
.message-box.success { background: #d4edda; color: #155724; display: block; }
.message-box.loading { display: block; color: var(--color-gray); }

.verification-code-inputs { display: flex; justify-content: center; gap: 10px; direction: ltr; }
.verification-code-inputs input { width: 52px; height: 60px; font-size: 24px; text-align: center; }
.resend-container a { text-decoration: none; color: var(--color-primary); font-weight: 500; }
.resend-container a.disabled { color: #adb5bd; pointer-events: none; }
.resend-container .resend-timer { color: var(--color-gray); margin-right: 5px; }

/* Information Wizard */
.information-wizard .wizard-page { display: none; }
.information-wizard .wizard-page.active { display: block; animation: fadeIn 0.4s; }
.wizard-controls { display: flex; gap: 12px; }
.btn-wizard-prev, .btn-wizard-next { flex-grow: 1; padding: 10px 20px; font-weight: 600; border-radius: 8px; border: 1px solid var(--color-border); background: #fff; color: var(--color-text); }
.btn-submit, #btn-wizard-next { flex-grow: 1; } /* Allow next button to share space */
#btn-wizard-next { border: none; } /* Override default button style */

/* Confirmation Step */
.confirmation-summary { background: var(--color-light); border-radius: 8px; padding: 20px; border: 1px solid #eaecf0; }
.confirmation-summary h4 { font-size: 18px; color: var(--color-dark); margin-bottom: 15px; }
.confirmation-summary .summary-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e9ecef; }
.confirmation-summary .summary-item:last-child { border-bottom: none; }
.confirmation-summary .summary-label { color: var(--color-gray); }
.confirmation-summary .summary-value { font-weight: 500; color: var(--color-dark); }

/* Success Step */
.success-box { text-align: center; padding: 40px 0; }
.success-box i { font-size: 64px; color: var(--color-success); margin-bottom: 20px; }
.success-box h3 { color: var(--color-dark); }
.success-box p { color: var(--color-gray); margin-bottom: 25px; }
.success-box .api-key-box { background-color: var(--color-light); border: 1px solid #e0e7ff; border-radius: 8px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; margin: 20px 0; direction: ltr; }
.success-box #api-key-display { font-family: 'Courier New', Courier, monospace; font-size: 16px; font-weight: 600; color: var(--color-dark); word-break: break-all; }
.success-box #copy-api-key-btn { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--color-primary); }
.success-box .copy-success-msg { color: #155724; font-weight: 500; display: none; margin-top: -10px; margin-bottom: 15px; }

/* Responsive Adjustments */
@media (max-width: 991px) {
  .register-sidebar { display: none; }
  .register-main-content { margin-right: 0; padding: 20px; }
  .register-form-container { max-width: 100%; }
}

.form-control.ltr { text-align: left; direction: ltr; }