/* ==== */

/* Margins */
.m-1 {
  margin: 0.25rem;
}
.m-2 {
  margin: 0.5rem;
}
.m-3 {
  margin: 1rem;
}
.m-4 {
  margin: 1.5rem;
}
.m-5 {
  margin: 3rem;
}

.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 1rem;
}
.mt-4 {
  margin-top: 1.5rem;
}
.mt-5 {
  margin-top: 3rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.mb-5 {
  margin-bottom: 3rem;
}

.me-1 {
  margin-right: 0.25rem;
}
.me-2 {
  margin-right: 0.5rem;
}
.me-3 {
  margin-right: 1rem;
}
.me-4 {
  margin-right: 1.5rem;
}
.me-5 {
  margin-right: 3rem;
}

.ms-1 {
  margin-left: 0.25rem;
}
.ms-2 {
  margin-left: 0.5rem;
}
.ms-3 {
  margin-left: 1rem;
}
.ms-4 {
  margin-left: 1.5rem;
}
.ms-5 {
  margin-left: 3rem;
}

/* Paddings */
.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 1rem;
}
.p-4 {
  padding: 1.5rem;
}
.p-5 {
  padding: 3rem;
}

.pt-1 {
  padding-top: 0.25rem;
}
.pt-2 {
  padding-top: 0.5rem;
}
.pt-3 {
  padding-top: 1rem;
}
.pt-4 {
  padding-top: 1.5rem;
}
.pt-5 {
  padding-top: 3rem;
}

.pb-1 {
  padding-bottom: 0.25rem;
}
.pb-2 {
  padding-bottom: 0.5rem;
}
.pb-3 {
  padding-bottom: 1rem;
}
.pb-4 {
  padding-bottom: 1.5rem;
}
.pb-5 {
  padding-bottom: 3rem;
}

.pe-1 {
  padding-right: 0.25rem;
}
.pe-2 {
  padding-right: 0.5rem;
}
.pe-3 {
  padding-right: 1rem;
}
.pe-4 {
  padding-right: 1.5rem;
}
.pe-5 {
  padding-right: 3rem;
}

.ps-1 {
  padding-left: 0.25rem;
}
.ps-2 {
  padding-left: 0.5rem;
}
.ps-3 {
  padding-left: 1rem;
}
.ps-4 {
  padding-left: 1.5rem;
}
.ps-5 {
  padding-left: 3rem;
}

/* Card */
.card {
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  padding: 1rem;
}

/* Positions */
.position-relative {
  position: relative;
}
.position-absolute {
  position: absolute;
}
.position-fixed {
  position: fixed;
}

/* Top */
.top-0 {
  top: 0;
}
.top-25 {
  top: 25%;
}
.top-50 {
  top: 50%;
}
.top-75 {
  top: 75%;
}
.top-100 {
  top: 100%;
}

/* Displays */
.d-block {
  display: block;
}
.d-flex {
  display: flex;
}
.d-inline-block {
  display: inline-block;
}
.d-grid {
  display: grid;
}

/* Flex options */
.justify-content-start {
  justify-content: flex-start;
}
.justify-content-end {
  justify-content: flex-end;
}
.justify-content-between {
  justify-content: space-between;
}
.justify-content-around {
  justify-content: space-around;
}
.justify-content-evenly {
  justify-content: space-evenly;
}

.align-items-start {
  align-items: flex-start;
}
.align-items-end {
  align-items: flex-end;
}
.align-items-center {
  align-items: center;
}
.align-items-baseline {
  align-items: baseline;
}
.align-items-stretch {
  align-items: stretch;
}

/* Width */

.w-10 {
  width: 10%;
}
.w-20 {
  width: 20%;
}
.w-30 {
  width: 30%;
}
.w-40 {
  width: 40%;
}
.w-50 {
  width: 50%;
}
.w-60 {
  width: 60%;
}
.w-70 {
  width: 70%;
}
.w-80 {
  width: 80%;
}
.w-90 {
  width: 90%;
}
.w-100 {
  width: 100%;
}

/* Texts */
.text-dark {
  color: #333;
}
.text-light {
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
}
.btn-primary {
  background-color: #007bff;
  color: #fff;
}
.btn-success {
  background-color: #28a745;
  color: #fff;
}
.btn-danger {
  background-color: #dc3545;
  color: #fff;
}
/* Add more button styles as needed */

/* Responsive utilities (optional) */
@media (max-width: 576px) {
  .d-sm-block {
    display: block;
  }
  .d-sm-flex {
    display: flex;
  }
  /* Add more responsive classes as needed */
}

/* ==== */

.flex {
  display: flex;
  /* justify-content: center; */
  align-items: center;
}

.flex.flex-column {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.subtitle {
  margin-top: 10px;
  color: #555;
}

.bling-authorization-alert {
  font-size: 1.3rem;
  padding: 12px;
  color: #fff;
  z-index: 999;
  width: 100%;
  opacity: 1;
  text-align: center;
  animation: hide 1s ease-in 3s forwards;
  margin-bottom: 12px;
}

.temporary-alert {
  animation: hide 1s ease-in 3s forwards;
}

.bling-authorization-alert.error {
  background: #f00;
}

.bling-authorization-alert.success {
  background: #0a0;
}

@keyframes hide {
  to {
    opacity: 0;
    margin-bottom: 0;
    padding: 0;
    height: 0;
    visibility: hidden;
  }
}

.cg-dokan-dashboard-content ul.cg-dokan-tabs {
  margin-bottom: -1px !important;
}

.cg-dokan-base-page-content {
  border: 1px solid #ededed;
  padding: 2em;
}

.cg-integration-box {
  /* border-left: 5px solid #ccc;*/
  padding: 18px;
}

.cg-integration-box * {
  margin-bottom: 0;
}

.cg-integration-box.success {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border: 2px solid #4CAF50;
  background: linear-gradient(90deg, #e6f4ea, #ffffff);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', sans-serif;
  color: #2e7d32;
  margin: 1.5rem 0;
}

.cg-integration-box .cg-icon {
  font-size: 2rem;
  color: #4CAF50;
  flex-shrink: 0;
}

.cg-integration-box .cg-message-custom p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.cg-integration-box .button-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  background-color: #4CAF50;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 0.3s ease;
}

.cg-integration-box .button-link:hover {
  background-color: #388e3c;
}

.cg-integration-box.warning {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border: 2px solid #FFC107;
  background: linear-gradient(90deg, #fff8e1, #ffffff);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', sans-serif;
  color: #8a6d3b;
  margin: 1.5rem 0;
}

.cg-integration-box.warning .cg-icon {
  font-size: 2rem;
  color: #FFC107;
  flex-shrink: 0;
}

.cg-integration-box.warning .cg-message-custom p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
}

.cg-integration-box.warning .button-link {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  background-color: #FFC107;
  color: #212121;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  transition: background-color 0.3s ease;
}

.cg-integration-box.warning .button-link:hover {
  background-color: #ffb300;
}

.cg-integration-box.danger {
  border-color: red;
  background: linear-gradient(90deg, #f003 20%, #fff 90%);
}

.sync-button-container {
  margin-top: 20px;
}

.sync-icon {
  font-size: 2rem;
  color: #777;
}

.sync-icon.success {
  color: #0a0;
}

.sync-icon.error {
  color: #f00;
}

.sync-icon.warning {
  color: #fa0;
}

.sync-info {
  /* font-size: 1.3rem; */
  margin: 0;
  margin-left: 8px;
}

.border {
  border: 1px solid #ccc;
}

.display-inline-block {
  display: inline-block;
}

.display-block {
  display: block;
}

.text-black {
  color: #000 !important;
}

.text-danger {
  color: #f00 !important;
}

.text-warning {
  color: #fa0 !important;
}

.text-info {
  color: #0af !important;
}

.text-success {
  color: #0a0 !important;
}

.text-gray {
  color: #777 !important;
}

.button {
  padding: 8px 18px;
  border: 1px solid #ccc;
}

.button-primary {
  border-color: #c36;
}

.form-table td input {
  width: 75%;
}

.copied {
  display: flex !important;
}

.copied .checked {
  margin-left: 10px;
}

.callback-url {
  border: 1px solid #ccc;
  width: 80%;
  overflow: hidden;
  padding: 12px 6px;
  border-radius: 4px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ==== Product Selection Modal ==== */

/* Modal Overlay */
.cg-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

/* Modal Content */
.cg-modal-content {
  background-color: #ffffff;
  margin: 2% auto;
  padding: 0;
  border: none;
  width: 95%;
  max-width: 1000px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 8px 25px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.cg-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #592fdd 0%, #4520b0 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(89, 47, 221, 0.3);
}

.cg-modal-header h3 {
  margin: 0;
  color: white;
  font-size: 1.25em;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.cg-modal-close {
  color: rgba(255,255,255,0.9);
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
  line-height: 20px;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.cg-modal-close:hover,
.cg-modal-close:focus {
  color: white;
  background-color: rgba(255,255,255,0.15);
}

/* Modal Body */
.cg-modal-body {
  padding: 20px;
  max-height: 600px;
  overflow-y: auto;
}

/* Product Search Bar */
.product-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.product-search-bar input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.product-search-bar input[type="text"]:focus {
  border-color: #592fdd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(89, 47, 221, 0.1);
}

.product-search-bar .button {
  padding: 10px 18px;
  background: linear-gradient(135deg, #592fdd 0%, #4520b0 100%);
  border: none;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-search-bar .button:hover {
  background: linear-gradient(135deg, #4520b0 0%, #361890 100%);
  transform: translateY(-1px);
}

/* Product Filters */
.product-filters {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  gap: 20px;
  flex-wrap: wrap;
}

.product-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
}

.product-filters select {
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.product-filters select:focus {
  border-color: #592fdd;
  outline: none;
}

/* Loading Indicator */
.product-loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.product-loading i {
  margin-right: 8px;
  font-size: 1.2em;
}

/* Product List */
.product-list {
  max-height: 380px;
  overflow-y: auto;
  border: 2px solid #eee;
  border-radius: 8px;
  padding: 8px;
  background-color: #fff;
}

.product-list:empty {
  display: none;
}

.product-item {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
  border-radius: 6px;
  margin-bottom: 2px;
}

.product-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.product-item:hover {
  background-color: #e6f9f0;
}

.product-item.selected {
  background-color: #e6f9f0;
  border-left: 3px solid #00bf68;
}

.product-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  margin: 0;
}

.product-checkbox {
  margin: 4px 12px 0 0 !important;
  cursor: pointer;
}

.product-info {
  flex: 1;
}

.product-name {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
}

.product-details {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
}

.product-code,
.product-price {
  display: inline-block;
}

.no-products {
  text-align: center;
  padding: 30px;
  color: #999;
}

.error-message {
  text-align: center;
  padding: 20px;
  color: #d63638;
  background-color: #fcf0f1;
  border: 1px solid #d63638;
  border-radius: 4px;
}

.error-message i {
  margin-right: 8px;
}

/* Pagination */
.product-pagination {
  text-align: center;
  padding: 10px 0;
}

/* Modal Footer */
.cg-modal-footer {
  padding: 16px 24px;
  background-color: #f8f9fa;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #eee;
}

.cg-modal-footer .button-primary {
  background: linear-gradient(135deg, #00bf68 0%, #00a058 100%);
  border-color: #00bf68;
  color: white;
  padding: 10px 24px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 191, 104, 0.3);
}

.cg-modal-footer .button-primary:hover {
  background: linear-gradient(135deg, #00a058 0%, #008548 100%);
  box-shadow: 0 4px 12px rgba(0, 191, 104, 0.4);
  transform: translateY(-1px);
}

.cg-modal-footer .button-secondary {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
}

/* Product Selection Section */
.product-selection-section {
  background-color: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.product-selection-section label {
  display: block;
  margin-bottom: 10px;
}

.product-selection-section input[type="radio"] {
  margin-right: 8px;
}

.product-selection-section .text-muted {
  display: inline-block;
  margin-left: 25px;
  font-size: 0.9em;
}

.product-selection-section .text-success {
  color: #46b450;
  font-weight: 600;
}

#select-products-container {
  margin-left: 25px;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .cg-modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .cg-modal-body {
    max-height: 400px;
  }

  .product-search-bar {
    flex-direction: column;
  }

  .product-details {
    flex-direction: column;
    gap: 5px;
  }
}

/* ==== Modal Tabs ==== */
.cg-modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #eee;
  margin-bottom: 20px;
  background-color: #fafafa;
  padding: 0 10px;
}

.cg-tab-btn {
  padding: 14px 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.25s ease;
  position: relative;
}

.cg-tab-btn:hover {
  color: #592fdd;
  background-color: rgba(89, 47, 221, 0.05);
}

.cg-tab-btn.active {
  color: #592fdd;
  border-bottom-color: #592fdd;
  background-color: transparent;
}

.cg-tab-btn i {
  margin-right: 8px;
  font-size: 15px;
}

.cg-tab-content {
  min-height: 320px;
  padding: 5px 0;
}

/* ==== Category List ==== */
.category-list {
  max-height: 400px;
  overflow-y: auto;
  border: 2px solid #eee;
  border-radius: 8px;
  background-color: #fff;
}

.category-item {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
  position: relative;
}

.category-item:last-child {
  border-bottom: none;
}

.category-item:hover {
  background-color: #e6f9f0;
}

.category-item.loading {
  opacity: 0.7;
  pointer-events: none;
}

.category-item.loading::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #592fdd;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

.category-item.selected {
  background-color: #e6f9f0;
  border-left: 3px solid #00bf68;
}

@keyframes spinLoader {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Product item loading state */
.product-item.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.product-item.loading::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #592fdd;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

.category-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  gap: 10px;
}

.category-checkbox {
  margin: 0 !important;
  cursor: pointer;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.category-icon {
  color: #f0c14b;
  width: 20px;
  text-align: center;
}

.category-name {
  flex: 1;
  font-size: 14px;
  color: #333;
}

.view-category-products {
  font-size: 12px !important;
  padding: 2px 8px !important;
  height: auto !important;
  min-height: auto !important;
}

/* ==== Selection Summary ==== */
.selection-summary {
  background: linear-gradient(135deg, #e6f9f0 0%, #fff 100%);
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #b3ecd1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selection-summary .text-primary {
  color: #00bf68;
  font-size: 14px;
}

.selection-summary .text-primary strong {
  font-size: 18px;
  margin-right: 4px;
}

/* Global loading overlay for modal */
.cg-modal-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: 12px;
}

.cg-modal-loading-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #592fdd;
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

.cg-modal-loading-overlay .loading-text {
  margin-top: 12px;
  color: #666;
  font-size: 14px;
}

/* ==== Temporary Message ==== */
.cg-temp-message {
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  animation: fadeIn 0.3s ease;
}

.cg-temp-message.success {
  background-color: #d1e7dd;
  color: #0a5132;
  border: 1px solid #a3cfbb;
}

.cg-temp-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.cg-temp-message.warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.cg-temp-message i {
  margin-right: 8px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==== Category Info ==== */
.category-info-box {
  background-color: #e7f3ff;
  border: 1px solid #b8daff;
  border-radius: 4px;
  padding: 10px 15px;
  color: #004085;
  font-size: 13px;
}

.category-info-box i {
  margin-right: 6px;
}

/* ==== Button link delete ==== */
.button-link-delete {
  color: #d63638 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  cursor: pointer;
}

.button-link-delete:hover {
  color: #b32d2e !important;
  text-decoration: underline;
}

/* ==== Justify Content ==== */
.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

/* ==== Selected Products Tab ==== */
.selected-products-container {
  max-height: 400px;
  overflow-y: auto;
}

.selected-category-group {
  margin-bottom: 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.selected-category-header {
  background: linear-gradient(135deg, #161b2e 0%, #252d45 100%);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.selected-category-header:hover {
  background: linear-gradient(135deg, #252d45 0%, #333d5a 100%);
}

.selected-category-header .category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.selected-category-header .category-title i {
  color: #00bf68;
}

.selected-category-header .category-count {
  background: rgba(0, 191, 104, 0.2);
  color: #00bf68;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.selected-category-header .toggle-icon {
  font-size: 12px;
  transition: transform 0.2s;
}

.selected-category-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.selected-category-products {
  background-color: #fff;
  padding: 8px;
}

.selected-product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

.selected-product-item:last-child {
  border-bottom: none;
}

.selected-product-item:hover {
  background-color: #f9f9f9;
}

.selected-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selected-product-name {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.selected-product-code {
  font-size: 12px;
  color: #888;
}

.selected-product-details {
  display: flex;
  gap: 15px;
  align-items: center;
}

.selected-product-price {
  font-size: 13px;
  color: #00bf68;
  font-weight: 600;
}

.btn-remove-product {
  background: transparent;
  border: none;
  color: #d63638;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  font-size: 14px;
}

.btn-remove-product:hover {
  background-color: #fef0f0;
  color: #b32d2e;
}

.btn-remove-category {
  background: rgba(214, 54, 56, 0.15);
  border: none;
  color: #d63638;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s;
  margin-left: 8px;
}

.btn-remove-category:hover {
  background: rgba(214, 54, 56, 0.3);
}

.no-selected-products {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.no-selected-products i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 16px;
  display: block;
}

.no-selected-products p {
  margin: 0;
  font-size: 15px;
}

/* Uncategorized Products */
.uncategorized-group .selected-category-header {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

/* Selected tab badge */
.cg-tab-btn .tab-badge {
  background: #00bf68;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 600;
}

/* ==== Accordion Category List ==== */
.cg-modal-lg {
  max-width: 900px;
}

.category-product-list {
  max-height: 450px;
  overflow-y: auto;
  border: 2px solid #eee;
  border-radius: 8px;
  background-color: #fff;
}

.accordion-category {
  border-bottom: 1px solid #f0f0f0;
}

.accordion-category:last-child {
  border-bottom: none;
}

.accordion-category.selected > .accordion-header {
  background-color: #e6f9f0;
  border-left: 3px solid #00bf68;
}

.accordion-category.loading {
  opacity: 0.7;
  pointer-events: none;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fff;
}

.accordion-header:hover {
  background-color: #f5f5f5;
}

.accordion-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-toggle {
  width: 20px;
  text-align: center;
  cursor: pointer;
}

.accordion-toggle .toggle-icon {
  transition: transform 0.2s ease;
  color: #666;
  font-size: 12px;
}

.accordion-toggle .toggle-icon.expanded {
  transform: rotate(90deg);
}

.category-checkbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.category-icon {
  color: #f0c14b;
  width: 20px;
  text-align: center;
}

.category-name {
  font-weight: 500;
  color: #333;
  cursor: pointer;
}

.category-product-count .badge {
  background: #f0f0f0;
  color: #666;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.category-product-count .badge-error {
  background: #fef0f0;
  color: #d63638;
}

.accordion-content {
  background-color: #fafafa;
  border-top: 1px solid #eee;
}

.accordion-products {
  padding: 10px 15px 10px 50px;
}

.accordion-subcategories {
  padding-left: 10px;
}

.products-loading {
  padding: 20px;
  text-align: center;
  color: #888;
}

/* Product items inside accordion */
.accordion-products .product-item {
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.accordion-products .product-item:last-child {
  margin-bottom: 0;
}

.accordion-products .product-item:hover {
  border-color: #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.accordion-products .product-item.selected {
  background-color: #e6f9f0;
  border-color: #00bf68;
}

.product-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin: 0;
}

.product-checkbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.product-info {
  flex: 1;
}

.product-name {
  font-size: 14px;
  color: #333;
  display: block;
  margin-bottom: 4px;
}

.product-details {
  display: flex;
  gap: 15px;
  align-items: center;
}

.product-code {
  font-size: 12px;
  color: #888;
}

.product-price {
  font-size: 13px;
  color: #00bf68;
  font-weight: 600;
}

.product-main-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.product-price-editor {
  min-width: 220px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-price-label {
  font-size: 11px;
  color: #666;
  font-weight: 600;
}

.product-custom-price {
  width: 100%;
  max-width: 140px;
  border: 1px solid #ccd0d4;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
}

.product-custom-price:focus {
  border-color: #00bf68;
  outline: none;
  box-shadow: 0 0 0 1px #00bf68;
}

.product-price-hint {
  font-size: 11px;
  color: #777;
}

.product-item.has-custom-price {
  border-left: 3px solid #1f8c5f;
}

@media screen and (max-width: 768px) {
  .product-main-row {
    flex-direction: column;
  }

  .product-price-editor {
    min-width: 100%;
    max-width: 100%;
    padding-left: 30px;
  }
}

/* Filter section */
.product-filters {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.product-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.product-filters select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}

.no-products {
  padding: 30px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

.error-message {
  padding: 20px;
  text-align: center;
  color: #d63638;
  background: #fef0f0;
  border-radius: 6px;
  margin: 10px;
}

