/* Global stylesheet for IniTokoRbx */
:root {
  --input-bg: #ffffff;
  --input-border: #e5e7eb; /* gray-200 */
  --input-focus: #fb7185; /* rose-500 */
  --input-radius: 0.5rem; /* 8px */
  --select-arrow-size: 1.25rem; /* 20px */
}

/* Base form controls */
input, textarea, select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--input-radius);
  font-size: 0.95rem;
  color: #111827;
  outline: none;
  transition: box-shadow 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 4px 12px rgba(235, 84, 110, 0.12);
}

/* Custom nicer select with Remix Icon */
.select-custom {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none;
  padding-right: calc(var(--select-arrow-size) + 0.5rem);
}

/* Select wrapper untuk icon */
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-wrapper .select-custom {
  width: 100%;
  padding-right: calc(var(--select-arrow-size) + 0.5rem);
}

.select-wrapper .select-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280; /* gray-500 */
  font-size: 1rem;
}

/* Large select with icon area (used for icon preview) */
.select-with-icon {
  padding-left: 0.75rem;
  padding-right: 2.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* For browsers that still show native arrow, hide it */
select::-ms-expand { display: none; }

/* Small enhancement for option hover */
select option { padding: 6px 8px; }

/* Accessibility: focus-visible outline */
:focus-visible { box-shadow: 0 0 0 4px rgba(251,113,133,0.12); }

/* Utility to apply across existing markup */
.form-control { display: block; width: 100%; }

/* Specific tweaks to match Tailwind look used in templates */
.w-full { width: 100% !important; }
.rounded { border-radius: var(--input-radius) !important; }
.border { border-width: 1px !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }

/* Override untuk select.custom agar tidak tertimpa utility dengan !important */
select.select-custom {
  padding-right: calc(var(--select-arrow-size) + 0.5rem) !important;
  background-position: right 0.75rem center;
}

select.select-custom:focus-visible {
  box-shadow: 0 0 0 4px rgba(251,113,133,0.12);
}

/* Override untuk select wrapper */
.select-wrapper select.select-custom {
  padding-right: calc(var(--select-arrow-size) + 0.5rem) !important;
}

/* Custom grid untuk dashboard - 3 kolom layout */
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (width >= 48rem) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Custom utilities untuk class yang tidak tersedia di base.min.css */
.bg-opacity-50 {
  background-color: color-mix(in srgb, currentColor 50%, transparent);
}

.max-h-\[80vh\] {
  max-height: 80vh;
}

.hover\:text-gray-700:hover {
  color: var(--color-gray-700);
}

.hover\:text-gray-500:hover {
  color: var(--color-gray-500);
}

/* Enhanced table styling */
table {
  border-collapse: collapse;
  width: 100%;
}

/* Table row hover effects */
tbody tr:hover {
  background-color: var(--color-gray-50);
}

/* Better spacing for table actions */
.space-x-2 > * + * {
  margin-left: 0.5rem;
}

/* Enhanced table borders */
tbody tr {
  border-top: 1px solid var(--color-gray-200);
}

tbody tr:first-child {
  border-top: none;
}

/* Better table cell padding consistency */
th, td {
  padding: 0.75rem;
}

/* Enhanced table header styling */
thead th {
  font-weight: 600;
  color: var(--color-gray-700);
  background-color: var(--color-gray-50);
  border-bottom: 2px solid var(--color-gray-200);
}

/* Better link styling in tables */
tbody a {
  text-decoration: none;
  transition: color 0.15s ease;
}

tbody a:hover {
  text-decoration: underline;
}

/* Enhanced button styling in tables */
tbody button {
  transition: all 0.15s ease;
}

tbody button:hover {
  transform: translateY(-1px);
}

/* Zebra striping for better readability */
tbody tr:nth-child(even) {
  background-color: var(--color-gray-25, #fafafa);
}

tbody tr:nth-child(even):hover {
  background-color: var(--color-gray-100);
}

/* Enhanced table container styling */
.table-container {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Better responsive table styling */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .table-responsive th,
  .table-responsive td {
    padding: 0.5rem;
  }
}

/* Enhanced action buttons in tables */
.table-action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.table-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Better form styling in tables */
.table-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-form input {
  min-width: 200px;
  flex: 1;
}

/* Enhanced empty state styling */
.table-empty {
  text-align: center;
  padding: 2rem;
  color: var(--color-gray-500);
  font-style: italic;
}

/* Better table loading states */
.table-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Enhanced table sorting indicators */
.table-sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.table-sortable:hover {
  background-color: var(--color-gray-100);
}

.table-sortable::after {
  content: '↕';
  position: absolute;
  right: 0.5rem;
  opacity: 0.5;
  font-size: 0.75rem;
}

.table-sortable.asc::after {
  content: '↑';
  opacity: 1;
}

.table-sortable.desc::after {
  content: '↓';
  opacity: 1;
}

/* Better table pagination styling */
.table-pagination {
  display: flex;
  justify-content: between;
  align-items: center;
  padding: 1rem;
  border-top: 1px solid var(--color-gray-200);
  background-color: var(--color-gray-50);
}

/* Enhanced table search/filter styling */
.table-filters {
  padding: 1rem;
  background-color: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
}

.table-filters .form-control {
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .table-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .table-filters .form-control {
    margin-bottom: 0;
    flex: 1;
  }
}

/* Missing Tailwind classes untuk kompatibilitas v4.1.14 */
.bg-rose-700\/50 {
  background-color: color-mix(in srgb, var(--color-rose-700) 50%, transparent);
}

.w-11\/12 {
  width: calc(11/12 * 100%);
}

.max-h-\[60vh\] {
  max-height: 60vh;
}

.max-h-\[80vh\] {
  max-height: 80vh;
}

.text-rose-700 {
  color: var(--color-rose-700);
}

