/* Hide myko-admin-only columns by default */
.myko-admin-only {
  display: none !important;
}

/* Show myko-admin-only columns when user is myko admin */
.show-admin-columns .myko-admin-only {
  display: table-cell !important;
}

/* Hide toast-only columns by default */
.toast-only {
  display: none !important;
}

/* Show toast-only columns when instance URL contains 'toast' */
.show-toast-columns .toast-only {
  display: table-cell !important;
}

/* Remove hover effects and clickable styling from table rows */
.data-table tbody tr {
  cursor: default !important;
}

.data-table tbody tr:hover {
  background-color: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Remove hover effects and clickable styling from user cards */
.user-card {
  cursor: default !important;
}

.user-card:hover {
  background-color: transparent !important;
  transform: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.modal-close {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.modal-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.form-field {
  margin-bottom: 20px;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.form-value {
  margin: 0;
  color: #111827;
  font-weight: 500;
}

.form-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: white;
  color: #374151;
  border-color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f9fafb;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2563eb;
}

/* User card button styles for mobile */
.user-card-button-primary {
  background-color: #3b82f6 !important;
  color: white !important;
}

.user-card-button-primary:hover {
  background-color: #2563eb !important;
}

/* Action dropdown styles */
.cell-actions {
  white-space: nowrap;
  position: relative;
}

.action-dropdown {
  position: relative;
  display: inline-block;
}

.action-dropdown-toggle {
  border: none;
  background: none;
  cursor: pointer;
}

.action-dropdown-menu {
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  position: fixed;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  min-width: 180px;
  padding: 8px 0;
  display: none;
}

.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.action-dropdown-item:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.action-dropdown-item svg {
  flex-shrink: 0;
  color: #6b7280;
}

.action-dropdown-item:hover svg {
  color: #374151;
}

/* Mobile action dropdown styles */
.mobile-action-dropdown {
  position: relative;
  width: 100%;
}

.mobile-dropdown-toggle {
  width: 100%;
  position: relative;
}

.mobile-action-menu {
  position: static;
  margin-top: 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  padding: 8px 0;
  display: none;
}

.mobile-action-item {
  display: block;
  padding: 12px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border-bottom: 1px solid #f3f4f6;
}

.mobile-action-item:last-child {
  border-bottom: none;
}

.mobile-action-item:hover {
  background-color: #f3f4f6;
  color: #111827;
}

/* Status badge styles */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-enabled {
  background-color: #dcfce7;
  color: #15803d;
}

.status-disabled {
  background-color: #fee2e2;
  color: #dc2626;
}

.status-deleted {
  background-color: #e5e7eb;
  color: #4b5563;
}

.user-row-deleted td,
.user-card-deleted {
  opacity: 0.65;
}

/* Danger action items */
.action-dropdown-item-danger {
  color: #dc2626 !important;
}

.action-dropdown-item-danger:hover {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
}

.action-dropdown-item-danger svg {
  color: #dc2626 !important;
}

.action-dropdown-item-danger:hover svg {
  color: #b91c1c !important;
}

.mobile-action-item-danger {
  color: #dc2626 !important;
}

.mobile-action-item-danger:hover {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
}

/* User name link styles */
.user-name-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.user-name-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Override h3 styles in user cards */
.user-card-title h3 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.user-card-title h3 .user-name-link {
  color: inherit;
  font-weight: inherit;
}

.user-card-title h3 .user-name-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* Filter select styles */
.filter-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  color: #374151;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:hover {
  border-color: #9ca3af;
}
