/* Expert Registration Modal - aligned with access-request-modal styling */

.expert-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.expert-modal-overlay.active {
  display: flex;
}

.expert-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 760px;
  margin: 30px auto;
  position: relative;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  overflow: hidden;
}

.expert-modal-close {
  position: absolute;
  top: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e9eef1;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  color: #6c757d;
  font-size: 1rem;
  transition: all 0.2s;
}
html[dir="rtl"] .expert-modal-close { left: 14px; }
html[dir="ltr"] .expert-modal-close { right: 14px; }
.expert-modal-close:hover { color: #2c3e50; background: #fff; transform: scale(1.05); }

.expert-modal-header {
  background: linear-gradient(135deg, #3e7690 0%, #6dcce1 100%);
  color: #fff;
  padding: 28px 30px 22px;
  text-align: center;
}
.expert-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.expert-modal-title { margin: 0 0 6px; font-size: 1.35rem; font-weight: 800; }
.expert-modal-subtitle { margin: 0; font-size: 0.92rem; opacity: 0.95; }

.expert-modal-body {
  padding: 24px 28px 26px;
  overflow-y: auto;
  flex: 1;
}

.expert-alert {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}
.expert-alert.visible { display: flex; }
.expert-alert.error { background: #fdecea; color: #b71c1c; border: 1px solid #f5c6cb; }
.expert-alert.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c3e6cb; }
.expert-alert.info { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }

.expert-section {
  margin-bottom: 22px;
}
.expert-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #3e7690;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e3f2fd;
  display: flex;
  align-items: center;
  gap: 8px;
}
.expert-section-title i { color: #6dcce1; }

.expert-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .expert-form-row { grid-template-columns: 1fr; }
}

.expert-form-group {
  margin-bottom: 12px;
}
.expert-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}
.expert-form-label .req { color: #e53935; }

.expert-form-input,
.expert-form-textarea,
.expert-form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d8e3e8;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.expert-form-textarea { resize: vertical; min-height: 70px; }
.expert-form-input:focus,
.expert-form-textarea:focus,
.expert-form-select:focus {
  outline: none;
  border-color: #6dcce1;
  box-shadow: 0 0 0 3px rgba(109, 204, 225, 0.15);
}
.readonly-field { background: #f5f7f8 !important; cursor: not-allowed; }
.expert-form-note { display: block; font-size: 11px; color: #6c757d; margin-top: 4px; }

/* File input */
.expert-file-input {
  width: 100%;
  padding: 8px;
  border: 1px dashed #6dcce1;
  border-radius: 8px;
  background: #f8fafb;
  font-size: 13px;
  cursor: pointer;
}
.expert-file-input::file-selector-button {
  background: #6dcce1;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-inline-end: 10px;
}
.expert-file-hint {
  font-size: 11px;
  color: #6c757d;
  margin-top: 4px;
}

.expert-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}
.expert-btn-cancel,
.expert-btn-submit {
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.expert-btn-cancel {
  background: #fff;
  color: #6c757d;
  border: 1px solid #d8e3e8;
}
.expert-btn-cancel:hover { background: #f5f7f8; color: #2c3e50; }
.expert-btn-submit {
  background: linear-gradient(135deg, #6dcce1, #3e7690);
  color: #fff;
}
.expert-btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(62, 118, 144, 0.3);
}
.expert-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success view */
.expert-view { display: none; }
.expert-view.active { display: block; }
.expert-success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 18px;
}
.expert-success-title {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #2c3e50;
  margin-bottom: 8px;
}
.expert-success-message {
  text-align: center;
  color: #6c757d;
  margin-bottom: 22px;
  line-height: 1.6;
}
