/* Primary UI Wizard Styles — DRCV */

#application-form .form-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

#application-form .form-field-group.hidden {
  display: none !important;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) and (max-width: 767.98px) {
  .form-grid.sm-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .form-grid.md-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid.md-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .form-grid > .md\:col-span-2 {
    grid-column: span 2;
  }
}

.input-validation-error,
#application-form [data-combobox-proxy].input-validation-error,
#application-form [data-date-picker-input].input-validation-error,
.date-picker-input.input-validation-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.input-validation-valid {
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}

#application-form span[data-valmsg-for],
#application-form .field-validation-error,
#application-form .field-error-message {
  display: none;
  margin: 0;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.25rem;
  color: #f43f5e;
}

#application-form span[data-valmsg-for]:not(:empty),
#application-form .field-validation-error:not(:empty),
#application-form .field-error-message:not(:empty) {
  display: block;
  margin-top: 0.125rem;
}

.step-panel {
  display: block;
}

.step-panel.hidden {
  display: none !important;
}

.step-panel:not(.hidden) {
  animation: wizardPanelIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.step-panel:not(.hidden)[data-direction="backward"] {
  animation: wizardPanelInReverse 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes wizardPanelIn {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes wizardPanelInReverse {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-stepper-track {
  min-width: 0;
  width: 100%;
  justify-content: space-between;
  gap: 0.25rem;
}

@media (max-width: 639px) {
  .wizard-step-btn .step-label {
    display: none;
  }

  .wizard-step-btn[data-state="active"] .step-label {
    display: block;
    max-width: 4.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .step-connector {
    min-width: 8px !important;
    flex: 1 1 0;
  }
}

@media (min-width: 640px) and (max-width: 767.98px) {
  .wizard-step-btn .step-label {
    font-size: 10px;
  }
}

.wizard-step-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0.375rem 0.5rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.wizard-step-btn[data-state="active"] .wizard-step-circle {
  background-color: #0e7490;
  border-color: #0e7490;
  color: #fff;
  outline: 3px solid rgba(14, 116, 144, 0.22);
  outline-offset: 1px;
}

.wizard-step-btn[data-state="active"] .step-label {
  color: #0e7490;
  font-weight: 700;
}

.wizard-step-btn[data-state="done"] .wizard-step-circle {
  background-color: #10b981;
  border-color: #10b981;
  color: #fff;
}

.wizard-step-btn[data-state="done"] .step-label {
  color: #059669;
  font-weight: 600;
}

.wizard-step-btn[data-state="done"] .step-num {
  display: none;
}

.wizard-step-btn[data-state="done"] .step-check {
  display: inline !important;
}

.wizard-step-btn[data-state="idle"] .wizard-step-circle {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
}

.wizard-step-btn[data-state="idle"] .step-label {
  color: #94a3b8;
}

.step-connector[data-done="true"] {
  background-color: #10b981 !important;
}

.wizard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 180px;
  min-height: 44px;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

@media (max-width: 639px) {
  .wizard-btn {
    min-width: 0;
    width: 100%;
    padding: 12px 16px;
    white-space: normal;
  }

  .wizard-btn--submit {
    min-width: 0;
  }

  .wizard-nav-split {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.75rem;
  }

  .wizard-nav-left,
  .wizard-nav-right {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .wizard-nav-right {
    margin-left: 0;
  }

  .wizard-nav-left .wizard-btn,
  .wizard-nav-right .wizard-btn {
    width: 100%;
  }
}

.wizard-btn:active {
  transform: scale(0.98);
}

.wizard-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.wizard-btn--primary {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, #0891b2 0%, #14b8a6 100%);
  box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
}

.wizard-btn--primary:hover {
  background: linear-gradient(135deg, #0e7490 0%, #0d9488 100%);
  box-shadow: 0 6px 22px rgba(8, 145, 178, 0.4);
}

.wizard-btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.35), 0 4px 16px rgba(8, 145, 178, 0.3);
}

.wizard-btn--secondary {
  background: transparent;
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.wizard-btn--secondary:hover {
  background: rgba(248, 250, 252, 0.5);
  border-color: rgba(100, 116, 139, 0.55);
  color: #334155;
}

.wizard-btn--secondary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.3);
}

.wizard-btn--submit {
  min-width: 220px;
}

.app-header {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 42%, #0f766e 100%);
  box-shadow: 0 4px 24px rgba(12, 74, 110, 0.28);
}

.app-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
  .app-header-inner {
    padding: 1rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .app-header-inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  min-width: 0;
}

@media (min-width: 640px) {
  .app-header-brand {
    gap: 1rem;
    justify-content: flex-start;
  }
}

.app-header-logo {
  height: 3.5rem;
  width: 3.5rem;
  flex-shrink: 0;
  object-fit: contain;
}

@media (min-width: 640px) {
  .app-header-logo {
    height: 4rem;
    width: 4rem;
  }
}

.app-header-divider {
  width: 1px;
  height: 3.5rem;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .app-header-divider {
    height: 4rem;
  }
}

@media (max-width: 639px) {
  .app-header-divider {
    display: none;
  }
}

.app-header-copy {
  min-width: 0;
}

.app-header-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .app-header-heading {
    font-size: 1.3125rem;
  }
}

.app-header-subtitle {
  font-size: 0.75rem;
  color: rgba(207, 250, 254, 0.92);
  margin-top: 0.125rem;
}

.position-badge {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
}

.position-badge-label {
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.2;
}

.position-badge-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #a5f3fc;
  line-height: 1.3;
}

.position-badge-status {
  font-size: 0.6875rem;
  color: #6ee7b7;
  line-height: 1.2;
}

.wizard-nav-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wizard-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.delete-confirm-popover {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 30;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.13);
  min-width: 0;
  width: auto;
  max-width: calc(100% - 16px);
}

@media (min-width: 480px) {
  .delete-confirm-popover {
    left: auto;
    right: 8px;
    min-width: 210px;
    max-width: none;
  }
}

[data-repeater-delete] {
  min-height: 44px;
  min-width: 44px;
  height: auto;
  padding: 0.5rem 0.75rem;
}

.modal-overlay:not(.hidden) {
  display: block;
}

.modal-overlay.hidden {
  display: none !important;
}

#cv-scan-overlay:not(.hidden) {
  display: flex;
}

#cv-scan-overlay.hidden {
  display: none !important;
}

/* Success / Error page animations */
.animate-check {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmark 0.8s ease-in-out forwards;
}

@keyframes checkmark {
  to { stroke-dashoffset: 0; }
}

.animate-circle {
  animation: circle 0.6s ease-out forwards;
}

@keyframes circle {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(20px); }
}

.animate-shake {
  animation: shake 0.6s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }
.delay-800 { animation-delay: 0.8s; }

.shadow-premium {
  box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.15);
}

.wizard-btn--primary:disabled,
.wizard-btn--submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wizard-btn--primary:disabled:hover,
.wizard-btn--submit:disabled:hover {
  background: linear-gradient(135deg, #0891b2 0%, #14b8a6 100%);
  box-shadow: none;
}

.recaptcha-shield {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(to right, #f8fafc, #f1f5f9);
}

.recaptcha-shield svg {
  flex-shrink: 0;
}

/* Date Picker — kurumsal form tasarım dili */
.date-picker-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background-color: #ffffff;
  color: #334155;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.date-picker-input::placeholder {
  color: #94a3b8;
}

.date-picker-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.date-picker-input--disabled,
.date-picker-input:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
}

.date-picker-icon-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.date-picker-icon-btn:hover:not(:disabled) {
  color: #0891b2;
  background-color: #ecfeff;
}

.date-picker-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.date-picker-icon-btn svg {
  width: 20px;
  height: 20px;
}

.date-picker-popup {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  z-index: 60;
  /* Dar kolonlarda (ör. Terhis/Tecil) input genişliği takvim başlığına yetmiyor. */
  width: max(100%, 20.5rem);
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
  padding: 16px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 479px) {
  .date-picker-popup {
    padding: 10px;
  }

  .date-picker-day {
    height: 40px;
  }

  .date-picker-header {
    gap: 6px;
  }

  .date-picker-year-select {
    width: 88px;
  }
}

.date-picker-popup.hidden {
  display: none !important;
}

/* Sağ kolondaki alanlarda popup kart dışına taşmasın diye sola doğru açılır. */
.date-picker-popup--end {
  left: auto;
  right: 0;
}

.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.date-picker-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #ffffff;
  color: #475569;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.date-picker-nav-btn:hover {
  background-color: #ecfeff;
  border-color: #a5f3fc;
}

.date-picker-selectors {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.date-picker-month-select,
.date-picker-year-select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: rgba(248, 250, 252, 0.5);
  color: #334155;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.date-picker-month-select {
  flex: 1;
  min-width: 6rem;
}

.date-picker-year-select {
  width: 96px;
  flex-shrink: 0;
}

.date-picker-month-select:focus,
.date-picker-year-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 4px;
}

.date-picker-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.date-picker-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.date-picker-day:hover:not(:disabled):not(.date-picker-day--blank) {
  background-color: #cffafe;
}

.date-picker-day--selected {
  background-color: #ecfeff;
  color: #0e7490;
  font-weight: 600;
}

.date-picker-day--today:not(.date-picker-day--selected) {
  box-shadow: 0 0 0 1px #22d3ee;
  font-weight: 500;
}

.date-picker-day--disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.date-picker-day--disabled:hover {
  background-color: transparent;
}

.date-picker-day--blank {
  visibility: hidden;
  pointer-events: none;
}

/* Yasal metin (Markdown) — modal gövdesi */
.policy-content {
  line-height: 1.65;
  color: #334155;
}

.policy-content > *:first-child {
  margin-top: 0;
}

.policy-content > *:last-child {
  margin-bottom: 0;
}

.policy-content h1,
.policy-content h2,
.policy-content h3,
.policy-content h4 {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.3;
  margin: 1.25em 0 0.5em;
}

.policy-content h1 {
  font-size: 1.25rem;
}

.policy-content h2 {
  font-size: 1.125rem;
}

.policy-content h3 {
  font-size: 1rem;
}

.policy-content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.policy-content p {
  margin: 0 0 0.85em;
}

.policy-content ul,
.policy-content ol {
  margin: 0 0 0.85em;
  padding-left: 1.35rem;
}

.policy-content ul {
  list-style: disc;
}

.policy-content ol {
  list-style: decimal;
}

.policy-content li {
  margin: 0.25em 0;
}

.policy-content li > p {
  margin: 0;
}

.policy-content strong {
  font-weight: 700;
  color: #0f172a;
}

.policy-content em {
  font-style: italic;
}

.policy-content a {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.policy-content a:hover {
  color: #0e7490;
}

.policy-content hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 1.25em 0;
}

.policy-content blockquote {
  margin: 0 0 0.85em;
  padding: 0.5em 0 0.5em 1em;
  border-left: 3px solid #fda4af;
  color: #475569;
  background: #fff1f2;
  border-radius: 0 0.5rem 0.5rem 0;
}

