/* ═══════════════════════════════════════════════════════
   Tataroğlu Gıda — Components CSS
   Tüm yeniden kullanılabilir UI bileşenleri
═══════════════════════════════════════════════════════ */

/* ══════════════ BUTTONS ══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  line-height: 1;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-sm  { padding: 0.5rem 1rem;    font-size: 0.875rem; }
.btn-lg  { padding: 0.875rem 2rem;  font-size: 1rem; }
.btn-xl  { padding: 1rem 2.5rem;    font-size: 1.0625rem; }
.btn-icon { padding: 0.75rem; width: 2.75rem; height: 2.75rem; }

/* Primary */
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(10,132,255,0.35);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(10,132,255,0.5);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

/* WhatsApp */
.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37,211,102,0.3);
}
.btn-whatsapp:hover {
  background: linear-gradient(135deg, #2ee070, #15a385);
  box-shadow: 0 6px 20px rgba(37,211,102,0.45);
  transform: translateY(-1px);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary-border);
}
.btn-outline:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Danger */
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

/* ══════════════ GLASS CARDS ══════════════ */
.glass-card {
  background: var(--bg-card2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.glass-card-hover {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.glass-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  border-color: var(--primary-border);
}

.glass-panel {
  background: rgba(14,22,35,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
}

/* Service card */
.service-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(135deg, var(--primary-subtle), transparent);
  opacity:0; transition: var(--transition);
}
.service-card:hover { border-color: var(--primary-border); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 3.5rem; height: 3.5rem;
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background: var(--primary);
  box-shadow: var(--shadow-primary);
}

/* ══════════════ BADGE ══════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}
.badge-blue   { background: var(--primary-subtle);  color: var(--primary);  border: 1px solid var(--primary-border); }
.badge-green  { background: var(--green-subtle);    color: var(--green);    border: 1px solid var(--green-border); }
.badge-amber  { background: var(--amber-subtle);    color: var(--amber);    border: 1px solid var(--amber-border); }
.badge-red    { background: var(--red-subtle);      color: var(--red);      border: 1px solid var(--red-border); }
.badge-violet { background: rgba(139,92,246,0.1);   color: var(--violet);   border: 1px solid rgba(139,92,246,0.25); }
.badge-gray   { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border); }

/* ══════════════ MODAL ══════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: #0e1623;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  width: 100%; max-width: 36rem;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  transform: translateY(20px) scale(.97);
  transition: transform var(--transition);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-close {
  width: 2rem; height: 2rem;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  transition: var(--transition);
  cursor: pointer;
}
.modal-close:hover { background: var(--red-subtle); color: var(--red); border-color: var(--red-border); }
.modal-body { padding: 1.5rem 1.75rem; }
.modal-footer { padding: 1.25rem 1.75rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }

/* ══════════════ TOAST ══════════════ */
#toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: #141f30;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  font-size: 0.9rem; font-weight: 500;
  min-width: 260px;
  transform: translateX(120%);
  transition: transform var(--transition-slow);
}
#toast.show  { transform: translateX(0); }
#toast.success { border-color: var(--green-border); }
#toast.error   { border-color: var(--red-border); }
#toast-icon { font-size: 1.25rem; }
#toast.success #toast-icon::before { content: '✓'; color: var(--green); }
#toast.error   #toast-icon::before { content: '✕'; color: var(--red); }

/* ══════════════ FORMS ══════════════ */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.form-label .required { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  outline: none;
  border-color: var(--primary-border);
  box-shadow: 0 0 0 3px rgba(10,132,255,0.12);
}
.form-control:invalid:not(:placeholder-shown) { border-color: var(--red-border); }
textarea.form-control { resize: vertical; min-height: 7rem; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-card); color: var(--text-primary); }
.form-error { font-size: 0.8125rem; color: var(--red); margin-top: 0.25rem; }
.form-hint  { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Checkbox / Radio */
.form-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 1rem; height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ══════════════ TABLE ══════════════ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}
.admin-table td {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.admin-table tbody tr { transition: background var(--transition); }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ══════════════ STATUS DOT ══════════════ */
.status-dot {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8125rem; font-weight: 500;
}
.status-dot::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-new        { color: var(--amber); }
.status-processing { color: var(--primary); }
.status-completed  { color: var(--green); }
.status-cancelled  { color: var(--red); }

/* ══════════════ TABS ══════════════ */
.tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.tab-btn:hover   { color: var(--text-primary); background: var(--bg-glass); }
.tab-btn.active  { color: var(--primary); background: var(--primary-subtle); border-color: var(--primary-border); }

/* ══════════════ BREADCRUMB ══════════════ */
.breadcrumb { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.breadcrumb-item { font-size: 0.875rem; color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-faint); font-size: 0.75rem; }
.breadcrumb-item.active { color: var(--text-secondary); }

/* ══════════════ PAGINATION ══════════════ */
.pagination { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.page-btn {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
}
.page-btn:hover { background: var(--primary-subtle); color: var(--primary); border-color: var(--primary-border); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ══════════════ SCROLL REVEAL ══════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s cubic-bezier(.4,0,.2,1), transform 0.65s cubic-bezier(.4,0,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Fallback: inert if no JS */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
