/* Custom Dropdown Styles */
.custom-select-container {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 120px;
}

.custom-select-trigger {
  border: 1px solid var(--border-color);
  background: var(--bg-base);
  color: var(--text-primary);
  transition: all 0.2s;
}

.custom-select-trigger:hover {
  border-color: var(--text-tertiary);
}

.custom-select-trigger:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  color: var(--text-primary);
}

.custom-select-option {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: background-color 0.2s;
  color: var(--text-primary);
}

.custom-select-option:hover {
  background-color: var(--bg-subtle);
}

.custom-select-option:active {
  background-color: var(--border-color);
}

.custom-date-container,
.custom-time-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-date-trigger,
.custom-time-trigger {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  text-align: left;
  cursor: pointer;
  font-size: var(--text-sm);
  transition: all 0.2s;
  color: var(--text-primary);
}

.custom-date-trigger:hover,
.custom-time-trigger:hover {
  border-color: var(--text-tertiary);
}

.custom-date-trigger:focus,
.custom-time-trigger:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Global confirmation modal */
.app-confirm-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.45);
  z-index: var(--z-modal-backdrop);
}

.app-confirm-overlay.show {
  display: flex;
}

.app-confirm-card {
  width: min(420px, 100%);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg, 0 24px 48px rgba(15, 23, 42, 0.2));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-confirm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.app-confirm-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
}

.app-confirm-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
}

.app-confirm-close:hover {
  color: var(--text-strong);
  background: var(--hover);
}

.app-confirm-body {
  padding: 1.25rem 1.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-confirm-message {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.app-confirm-description {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.app-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.app-confirm-button {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.app-confirm-button.primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.app-confirm-button.primary:hover {
  background: var(--primary-strong, var(--primary));
  transform: translateY(-1px);
}

.app-confirm-button.secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.app-confirm-button.secondary:hover {
  background: var(--hover);
}

/* Calendar-specific dropdown styling */
.filter-inline .custom-select-container {
  min-width: 80px;
  max-width: 120px;
}

.filter-inline .custom-select-trigger {
  padding: 0.4rem 0.65rem;
  font-size: var(--text-xs);
  min-width: 80px;
  max-width: 120px;
}

/* Ensure custom dropdown containers have proper positioning context */
.custom-select-container,
.custom-date-container,
.custom-time-container {
  position: relative;
}
