/**
 * Modern Tooltip Styles for Salon Booking Calendar
 * Replaces legacy Bootstrap tooltip styling with modern, accessible design
 */

.sln-tooltip-container {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.sln-tooltip-container.sln-tooltip--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sln-tooltip-content {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 320px;
  min-width: 280px;
  font-size: 14px;
  line-height: 1.4;
}

.sln-booking-tooltip {
  position: relative;
}

.sln-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e5e9;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.sln-tooltip-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  flex: 1;
  padding-right: 8px;
}

.sln-tooltip-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #6c757d;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  line-height: 1;
}

.sln-tooltip-close:hover {
  background-color: #e9ecef;
  color: #495057;
}

.sln-tooltip-body {
  padding: 16px;
}

.sln-tooltip-details {
  margin-bottom: 16px;
}

.sln-tooltip-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f4;
}

.sln-tooltip-detail:last-child {
  border-bottom: none;
}

.sln-tooltip-label {
  font-weight: 500;
  color: #495057;
  font-size: 13px;
}

.sln-tooltip-value {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.sln-tooltip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sln-tooltip-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #dee2e6;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #495057;
  font-size: 14px;
}

.sln-tooltip-action:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  color: #2c3e50;
  transform: translateY(-1px);
}

.sln-tooltip-action:active {
  transform: translateY(0);
}

.sln-tooltip-action.sln-tooltip-edit:hover {
  background: #e3f2fd;
  border-color: #2196f3;
  color: #1976d2;
}

.sln-tooltip-action.sln-tooltip-duplicate:hover {
  background: #f3e5f5;
  border-color: #9c27b0;
  color: #7b1fa2;
}

.sln-tooltip-action.sln-tooltip-no-show:hover {
  background: #fff3e0;
  border-color: #ff9800;
  color: #f57c00;
}

.sln-tooltip-action.sln-tooltip-customer:hover {
  background: #e8f5e8;
  border-color: #4caf50;
  color: #388e3c;
}

.sln-tooltip-action.sln-tooltip-delete:hover {
  background: #ffebee;
  border-color: #f44336;
  color: #d32f2f;
}

.sln-tooltip-action.active {
  background: #ff9800;
  border-color: #ff9800;
  color: #fff;
}

.sln-tooltip-action.sln-pro-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

.sln-tooltip-action.sln-pro-disabled:hover {
  background: #fff;
  border-color: #dee2e6;
  color: #6c757d;
  transform: none;
}

.sln-tooltip-confirm-delete {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.sln-tooltip-confirm-content {
  text-align: center;
  padding: 20px;
}

.sln-tooltip-confirm-content p {
  margin: 0 0 16px 0;
  font-weight: 600;
  color: #dc3545;
}

.sln-tooltip-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.sln-btn {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.sln-btn--danger {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.sln-btn--danger:hover {
  background: #c82333;
  border-color: #bd2130;
}

.sln-btn--secondary {
  background: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

.sln-btn--secondary:hover {
  background: #5a6268;
  border-color: #545b62;
}

/* Pro feature styling */
.sln-pro-feature {
  position: relative;
}

.sln-pro-feature::after {
  content: 'PRO';
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff9800;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
}

/* Accessibility improvements */
.sln-tooltip-container:focus-within {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.sln-tooltip-action:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Animation for tooltip appearance */
@keyframes sln-tooltip-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sln-tooltip-container.sln-tooltip--visible .sln-tooltip-content {
  animation: sln-tooltip-fade-in 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sln-tooltip-content {
    max-width: 280px;
    min-width: 240px;
  }

  .sln-tooltip-actions {
    gap: 6px;
  }

  .sln-tooltip-action {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* Dark mode support */
/* @media (prefers-color-scheme: dark) {
  .sln-tooltip-content {
    background: #2c3e50;
    border-color: #34495e;
    color: #ecf0f1;
  }

  .sln-tooltip-header {
    background: #34495e;
    border-bottom-color: #4a5f7a;
  }

  .sln-tooltip-title {
    color: #ecf0f1;
  }

  .sln-tooltip-close {
    color: #bdc3c7;
  }

  .sln-tooltip-close:hover {
    background-color: #4a5f7a;
    color: #ecf0f1;
  }

  .sln-tooltip-detail {
    border-bottom-color: #4a5f7a;
  }

  .sln-tooltip-label {
    color: #bdc3c7;
  }

  .sln-tooltip-value {
    color: #ecf0f1;
  }

  .sln-tooltip-action {
    background: #34495e;
    border-color: #4a5f7a;
    color: #bdc3c7;
  }

  .sln-tooltip-action:hover {
    background: #4a5f7a;
    border-color: #5a6f8a;
    color: #ecf0f1;
  }
} */
