/* ===== Miltekon — Genel Modal Sistemi ===== */

/* Overlay */
.mk-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.mk-modal-overlay.is-visible {
  opacity: 1; visibility: visible;
}

/* Dialog kutusu */
.mk-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.04);
  width: 100%; max-width: 420px;
  transform: translateY(12px) scale(.97);
  transition: transform .25s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.mk-modal-overlay.is-visible .mk-modal {
  transform: translateY(0) scale(1);
}

/* İkon alanı */
.mk-modal__icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  margin: 1.75rem auto 0;
  font-size: 1.5rem;
}
.mk-modal__icon--success { background: #ecfdf5; color: #059669; }
.mk-modal__icon--danger  { background: #fef2f2; color: #dc2626; }
.mk-modal__icon--warning { background: #fffbeb; color: #d97706; }
.mk-modal__icon--info    { background: #eff6ff; color: #2563eb; }

/* İçerik */
.mk-modal__body {
  padding: 1.25rem 1.75rem 0;
  text-align: center;
}
.mk-modal__title {
  font-size: 1.1rem; font-weight: 650;
  color: #0f172a; margin: 0 0 .5rem;
}
.mk-modal__message {
  font-size: .9rem; line-height: 1.6;
  color: #475569; margin: 0;
  word-break: break-word;
}

/* Buton alanı */
.mk-modal__actions {
  display: flex; gap: .5rem;
  padding: 1.25rem 1.75rem 1.5rem;
  justify-content: center;
}
.mk-modal__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 100px; padding: .6rem 1.25rem;
  font-family: inherit; font-size: .875rem; font-weight: 600;
  border-radius: 10px; border: none; cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  line-height: 1.4;
}
.mk-modal__btn:active { transform: scale(.97); }
.mk-modal__btn--primary {
  background: #0d9488; color: #fff;
}
.mk-modal__btn--primary:hover { background: #0f766e; }
.mk-modal__btn--danger {
  background: #dc2626; color: #fff;
}
.mk-modal__btn--danger:hover { background: #b91c1c; }
.mk-modal__btn--ghost {
  background: #f1f5f9; color: #334155;
}
.mk-modal__btn--ghost:hover { background: #e2e8f0; }

/* Confirm modalde iki buton yan yana */
.mk-modal__actions--split {
  justify-content: stretch;
}
.mk-modal__actions--split .mk-modal__btn {
  flex: 1;
}

/* Mobil uyum */
@media (max-width: 480px) {
  .mk-modal { max-width: calc(100% - 2rem); border-radius: 14px; }
  .mk-modal__body { padding: 1rem 1.25rem 0; }
  .mk-modal__actions { padding: 1rem 1.25rem 1.25rem; }
  .mk-modal__icon { width: 48px; height: 48px; font-size: 1.3rem; }
}

/* ==========================================================================
   Bootstrap Modal — Miltekon Override
   ========================================================================== */

/* Backdrop */
.modal-backdrop.show { opacity: .4; }

/* Açılış animasyonu */
.modal.fade .modal-dialog {
  transition: transform .25s cubic-bezier(.22,1,.36,1), opacity .2s ease;
}

/* Content kart */
.modal .modal-content {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15,23,42,.14), 0 0 0 1px rgba(0,0,0,.03);
  overflow: hidden;
}

/* Header */
.modal .modal-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 20px;
}
.modal .modal-header .modal-title {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: -.01em;
}
.modal .modal-header .btn-close {
  opacity: .45;
  transition: opacity .15s;
}
.modal .modal-header .btn-close:hover { opacity: 1; }

/* Body */
.modal .modal-body {
  padding: 20px;
  font-size: .9rem;
  line-height: 1.6;
  color: #334155;
}

/* Footer */
.modal .modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 20px;
  gap: 8px;
}

/* --- Footer butonları --- */
.modal .modal-footer .btn {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 18px;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
  line-height: 1.4;
}
.modal .modal-footer .btn:active { transform: scale(.97); }

/* Primary → Teal */
.modal .modal-footer .btn-primary {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.modal .modal-footer .btn-primary:hover,
.modal .modal-footer .btn-primary:focus {
  background: #0f766e;
  border-color: #0f766e;
}

/* Secondary → Ghost */
.modal .modal-footer .btn-secondary {
  background: #f1f5f9;
  border-color: #f1f5f9;
  color: #334155;
}
.modal .modal-footer .btn-secondary:hover,
.modal .modal-footer .btn-secondary:focus {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: #0f172a;
}

/* Outline-secondary */
.modal .modal-footer .btn-outline-secondary {
  background: transparent;
  border-color: #e2e8f0;
  color: #64748b;
}
.modal .modal-footer .btn-outline-secondary:hover,
.modal .modal-footer .btn-outline-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

/* Danger */
.modal .modal-footer .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.modal .modal-footer .btn-danger:hover,
.modal .modal-footer .btn-danger:focus {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Success → Teal */
.modal .modal-footer .btn-success {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.modal .modal-footer .btn-success:hover,
.modal .modal-footer .btn-success:focus {
  background: #0f766e;
  border-color: #0f766e;
}

/* --- Form elemanları (modal içi) --- */
.modal .modal-body .form-control,
.modal .modal-body .form-select {
  font-family: 'Inter', sans-serif;
  border-radius: 8px;
  border-color: #dbe3ef;
  font-size: .88rem;
  transition: border-color .15s, box-shadow .15s;
}
.modal .modal-body .form-control:focus,
.modal .modal-body .form-select:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.modal .modal-body .form-label {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: #64748b;
}
.modal .modal-body .input-group-text {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  background: #f8fafc;
  border-color: #dbe3ef;
}

/* --- Alert kutuları (modal içi) --- */
.modal .modal-body .alert {
  border-radius: 8px;
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
}

/* --- Fullscreen modal --- */
.modal-fullscreen .modal-content {
  border-radius: 0;
  box-shadow: none;
  border: none;
}
.modal-fullscreen .modal-header {
  background: #fff;
  border-bottom: 2px solid #1e3a5f;
}
.modal-fullscreen .modal-header .modal-title {
  font-size: 1.05rem;
}

/* --- Küçük modal --- */
.modal-sm .modal-content {
  border-radius: 14px;
}

/* --- Bootstrap modal responsive --- */
@media (max-width: 575.98px) {
  .modal .modal-content { border-radius: 14px; }
  .modal .modal-header { padding: 12px 16px; }
  .modal .modal-body { padding: 16px; }
  .modal .modal-footer { padding: 10px 16px; }
  .modal .modal-footer .btn { padding: 8px 14px; font-size: .82rem; }
}
