@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Oswald:wght@600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Marka işareti: logo.svg'yi mask olarak kullanır, rengi metin renginden alır */
.brand-mark {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  background-color: currentColor;
  -webkit-mask: url('/icons/logo.svg') center / contain no-repeat;
  mask: url('/icons/logo.svg') center / contain no-repeat;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  body {
    padding-bottom: 2rem;
  }
}

input, textarea, select {
  user-select: text;
}

/* Realistic Turkish License Plate Input Container */
.plate-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 3px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.plate-box:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25), 0 4px 14px rgba(0, 0, 0, 0.15);
}

.plate-tr {
  background: #003399;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  align-self: stretch;
  padding: 4px 2px;
  border-right: 2px solid #1e293b;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.plate-tr span.stars {
  font-size: 10px;
  line-height: 1;
  margin-bottom: 2px;
  color: #facc15;
}

.plate-input {
  font-family: 'Oswald', monospace, sans-serif;
  font-size: 1.85rem;
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0f172a;
  background: transparent;
  width: 100%;
  padding: 10px 14px;
  outline: none;
}

.plate-input::placeholder {
  color: #94a3b8;
  font-size: 1.35rem;
  letter-spacing: 1.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

@media (max-width: 640px) {
  .plate-input {
    font-size: 1.45rem !important;
    letter-spacing: 1.5px !important;
    padding: 8px 10px !important;
  }
  .plate-input::placeholder {
    font-size: 1.1rem !important;
    letter-spacing: 1px !important;
  }
  .plate-tr {
    width: 38px !important;
    font-size: 13px !important;
    padding: 2px 1px !important;
  }
}

/* Brand Grid Button */
.brand-btn {
  transition: all 0.15s ease;
  border: 1.5px solid #e2e8f0;
}
.brand-btn:active {
  transform: scale(0.96);
}
.brand-btn.selected {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Service Pill Button */
.service-pill {
  transition: all 0.15s ease;
  border: 1.5px solid #e2e8f0;
}
.service-pill:active {
  transform: scale(0.97);
}
.service-pill.selected {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

/* Payment Method Card */
.pay-btn {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e2e8f0;
}
.pay-btn:active {
  transform: scale(0.97);
}
.pay-btn.selected-nakit {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.pay-btn.selected-kart {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}
.pay-btn.selected-havale {
  background: #faf5ff;
  border-color: #a855f7;
  color: #7e22ce;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25);
}

/* Bottom Nav bar for mobile */
.bottom-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding-bottom: max(0.4rem, env(safe-area-inset-bottom, 0.4rem));
  backdrop-filter: blur(8px);
}

/* Modal Scroll & Mobile Protection */
@media (max-width: 640px) {
  div[id$="Modal"] > div:first-child,
  div[id$="Overlay"] > div:first-child {
    max-height: 92vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse-dot {
  animation: pulseGlow 2s infinite ease-in-out;
}

/* Country Selector on Plate */
.plate-tr {
  cursor: pointer;
  transition: all 0.2s ease;
}
.plate-tr:hover {
  background: #002277;
}

/* ============================================== */
/* DARK THEME (KARANLIK MOD) OVERRIDES            */
/* ============================================== */
html.dark body {
  background-color: #0b0f19 !important;
  color: #f1f5f9 !important;
}
html.dark .bg-white {
  background-color: #151d30 !important;
  color: #f8fafc !important;
}
html.dark .bg-slate-50 {
  background-color: #0b0f19 !important;
  color: #f1f5f9 !important;
}
html.dark .bg-slate-100 {
  background-color: #0b0f19 !important;
}
html.dark .bg-slate-200 {
  background-color: #1e293b !important;
}
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700 {
  color: #f8fafc !important;
}
html.dark .text-slate-600,
html.dark .text-slate-500 {
  color: #94a3b8 !important;
}
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300 {
  border-color: #1e293b !important;
}
html.dark input,
html.dark select,
html.dark textarea {
  background-color: #151d30 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
html.dark .plate-box {
  background-color: #0b0f19 !important;
  border-color: #334155 !important;
}
html.dark .plate-input {
  color: #ffffff !important;
}
html.dark .brand-btn {
  background-color: #151d30 !important;
  color: #e2e8f0 !important;
  border-color: #1e293b !important;
}
html.dark .brand-btn.selected {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}
html.dark .service-pill {
  background-color: #151d30 !important;
  color: #cbd5e1 !important;
  border-color: #1e293b !important;
}
html.dark .service-pill.selected {
  background-color: #38bdf8 !important;
  color: #0b0f19 !important;
  font-weight: 800 !important;
}
html.dark .pay-btn {
  background-color: #151d30 !important;
  border-color: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .pay-btn.selected-nakit {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}
html.dark .pay-btn.selected-kart {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-color: #3b82f6 !important;
  color: #60a5fa !important;
}
html.dark .pay-btn.selected-havale {
  background-color: rgba(168, 85, 247, 0.15) !important;
  border-color: #a855f7 !important;
  color: #c084fc !important;
}
html.dark .bottom-nav {
  background-color: rgba(11, 15, 25, 0.95) !important;
  border-color: #1e293b !important;
}
html.dark ::-webkit-scrollbar-track {
  background: #0b0f19;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

/* ============================================== */
/* THERMAL PRINTER (58mm / 80mm) STYLING          */
/* ============================================== */
@media print {
  @page {
    margin: 0;
    size: auto;
  }
  body * {
    visibility: hidden;
  }
  #printableReceipt, #printableReceipt * {
    visibility: visible;
  }
  #printableReceipt {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 72mm;
    margin: 0 auto;
    padding: 8px 6px;
    background: #ffffff !important;
    color: #000000 !important;
    font-family: 'Courier New', Courier, monospace, sans-serif;
    font-size: 12px;
    line-height: 1.25;
    border: none !important;
    box-shadow: none !important;
  }
}

/* ============================================== */
/* MOBILE ERGONOMICS & ACCORDION ANIMATIONS       */
/* ============================================== */
#extraDetailsChevron {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
#extraDetailsChevron.rotate-180 {
  transform: rotate(180deg);
}

@media (max-width: 640px) {
  /* iOS Safari auto-zoom prevention: inputs at least 16px */
  input[type="text"]:not(.plate-input),
  input[type="number"],
  input[type="password"],
  select {
    font-size: 16px !important;
  }

  /* Ergonomic touch targets on mobile */
  .pay-btn,
  #extraDetailsToggleBtn,
  #submitRecordBtn {
    min-height: 46px;
  }
}

