/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo svg {
  width: 34px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top to .layout-page */
/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 72px !important;
}
/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 254px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

/*
* Icon Button Alignment Fix
******************************************************************************/

/* Fix: Ensure all icon buttons align icons perfectly */
.btn-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Ensure icons inside flex buttons are centered */
.btn-icon .icon-base {
  flex-shrink: 0;
}

/*
* Input Group Pointer Events Fix
******************************************************************************/

/* Fix: input-group::before pseudo-element was blocking click events on inputs
   The ::before element covers 100% width/height for visual effects (shadow, border-radius)
   but needs pointer-events: none to allow clicks to pass through to the actual input */
.input-group::before {
  pointer-events: none !important;
}

/*
* ════════════════════════════════════════════════════════════════════════════════
* 📱 MOBILE INPUT FIX - Touch Event Support
* ════════════════════════════════════════════════════════════════════════════════
* Problem: Mobil cihazlarda input-group içindeki input'lara tıklanamıyor/yazılamıyor
* Çözüm: Touch action ve pointer-events ayarları
*/

/* Tüm input'ların mobilde tıklanabilir olmasını garantile */
.input-group input,
.input-group select,
.input-group textarea {
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Input-group wrapper - z-index hiyerarşisi */
.input-group {
  position: relative !important;
}

/* Input-group-text (₺ sembolü vb) - input'un arkasında kalmalı */
.input-group-text {
  position: relative !important;
  z-index: 1 !important;
  pointer-events: auto !important;
}

/* Butonlar - input'un üstünde olmalı (QR tarama vb.) */
.input-group .btn {
  position: relative !important;
  z-index: 3 !important;
  pointer-events: auto !important;
}

/* Mobile-specific touch improvements */
@media (max-width: 991px) {
  /* Larger touch targets on mobile */
  .input-group input[type="text"],
  .input-group input[type="number"] {
    min-height: 44px !important; /* Apple's minimum touch target */
    font-size: 16px !important; /* Prevents iOS zoom on focus */
  }

  /* Ensure ::before doesn't interfere on mobile */
  .input-group::before,
  .input-group::after {
    pointer-events: none !important;
    touch-action: none !important;
    z-index: 0 !important;
  }

  /* Card body inputs - ensure they're always accessible */
  .card-body .input-group input {
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 0.375rem !important;
  }
}

/*
* ════════════════════════════════════════════════════════════════════════════════
* 📱 GLOBAL RESPONSIVE UTILITIES
* ════════════════════════════════════════════════════════════════════════════════
*/

/* Responsive text-nowrap utilities */
.text-nowrap-sm,
.text-nowrap-md,
.text-nowrap-lg,
.text-nowrap-xl {
  white-space: normal;
}

@media (min-width: 576px) {
  .text-nowrap-sm { white-space: nowrap; }
}

@media (min-width: 768px) {
  .text-nowrap-md { white-space: nowrap; }
}

@media (min-width: 992px) {
  .text-nowrap-lg { white-space: nowrap; }
}

@media (min-width: 1200px) {
  .text-nowrap-xl { white-space: nowrap; }
}

/* Responsive font sizes */
.fs-responsive-sm {
  font-size: 0.75rem;
}

.fs-responsive-base {
  font-size: 0.8125rem;
}

@media (min-width: 576px) {
  .fs-responsive-sm { font-size: 0.8125rem; }
  .fs-responsive-base { font-size: 0.875rem; }
}

@media (min-width: 768px) {
  .fs-responsive-sm { font-size: 0.875rem; }
  .fs-responsive-base { font-size: 1rem; }
}

/* Hide on mobile utilities */
.d-mobile-none {
  display: block;
}

@media (max-width: 767px) {
  .d-mobile-none {
    display: none !important;
  }
}

/* Show only on mobile */
.d-mobile-only {
  display: none !important;
}

@media (max-width: 767px) {
  .d-mobile-only {
    display: block !important;
  }
}

/* Responsive padding utilities */
@media (max-width: 767px) {
  .p-mobile-2 { padding: 0.5rem !important; }
  .p-mobile-3 { padding: 0.75rem !important; }
  .px-mobile-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
  .py-mobile-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
}

/* Responsive margins */
@media (max-width: 767px) {
  .m-mobile-2 { margin: 0.5rem !important; }
  .mb-mobile-3 { margin-bottom: 0.75rem !important; }
  .mt-mobile-3 { margin-top: 0.75rem !important; }
}

/* Mobile-friendly table utilities */
@media (max-width: 767px) {
  .table-mobile-compact th,
  .table-mobile-compact td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8125rem;
  }

  .table-mobile-compact .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* Card responsive padding */
@media (max-width: 767px) {
  .card-mobile-compact .card-body {
    padding: 0.75rem;
  }

  .card-mobile-compact .card-header {
    padding: 0.75rem;
  }
}

/* Responsive flex utilities */
@media (max-width: 767px) {
  .flex-mobile-column {
    flex-direction: column !important;
  }

  .flex-mobile-wrap {
    flex-wrap: wrap !important;
  }

  .gap-mobile-2 {
    gap: 0.5rem !important;
  }
}

/* Responsive width utilities */
@media (max-width: 767px) {
  .w-mobile-100 {
    width: 100% !important;
  }

  .w-mobile-auto {
    width: auto !important;
  }
}

/* Responsive button sizing */
@media (max-width: 767px) {
  .btn-mobile-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }

  .btn-mobile-block {
    width: 100%;
    display: block;
  }
}

/* Fix for sticky elements on mobile */
@media (max-width: 991px) {
  .sticky-mobile-none {
    position: relative !important;
    top: auto !important;
  }
}
