/* Dark mode color variables */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --input-border: #ced4da;
  --shadow-sm: rgba(0, 0, 0, 0.08);
  --shadow-md: rgba(0, 0, 0, 0.1);
  --brand-primary: #003149;
  --brand-secondary: #0378aa;
  --brand-tertiary: #00a0df;
}

[data-theme="dark"] {
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #262626;
  --text-primary: #f8f9fa;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --border-color: #404040;
  --card-bg: #1a1a1a;
  --input-bg: #262626;
  --input-border: #404040;
  --shadow-sm: rgba(0, 0, 0, 0.5);
  --shadow-md: rgba(0, 0, 0, 0.7);
  --brand-primary: #0ea5e9;
  --brand-secondary: #38bdf8;
  --brand-tertiary: #7dd3fc;
}

* {
  font-family: "Raleway", sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] body {
  background-image: url("/grid") !important;
}

[data-theme="dark"] body {
  background-image: none !important;
}

/* Form elements consistent styling */
.form-control:not(.form-floating .form-control), 
.form-select, 
.btn, 
.input-group-text,
textarea {
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  height: 45px !important;
}

.form-floating .form-control {
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* Input fields */
.form-control {
  padding: 10px 15px !important;
  border: 1px solid var(--input-border) !important;
  background-color: var(--input-bg) !important;
  color: var(--text-primary) !important;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-secondary) !important;
  box-shadow: 0 0 0 0.25rem rgba(3, 120, 170, 0.25) !important;
  background-color: var(--input-bg) !important;
}

.form-select {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--text-primary) !important;
}

/* Cards */
.card {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.card-body {
  background-color: var(--card-bg) !important;
}

/* Tables */
.table {
  color: var(--text-primary) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: var(--bg-secondary) !important;
}

/* Modals */
.modal-content {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

.modal-header {
  border-bottom-color: var(--border-color) !important;
}

.modal-footer {
  border-top-color: var(--border-color) !important;
  background-color: var(--bg-secondary) !important;
}

/* Text colors */
.text-muted {
  color: var(--text-muted) !important;
}

/* Background utilities */
.bg-light {
  background-color: var(--bg-secondary) !important;
}

.bg-white {
  background-color: var(--card-bg) !important;
}

/* Borders */
hr {
  border-color: var(--border-color) !important;
  opacity: 1 !important;
}

/* Dark mode toggle button */
#darkModeToggle {
  border-radius: 8px !important;
  padding: 0.375rem 0.75rem !important;
  height: auto !important;
  transition: all 0.2s ease !important;
}

#darkModeToggle:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  transform: scale(1.05);
}

/* Input groups with consistent styling */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}

/* Fixed border styling for input group text */
.input-group-text {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  white-space: nowrap;
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-right: none;
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Properly style the form elements in product cards */
.input-group .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* Price card styling - fixed backgrounds */
.price-card {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 45px;
  width: 100%;
  background-color: transparent;
  border: 1px solid #ced4da;
  border-radius: 10px;
  padding: 0.375rem 0.75rem;
}

.card.price-card {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  overflow: visible;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  background-color: transparent;
}

.price-card-header {
  padding: 10px 15px;
  font-weight: 500;
  color: #333;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-size: 14px;
}

.price-card-body {
  padding: 0 !important;
  background-color: transparent !important;
}

.price-card-body .input-group {
  height: 45px;
  border-radius: 0;
}

.price-card-body .form-control {
  border: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 15px;
  height: 45px !important;
  overflow: visible;
}

.price-card-body .form-control span {
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  text-align: right;
}

#exBTW-display,
#incBTW-display {
  font-size: 18px;
  font-weight: bold;
  color: #212529;
  line-height: 1;
  text-align: right;
}

/* Clean price total card styling */
.price-total-card {
  border-radius: 10px;
  background-color: var(--card-bg);
  outline: 1px solid var(--border-color);
  outline-offset: -1px;
  box-shadow: 0 1px 3px var(--shadow-sm);
  margin-bottom: 15px;
  overflow: hidden;
}

.price-total-header {
  padding: 12px 16px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  text-align: center;
}

.price-total-body {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 15px;
  background-color: var(--card-bg);
}

.price-total-body .price-euro {
  width: 50px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  color: white;
  background-color: var(--text-primary);
  border-radius: 8px;
  margin-right: 15px;
}

.price-total-body .price-display {
  flex: 1;
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
  text-align: left;
}

/* Product component styling for kassa.js */
.product-card-body {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  position: relative !important;
}

[data-theme="dark"] .product-card-body {
  background: linear-gradient(135deg, #1a1a1a 0%, #262626 100%) !important;
}

.product-accent-line {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #047ec0, #0056b3) !important;
  border-radius: 12px 12px 0 0 !important;
}

[data-theme="dark"] .product-accent-line {
  display: none !important;
}

.product-icon-wrapper {
  width: 35px !important;
  height: 35px !important;
  background: linear-gradient(135deg, #047ec0, #0056b3) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-size: 14px !important;
  box-shadow: 0 2px 8px rgba(4, 126, 192, 0.3) !important;
}

[data-theme="dark"] .product-icon-wrapper {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4) !important;
}

.product-title {
  color: #2c3e50 !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  margin-bottom: 0 !important;
}

[data-theme="dark"] .product-title {
  color: var(--text-primary) !important;
}

/* Fix card wrapper for product components - remove white border */
#endList .card {
  background-color: transparent !important;
  border: none !important;
}

#endList .card-body {
  padding: 0 !important;
}

.product-price-section {
  background: rgba(4, 126, 192, 0.05) !important;
  border-radius: 10px !important;
  padding: 15px !important;
  margin: 15px 0 !important;
  border: 1px solid rgba(4, 126, 192, 0.1) !important;
}

[data-theme="dark"] .product-price-section {
  background: rgba(14, 165, 233, 0.08) !important;
  border-color: rgba(14, 165, 233, 0.15) !important;
}

.product-details-section {
  background: rgba(108, 117, 125, 0.05) !important;
  border-radius: 10px !important;
  padding: 15px !important;
  border: 1px solid rgba(108, 117, 125, 0.1) !important;
}

[data-theme="dark"] .product-details-section {
  background: rgba(156, 163, 175, 0.08) !important;
  border-color: rgba(156, 163, 175, 0.15) !important;
}

.product-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 5px !important;
  display: block !important;
  color: var(--text-secondary) !important;
}

.product-label-primary {
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 5px !important;
  display: block !important;
  color: #047ec0 !important;
}

[data-theme="dark"] .product-label-primary {
  color: #0ea5e9 !important;
}

.product-input-wrapper {
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
  transition: all 0.3s ease !important;
}

.product-input-wrapper:focus-within {
  box-shadow: 0 4px 12px rgba(4, 126, 192, 0.2) !important;
  transform: translateY(-1px) !important;
}

[data-theme="dark"] .product-input-wrapper:focus-within {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
}

.product-input-euro {
  background: #047ec0 !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  min-width: 45px !important;
}

[data-theme="dark"] .product-input-euro {
  background: #0ea5e9 !important;
}

.product-input-field {
  border: none !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  color: var(--text-primary) !important;
  background-color: var(--input-bg) !important;
}

.product-amount-input {
  border-radius: 8px !important;
  border: 2px solid var(--border-color) !important;
  transition: all 0.3s ease !important;
  font-size: 1.2rem !important;
  height: 50px !important;
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
}

.product-amount-input:focus {
  border-color: #047ec0 !important;
  box-shadow: 0 0 0 0.2rem rgba(4, 126, 192, 0.25) !important;
  transform: scale(1.02) !important;
}

[data-theme="dark"] .product-amount-input:focus {
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25) !important;
}

.product-desc-input {
  border-radius: 8px !important;
  border: 2px solid var(--border-color) !important;
  transition: all 0.3s ease !important;
  height: 50px !important;
  background: var(--input-bg) !important;
  color: var(--text-primary) !important;
}

.product-desc-input:focus {
  border-color: #6c757d !important;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25) !important;
}

[data-theme="dark"] .product-desc-input:focus {
  border-color: #9ca3af !important;
  box-shadow: 0 0 0 0.2rem rgba(156, 163, 175, 0.25) !important;
}

.personal-link {
  text-decoration: none !important;
  color: black !important;
}

/* Fix for select dropdowns appearing behind modals */
.select2-container {
  z-index: 1056 !important; /* Higher than Bootstrap's modal z-index (1050) */
}

/* Fix for standard select dropdowns in modals */
.modal-open .select2-dropdown,
.modal-open .select2-container--open,
.modal-open .dropdown-menu,
.modal-open .ui-autocomplete {
  z-index: 1056 !important;
}

/* Additional fixes for select dropdowns in modals */
.modal select,
.modal .form-select,
.modal-content select,
.modal-body select,
#seller,
#paymentMethod {
  z-index: 1060 !important;
}

/* Ensure modal content doesn't clip dropdowns */
.modal-content,
.modal-body {
  overflow: visible !important;
}

/* Force dropdowns to appear above the modal */
.ui-front {
  z-index: 1060 !important;
}

/* Button styling */
.btn {
  border-radius: 10px;
  font-size: 14px;
  padding: 10px 16px;
  transition: all 0.2s ease;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-dark {
  background-color: #212529;
  border-color: #212529;
}

.btn-dark:hover {
  background-color: #1a1e21;
  border-color: #1a1e21;
}

.btn-primary {
  background-color: #047ec0;
  border-color: #047ec0;
}

.btn-primary:hover {
  background-color: #036da6;
  border-color: #036da6;
}

.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
}

/* Floating action buttons */
.floating-action-btn {
  position: fixed;
  bottom: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999;
}

.floating-action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.floating-action-btn-right {
  right: 30px;
}

.floating-action-btn-left {
  right: 100px;
}

/* Euro price input styling */
.price-euro {
  background-color: #212529 !important;
  color: white !important;
  font-weight: 500;
  font-size: 18px;
  width: 45px;
  border-color: #212529 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 45px;
}

.price-currency {
  font-weight: normal;
  margin-right: 2px;
  font-size: 16px;
}

.price-value {
  font-size: 18px;
  font-weight: bold;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 0;
  border: none !important;
  background-color: transparent !important;
}

/* Fix for removing any extra backgrounds */
.card, .card-body, .price-card-body .form-control {
  background-color: white !important;
}

.custom-bg {
  background-color: white !important;
}

/* Custom styling for amount field */
input[id^="amount"] {
  text-align: center;
  font-weight: bold !important;
  height: 45px;
  font-size: 14px;
  border-radius: 10px;
}

/* Fix for placeholder text in amount field */
input[id^="amount"]::placeholder {
  color: #000;
  opacity: 1;
}

/* Custom background for products */
.custom-bg {
  background-color: #f8f9fa !important;
  border-radius: 10px !important;
  padding: 15px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.textarea {
  border: 1px solid #ced4da;
  border-radius: 3px;
  background-color: #fff;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 17px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 13px;
  width: 13px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #2196f3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(13px);
  -ms-transform: translateX(13px);
  transform: translateX(13px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 13px;
}

.slider.round:before {
  border-radius: 50%;
}

.loader-container {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 30px;
}

.loader {
  position: absolute;
  top: 0%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loader-btn-container {
  display: flex;
  align-items: center;
}

#circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateY(8px);
  background-color: red;
}

.scrollable-div {
  height: 400px; /* set a fixed height for the div */
  overflow-y: scroll; /* enable vertical scrollbar */
  overflow-x: hidden;
}

.scrollable-products {
  height: 300px;
  overflow-y: scroll; /* enable vertical scrollbar */
  overflow-x: hidden;

}

.round-button {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: #fff;
  color: #000;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border: 2px solid #000;
}

.round-button:hover {
  background-color: #000;
  color: #fff;
}

.round-button-back {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: #fff;
  color: #f00;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border: 2px solid #f00;
}

.round-button-back:hover {
  background-color: #f00;
  color: #fff;
}

.circle {
  width: 10px;
  height: 10px;
  border: 1px solid black;
  border-radius: 50%; /* This creates a circle */
  display: inline-block; /* Display the circles inline */
  margin-right: 10px; /* Add some space between circles */
}

.circle-filled {
  width: 10px;
  height: 10px;
  background-color: black;
  border-radius: 50%; /* This creates a circle */
  display: inline-block; /* Display the circles inline */
  margin-right: 10px; /* Add some space between circles */
}

.custom-bg {
  background-color: #f4f4f4 !important;
  border-top: 3rem;
  border-radius: 10px;
  border-top-width: 10px !important;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.09), 0 6px 20px 0 rgba(0, 0, 0, 0.01) !important;
}

.signature-field {
  border: 1px solid #ddd;
  background-color: #fff;
  color: #32373c;
  touch-action: none;
  outline: 0;
}

.clickable-div {
  cursor: pointer;
}

.custom-row {
  display: flex;
  align-items: center;
}

.ui-autocomplete {
    max-height: 150px;
    overflow-y: auto;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 0 0 1rem 1rem;
}

/* Enhanced autocomplete styling for client search */
.ui-autocomplete {
  max-height: 300px;
  overflow-y: auto;
  border-radius: 8px !important;
  border: 1px solid #dee2e6 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  font-size: 14px;
}

.ui-autocomplete .ui-menu-item {
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #f8f9fa;
}

.ui-autocomplete .ui-menu-item:last-child {
  border-bottom: none;
}

.ui-autocomplete .ui-menu-item-wrapper {
  padding: 12px 16px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  border: none !important;
  background: white !important;
  color: #333 !important;
  transition: background-color 0.2s ease;
}

.ui-autocomplete .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-state-active {
  background-color: #f8f9fa !important;
  color: #333 !important;
  border: none !important;
}

.ui-autocomplete .ui-state-focus {
  background-color: rgba(33, 37, 41, 0.1) !important;
  color: #333 !important;
  border: none !important;
}

/* Make sure autocomplete appears above other elements */
.ui-autocomplete {
  z-index: 1050 !important;
}

/* Remove product button styles */
.product-remove-btn {
  transition: all 0.3s ease;
  border: none;
  background-color: #f8f9fa;
  color: #6c757d;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-remove-btn:hover {
  background-color: #dc3545;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.product-remove-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* Product container with remove button */
.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.product-header .product-name {
  margin: 0;
  flex-grow: 1;
}

/* Full-width total containers */
.container-fluid.px-0 {
  width: 100%;
  margin: 0;
}

.container-fluid.px-0 .row.g-3 {
  margin: 0;
  width: 100%;
}

.container-fluid.px-0 .col-md-6 {
  padding: 0 15px;
  flex: 1;
  max-width: 50%;
}

/* Simple and Clean Total Price Display Styles */
.input-group.mb-3.p-3 {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 0 !important;
  display: flex;
  align-items: stretch;
}

.input-group.mb-3.p-3 .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  width: 100%;
  display: block;
}

.input-group.mb-3.p-3 .input-group-text {
  background: #007bff !important;
  color: white !important;
  border: 1px solid #007bff !important;
  font-weight: 600;
  border-radius: 8px 0 0 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  flex-shrink: 0;
}

.input-group.mb-3.p-3 .form-control {
  border: 1px solid #dee2e6 !important;
  border-left: none !important;
  background-color: #ffffff !important;
  font-weight: 600;
  font-size: 1.1rem;
  color: #495057;
  border-radius: 0 8px 8px 0 !important;
  flex: 1;
  height: auto;
}

.input-group.mb-3.p-3 .form-control:focus {
  border-color: #007bff !important;
  box-shadow: none !important;
  outline: none;
}

/* Force rounded corners for total boxes specifically */
#exBTW, #incBTW {
  background-color: #f8f9fa !important;
  cursor: default;
  font-weight: 700 !important;
  color: #2c3e50 !important;
}

/* Override Bootstrap input-group styling for total boxes */
.input-group.mb-3.p-3 .input-group-text#addon-m1,
.input-group.mb-3.p-3 .input-group-text#addon-m2 {
  border-radius: 8px 0 0 8px !important;
  background-color: rgba(33, 37, 41, 0.9) !important;
  color: white !important;
  border-color: rgba(33, 37, 41, 0.9) !important;
}

.input-group.mb-3.p-3 #exBTW,
.input-group.mb-3.p-3 #incBTW {
  border-radius: 0 8px 8px 0 !important;
}

/* Enhanced spacing and readability for Kassa page */
main.container {
  margin-top: 20px !important;
  margin-left: 20px !important;
  margin-right: 20px !important;
  margin-bottom: 20px !important;
  max-width: calc(100% - 40px) !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  padding-bottom: 100px !important; /* Extra space for floating action buttons */
}

@media (min-width: 1200px) {
  main.container {
    margin-left: 40px !important;
    margin-right: 40px !important;
    max-width: calc(100% - 80px) !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    padding-bottom: 100px !important; /* Extra space for floating action buttons */
  }
}

@media (max-width: 768px) {
  main.container {
    margin-left: 15px !important;
    margin-right: 15px !important;
    max-width: calc(100% - 30px) !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    padding-bottom: 90px !important; /* Extra space for floating action buttons */
  }
}

.col-lg-4 {
  padding: 0 15px;
}

@media (max-width: 992px) {
  .col-lg-4 {
    padding: 0 10px;
    margin-bottom: 30px;
  }
  
  .col-lg-4:last-child {
    margin-bottom: 0;
  }
}

/* Better form spacing */
.form-label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
}

.form-control {
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out;
}

/* Fix for Bootstrap form-floating labels */
.form-floating > .form-control {
  height: calc(3.5rem + 2px) !important; /* Bootstrap's default height for floating labels */
  padding: 1rem 0.75rem !important;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
  padding-top: 1.625rem !important;
  padding-bottom: 0.625rem !important;
}

.form-floating > label {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 100% !important;
  padding: 1rem 0.75rem !important;
  pointer-events: none !important;
  border: 1px solid transparent !important;
  transform-origin: 0 0 !important;
  transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out !important;
  margin-bottom: 0 !important; /* Override the form-label margin */
  font-weight: 400 !important; /* Override the form-label font-weight */
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  opacity: 0.65 !important;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem) !important;
}

.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Product info spacing */
#productInfo1, #extraProducts {
  margin-top: 20px;
}

.input-group {
  margin-bottom: 20px;
}

/* Better button spacing */
.btn {
  padding: 12px 20px;
  font-weight: 500;
  border-radius: 8px;
}

/* Product list items spacing */
.custom-bg {
  margin-bottom: 20px !important;
  padding: 20px !important;
  border-radius: 12px !important;
}

/* Enhanced input group responsiveness */
.input-group .input-group-text {
  flex-shrink: 0;
  min-width: 45px;
  justify-content: center;
}

.input-group .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

/* Prevent input group breaking on small screens */
@media (max-width: 576px) {
  .input-group {
    flex-wrap: nowrap !important;
  }
  
  .input-group .input-group-text {
    min-width: 40px;
    font-size: 14px;
  }
  
  .input-group .form-control {
    font-size: 14px;
    padding: 10px 12px;
  }
}

/* Floating Action Buttons */
.floating-action-btn {
  position: fixed !important;
  bottom: 20px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: none;
  background-color: rgba(33, 37, 41, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.floating-action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  background-color: rgba(33, 37, 41, 0.95);
}

.floating-action-btn-left {
  left: 20px;
}

.floating-action-btn-right {
  right: 20px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .floating-action-btn {
    width: 65px;
    height: 65px;
    bottom: 15px;
  }
  
  .floating-action-btn-left {
    left: 15px;
  }
  
  .floating-action-btn-right {
    right: 15px;
  }
  
  .floating-action-btn svg {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .floating-action-btn {
    width: 60px;
    height: 60px;
    bottom: 10px;
  }
  
  .floating-action-btn-left {
    left: 10px;
  }
  
  .floating-action-btn-right {
    right: 10px;
  }
  
  .floating-action-btn svg {
    width: 35px;
    height: 35px;
  }
}

/* Order Modal Styling */
#create_order_modal .modal-body {
  max-height: 80vh;
  overflow-y: auto;
}

/* Enhanced autocomplete styling for order modal */
#create_order_modal .ui-autocomplete {
  z-index: 1060 !important; /* Standard dropdown z-index */
  max-height: 300px;
  overflow-y: auto;
  border-radius: 8px !important;
  border: 1px solid #dee2e6 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  font-size: 14px;
  background: white !important;
  position: absolute !important;
  display: block !important;
}

/* Ensure hidden autocomplete is truly hidden */
#create_order_modal .ui-autocomplete.ui-helper-hidden-accessible,
#create_order_modal .ui-autocomplete[style*="display: none"] {
  display: none !important;
  visibility: hidden !important;
}

#create_order_modal .ui-autocomplete .ui-menu-item {
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #f8f9fa;
}

#create_order_modal .ui-autocomplete .ui-menu-item:last-child {
  border-bottom: none;
}

#create_order_modal .ui-autocomplete .ui-menu-item-wrapper {
  padding: 12px 16px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  border: none !important;
  background: white !important;
  color: #333 !important;
  transition: background-color 0.2s ease;
}

#create_order_modal .ui-autocomplete .ui-menu-item-wrapper:hover,
#create_order_modal .ui-autocomplete .ui-state-active {
  background-color: #f8f9fa !important;
  color: #333 !important;
  border: none !important;
}

#create_order_modal .ui-autocomplete .ui-state-focus {
  background-color: rgba(33, 37, 41, 0.1) !important;
  color: #333 !important;
  border: none !important;
}

/* Enhanced product container styling for vertical layout */
#create_order_modal .product-container {
  background-color: #ffffff;
  border: 1px solid #dee2e6 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem !important;
}

#create_order_modal .product-container:hover {
  background-color: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

/* Improved spacing for vertical layout */
#create_order_modal .product-container .row {
  margin-bottom: 0;
}

#create_order_modal .product-container .row:last-child {
  margin-bottom: 0 !important;
}

/* Enhanced delete button styling */
#create_order_modal .btn-outline-danger {
  border-width: 2px;
  font-weight: 600;
  transition: all 0.2s ease;
}

#create_order_modal .btn-outline-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Improved summary section styling */
#create_order_modal #order_endList .bg-light {
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

#create_order_modal #order_endList .bg-light:hover {
  background-color: #e9ecef !important;
  transform: translateX(2px);
}

/* Editable price field styling */
#create_order_modal .product-container input[type="number"]:not([readonly]) {
  background-color: #ffffff;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.1rem rgba(13, 110, 253, 0.1);
}

#create_order_modal .product-container input[type="number"]:not([readonly]):focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#create_order_modal .product-container input[type="number"]:not([readonly]):hover {
  border-color: #0d6efd;
}

/* Order Modal Button Styling - Extreme clickable version */
#create_order {
    pointer-events: auto !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative !important;
    z-index: 0 !important;
    margin-right: 10px !important;
    padding: 10px 20px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    min-width: 150px !important;
}

#create_order:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

#create_order:active:not(:disabled) {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

#create_order:disabled {
    pointer-events: none !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
}

#create_order:not(:disabled) {
    opacity: 1 !important;
    pointer-events: auto !important;
    color: white !important;
}

/* Fix button click area - ensure entire button including SVG is clickable */
#create_order * {
    pointer-events: none !important; /* Prevent child elements from intercepting clicks */
}

/* Ensure modal footer has proper z-index and positioning */
.modal-footer {
    position: relative !important;
    z-index: 1000 !important;
    display: flex !important;
    justify-content: flex-end !important;
    padding: 1rem !important;
}

/* Debug modal issues */
.modal-footer {
    position: relative !important;
    z-index: 9998 !important;
}

.modal-content {
    z-index: 9997 !important;
}

/* Additional styling for the product cards */
#saleProduct {
    margin-bottom: 15px;
}

/* Ensure amount field is properly sized */
#amount {
    font-weight: bold;
    text-align: center;
}

/* Product card styling using Bootstrap classes */
.card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 0;
    color: #333;
}

/* Override Bootstrap input group styling for better alignment */
.input-group-text {
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #ced4da;
}

/* Make sure all inputs have consistent height */
.form-control {
    height: 38px;
}

/* Custom styling for the amount field */
#amount1, #amount2, #amount3, 
[id^="amount"] {
    font-weight: bold !important;
    color: #000 !important;
    background-color: #fff !important;
}

/* Fix for placeholder text in amount field */
[id^="amount"]::placeholder {
    color: #000 !important;
    opacity: 1 !important;
}

/* Better styling for the card body */
.card-body {
    padding: 15px;
}

/* Make the trash button more visible on hover */
.btn-link:hover svg {
    color: #dc3545 !important;
}

/* Total price boxes using Bootstrap components */
.price-card {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.price-card-header {
    padding: 10px 15px;
    font-weight: 500;
    color: #333;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
}

.price-card-body {
    padding: 0;
}

.price-input-group {
    margin-bottom: 0;
}

.price-euro {
    background-color: #212529 !important;
    color: white !important;
    font-weight: 500;
    font-size: 18px;
    width: 40px;
    border-color: #212529 !important;
}

.price-value {
    font-size: 20px;
    height: 45px;
    text-align: right;
    border: none;
    background-color: white !important;
    font-weight: 500;
}

/* Make card borders lighter */
.card {
    border-color: #e9ecef;
    margin-bottom: 15px;
}

.card-header {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    font-weight: 600;
}

/* Simple product card styling to match the design exactly */
.simple-product-card {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* Clean button style */
.btn-plain {
    background: none;
    border: none;
    color: #aaa;
    padding: 5px;
    cursor: pointer;
}

.btn-plain:hover {
    color: #dc3545;
}

/* Price row styling */
.price-row {
    display: flex;
    gap: 15px;
}

.price-field-container {
    display: flex;
    flex: 1;
}

.price-currency {
    width: 40px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
}

.price-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 0 4px 4px 0;
    padding: 0.375rem 0.75rem;
    text-align: right;
    height: 38px;
}

/* Details row styling */
.details-row {
    display: flex;
    gap: 15px;
}

.quantity-input {
    width: 60px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    text-align: center;
    font-weight: bold;
    height: 38px;
}

.notes-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    height: 38px;
}

/* Make sure product cards stack correctly */
#endList {
    display: flex;
    flex-direction: column;
}

/* Focus styles */
.price-input:focus,
.quantity-input:focus,
.notes-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Consistent styling for all product card inputs */
.product-fields-container input.form-control {
    height: 38px;
    background-color: #fff !important;
}

.input-group-text {
    height: 38px;
}

/* Totals section styling */
.total-price-card {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 15px;
    margin-bottom: 15px;
}

.total-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 16px;
}

.total-amount {
    display: flex;
    align-items: center;
}

.currency-symbol {
    background-color: #333;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#exBTW, #incBTW {
    background-color: #fff !important;
    border: none;
    font-size: 22px;
    font-weight: 500;
    color: #333;
    box-shadow: none;
    text-align: right;
    padding-right: 15px;
    flex-grow: 1;
    height: 45px;
}

#exBTW:focus, #incBTW:focus {
    outline: none;
    box-shadow: none;
}