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

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

.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 76px !important;
}

/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !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;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/*
* 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;
}
.balance-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  top: 2px; 
  background-color: #f1f3f5;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.balance-widget:hover {
  background-color: #e9ecef;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wallet-icon {
  font-size: 1.4rem;
  color: #4b4b4b;
  position: relative;
  top: 0px; /* biraz aşağı kaydır */
}

.balance-text {
  font-size: 15px;
  font-weight: 600;
  color: #343a40;
  display: flex;
  align-items: flex-end;
  line-height: 1;
}

.amount {
  margin-right: 2px;
}

.currency {
  font-size: 15px;
  opacity: 0.8;
}


input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  /* Firefox */
}

.product-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.product-card:hover {
  border-color: #0d6efd;
  background-color: #e7f1ff;
}

.product-card.selected {
  border-color: #0d6efd;
  background-color: #d0e5ff;
}

.product-image {
  max-height: 50px;
  object-fit: contain;
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-text {
  font-weight: 500;
}

.product-card {
  position: relative;
}

.quantity-control {
  position: absolute;
  top: -10px;
  right: -10px;
  display: flex;
  align-items: center;
  background: #d8d8d8;
  padding: 0; /* Padding tamamen kaldırıldı */
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  overflow: hidden; /* Köşelerden taşmayı engelle */
}

.btn-qty {
  background-color: transparent;
  color: #333;
  border: none;
  width: 28px;
  height: 28px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease-in-out;
}

.btn-qty:hover {
  background-color: #e0e0e0;
}

.qty-number {
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background-color: #fff;
}

.card-header h5 {
  margin-bottom: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.card-footer {
  font-size: 15px;
  color: #333;
}

#copyNotification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1rem;
  display: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.table-responsive {
  overflow-x: auto !important;
  max-width: 100%;
  position: relative;
}

.table-responsive .table {
  margin-bottom: 20px !important;
  width: 100% !important;
  table-layout: auto;
}

/* Adding a top scrollbar to match the bottom one */
.table-responsive:before {
  content: "";
  display: block;
  height: 15px;
  width: 100%;
  background-color: transparent;
  margin-bottom: 5px;
  overflow-y: hidden;
  overflow-x: scroll;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* This pseudo element will be scrolled along with the main content */
.table-responsive:before::-webkit-scrollbar {
  height: 8px;
}

.table-responsive:before::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 4px;
}

.table-responsive:before::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

/* Ensure main scrollbar matches */
.table-responsive::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

/* Script for syncing top and bottom scrollbars */
/* This will be added via JS */

/* Enhanced modal backdrop fix */
body.modal-open {
  overflow: auto !important;
  padding-right: 0 !important;
}

.modal-backdrop {
  opacity: 0.5;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 1040;
}

.modal-backdrop.fade.show {
  opacity: 0.5 !important;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translateY(-50px);
}

.modal.show .modal-dialog {
  transform: none;
}

/* Ensure modals are fully closed */
.modal.fade:not(.show) {
  display: none !important;
  z-index: -1 !important;
}

/* Reset body styles when modal is closed */
body:not(.modal-open) .modal-backdrop {
  display: none !important;
}

/* Force remove backdrop when needed */
.backdrop-force-remove {
  display: none !important;
  opacity: 0 !important;
}

/* Ensure dropdown menus are visible and properly positioned */
.dropdown-menu {
  position: absolute !important;
  z-index: 1050 !important;
}

/* Fix for dropdown menus in tables */
.table .dropdown .dropdown-menu {
  position: absolute !important;
  transform: translate3d(-150px, 0px, 0px) !important;
  inset: auto auto auto 0px !important;
  margin: 0px !important;
  min-width: 10rem !important;
}

/* Fix for the dropdown-menu-end class */
.dropdown-menu-end {
  right: 0 !important;
  left: auto !important;
}

/* Ensure dropdowns are always on top */
.dropdown-toggle.show + .dropdown-menu {
  display: block !important;
}

/* Wrap content for better mobile experience */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto !important;
  }
  
  .table th, .table td {
    white-space: normal !important;
  }
  
  .table .dropdown .dropdown-menu {
    transform: translate3d(-100px, 0px, 0px) !important;
  }
}

/* Additional styles for the top scrollbar */
.top-scroll-div {
  overflow-y: hidden;
  overflow-x: auto;
  height: 8px;
  margin-bottom: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.top-scroll-div::-webkit-scrollbar {
  height: 8px;
}

.top-scroll-div::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 4px;
}

.top-scroll-div::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

/* Balance badge styles - global for all admin pages */
.balance-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
}

.badge-danger {
  background-color: rgba(255, 62, 29, 0.2);
  color: #ff3e1d;
}

.badge-warning {
  background-color: rgba(255, 171, 0, 0.2);
  color: #ffab00;
}

.badge-success {
  background-color: rgba(40, 199, 111, 0.2);
  color: #28c76f;
}