/* ============================================
   REGISTER PAGE — register.css
   ============================================ */

/* --- Page Split Layout --- */
.register-page {
  display: flex;
  min-height: 100vh;
  direction: rtl;
}

/* --- LEFT SIDE: Form Area (55%) --- */
.register-form-side {
  width: 55%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: 100vh;
}

.register-form-container {
  max-width: 420px;
  width: 100%;
}

/* --- Title --- */
.register-title {
  font-size: 24px;
  font-weight: 800;
  color: #0F0F0F;
  margin-bottom: 24px;
}

/* --- Tab Switcher --- */
.register-tabs {
  display: flex;
  background: #F5F5F5;
  border-radius: 12px;
  padding: 4px;
  width: 100%;
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.register-tab {
  flex: 1;
  padding: 11px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #7D7FA5;
  border-radius: 10px;
  transition: all 200ms ease;
  white-space: nowrap;
}

.register-tab.active {
  background: #7145D6;
  color: #FFFFFF;
}

/* --- Form Groups --- */
.register-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #3D3D3D;
  margin-bottom: 6px;
}

/* --- Input Styling --- */
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid #DDDDE3;
  border-radius: 10px;
  padding: 12px 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  direction: rtl;
  text-align: right;
  color: #0F0F0F;
  background: #FFFFFF;
  width: 100%;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237D7FA5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  padding-left: 40px;
}

.form-group textarea {
  line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #ADADB8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #7145D6;
  box-shadow: 0 0 0 3px rgba(113, 69, 214, 0.12);
  outline: none;
  background-color: #FFFFFF !important;
}

/* Error state */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: #E74A41;
}

.form-group .error-message {
  font-size: 12px;
  color: #E74A41;
  margin-top: 4px;
  display: none;
}

.form-group.has-error .error-message {
  display: block;
}

/* --- Password Wrapper --- */
.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrapper input {
  padding-left: 48px;
}

.password-toggle {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Submit Button --- */
.register-submit-btn {
  width: 100%;
  background: #7145D6;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms ease;
  margin-top: 8px;
}

.register-submit-btn:hover {
  background: #5E38B5;
}

/* --- Login Link --- */
.register-login-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #7D7FA5;
}

.register-login-link a {
  color: #7145D6;
  font-weight: 600;
  margin-right: 4px;
}

.register-login-link a:hover {
  text-decoration: underline;
}

/* --- Error Banner (server-side) --- */
.register-error-banner {
  background: #FFF0F0;
  color: #E74A41;
  border: 1px solid #E74A41;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 16px;
  text-align: center;
}

/* ============================================
   RIGHT SIDE — Brand Panel (45%)
   ============================================ */
.register-brand-side {
  width: 45%;
  background: #7145D6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  min-height: 100vh;
  position: relative;
}

.register-brand-content {
  text-align: center;
}

.register-brand-logo {
  font-family: 'Cairo', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: #FFFFFF;
}

.register-brand-tagline {
  color: #FFFFFF;
  font-size: 18px;
  opacity: 0.85;
  margin-top: 16px;
  line-height: 1.6;
}

/* Trust Points */
.register-brand-trust {
  list-style: none;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.register-brand-trust li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #FFFFFF;
  font-size: 14px;
}

/* Copyright */
.register-brand-copyright {
  position: absolute;
  bottom: 32px;
  color: #FFFFFF;
  opacity: 0.5;
  font-size: 12px;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .register-page {
    flex-direction: column;
  }

  .register-brand-side {
    display: none;
  }

  .register-form-side {
    width: 100%;
    min-height: 100vh;
    padding: 32px 20px;
  }

  .register-tabs {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .register-tabs::-webkit-scrollbar {
    display: none;
  }

  .register-tab {
    min-width: 0;
    font-size: 13px;
    padding: 10px 8px;
  }
}
