:root {
  --primary: #3b82f6;
  --secondary: #8b5cf6;
  --background: #111827;
  --card-background: #1f2937;
  --text: #f3f4f6;
  --border: #374151;
  --selected: #4338ca;
  --locked: #60a5fa;
  --copied: #059669;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--text);
}

.calendar-container {
  scrollbar-width: thin;
  scrollbar-color: var(--secondary) var(--card-background);
  max-width: 1000px;
  margin: 0 auto;
  background-color: var(--card-background);
  border-radius: 0.75rem;
  overflow: hidden;
  max-height: 40vh;
}

.calendar-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.calendar-container::-webkit-scrollbar-track {
  background: var(--card-background);
}

.calendar-container::-webkit-scrollbar-thumb {
  background-color: var(--secondary);
  border-radius: 3px;
}

table {
  border-collapse: separate;
  border-spacing: 1px;
}

th, td {
  text-align: center;
  padding: 4px;
  font-size: 0.75rem;
}

th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #2d3748;
}

td {
  transition: all 0.1s ease;
  border: 1px solid var(--border);
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  position: relative;
}

td:not(:first-child):hover {
  background-color: rgba(59, 130, 246, 0.2);
  z-index: 10;
}

.selected {
  background-color: var(--selected);
  color: white;
  border-radius: 0.3rem; /* Add this line for rounded corners */
}

.locked {
  background-color: var(--locked);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 0.3rem; /* Add this line for rounded corners */
}

.locked::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.copied {
  background-color: var(--copied);
  color: white;
}

.btn {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.btn-primary {
  background-color: #4f46e5;
  color: white;
}

.btn-primary:hover {
  background-color: #4338ca;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background-color: #7c3aed;
  color: white;
}

.btn-secondary:hover {
  background-color: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(124, 58, 237, 0.4);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.5s ease-out;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
}

td:first-child, th:first-child {
  border: none;
}

td.locked:hover {
  background-color: #4338ca;
}

td.selected:hover {
  background-color: #2c5282;
}

.modal-open {
  overflow: hidden;
}

.modal-open .calendar-container {
  pointer-events: none;
}

.modal-open .fixed.inset-0 {
  z-index: 9999;
}

.modal-open .calendar-container thead th {
  z-index: auto !important;
}

.fixed.inset-0.bg-black.bg-opacity-50.flex.items-center.justify-center {
  z-index: 9999;
}

.calendar-container thead th {
  z-index: 20;
}

.modal-content {
  background-color: #1f2937;
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 90%;
  width: 400px;
  z-index: 1001;
}

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  color: white;
  z-index: 10000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toast-success {
  background-color: var(--copied);
}

.toast-error {
  background-color: #e3342f;
}

.emoji-button {
  transition: all 0.3s ease;
}

.emoji-button:hover {
  transform: scale(1.2);
}

.emoji-button.selected {
  background-color: var(--primary);
  color: white;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.fade-out {
  animation: fadeOut 1s ease-out;
}

.fade-in {
  animation: fadeIn 1s ease-in;
}

/* Custom scrollbar styles */
.custom-scrollbar, .calendar-container {
  scrollbar-width: thin;
  scrollbar-color: var(--secondary) var(--card-background);
}

.custom-scrollbar::-webkit-scrollbar, .calendar-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track, .calendar-container::-webkit-scrollbar-track {
  background: var(--card-background);
}

.custom-scrollbar::-webkit-scrollbar-thumb, .calendar-container::-webkit-scrollbar-thumb {
  background-color: var(--secondary);
  border-radius: 3px;
}

/* Common transitions */
.transition-all {
  transition: all 0.3s ease;
}

/* Consolidated timezone select styles */
.timezone-select-container {
  position: relative;
}

.timezone-select-container select {
  appearance: none;
  background-color: var(--card-background);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.5rem 2rem 0.5rem 1rem;
  width: 100%;
  cursor: pointer;
}

.timezone-select-container::after {
  content: '\25BC';
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text);
}

.timezone-select-container select option {
  background-color: var(--card-background);
  color: var(--text);
  padding: 0.5rem;
}

.timezone-select-container select option:hover,
.timezone-select-container select option:focus,
.timezone-select-container select option:active,
.timezone-select-container select option:checked {
  background-color: var(--secondary) !important;
  color: white !important;
  box-shadow: 0 0 0 100px var(--secondary) inset !important;
}

/* Consolidated custom dropdown styles */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown .selected-option {
  background-color: #374151;
  border: 1px solid #4B5563;
}

.custom-dropdown .selected-option:hover {
  background-color: #4B5563;
}

.custom-dropdown .arrow {
  transition: transform 0.3s ease;
}

.custom-dropdown.open .arrow {
  transform: rotate(180deg);
}

.custom-dropdown .options {
  background-color: #1F2937;
  border: 1px solid #4B5563;
  max-height: 200px;
  overflow-y: auto;
}

.custom-dropdown .option {
  transition: background-color 0.3s ease;
}

.custom-dropdown .option:hover {
  background-color: var(--secondary);
  color: white;
}

/* Dropdown container styles */
.dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  bottom: calc(100% + 3px);
  left: 0;
  width: max-content;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  background-color: var(--card-background);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1), 0 -1px 3px rgba(0, 0, 0, 0.08); /* Adjust shadow for top positioning */
  z-index: 1000;
  transform: translateY(10px);
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text);
  transition: background-color 0.2s ease;
  font-size: 0.875rem;
}

.dropdown-menu button:hover {
  background-color: var(--secondary);
}

/* Add this new style for the table cells */
td {
  position: relative;
}

/* Apply transition to elements that use the common transition */
.btn,
.emoji-button,
.dropdown-container button,
.dropdown-container .absolute {
  transition: all 0.3s ease;
}
