@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  .card {
    @apply bg-white rounded-lg shadow-md;
  }

  .section-title {
    @apply text-xl font-semibold text-gray-800 mb-4;
  }

  .btn-primary {
    @apply bg-blue-600 hover:bg-blue-700 text-white rounded-md transition duration-150 ease-in-out;
  }

  .btn-secondary {
    @apply bg-gray-200 hover:bg-gray-300 text-gray-700 rounded-md transition duration-150 ease-in-out;
  }

  .btn-danger {
    @apply bg-red-600 hover:bg-red-700 text-white rounded-md transition duration-150 ease-in-out;
  }

  .sidebar-link {
    @apply flex items-center text-gray-600 hover:text-blue-600 py-2 px-3 rounded-md transition duration-150 ease-in-out;
  }

  .sidebar-link.active {
    @apply bg-blue-50 text-blue-600;
  }

  .sidebar-link i {
    @apply mr-3 w-5 text-center;
  }

  /* Day borders in program grid */
  .day-border {
    @apply border-r-2 border-blue-300;
  }

  /* Platform color classes */
  .distributor-the-joke {
    @apply text-violet-500;
  }

  .distributor-the-joke i {
    @apply text-violet-500;
  }

  .distributor-billetreduc {
    @apply text-red-500;
  }

  .distributor-billetreduc i {
    @apply text-red-500;
  }

  .distributor-fever {
    @apply text-green-500;
  }

  .distributor-fever i {
    @apply text-green-500;
  }

  .distributor-ticketac {
    @apply text-pink-500;
  }

  .distributor-ticketac i {
    @apply text-pink-500;
  }

  .distributor-billetweb {
    @apply text-blue-500;
  }

  .distributor-billetweb i {
    @apply text-blue-500;
  }

  .distributor-shop-ta-place {
    @apply text-orange-500;
  }

  .distributor-shop-ta-place i {
    @apply text-orange-500;
  }

  .distributor-fnac {
    @apply text-indigo-500;
  }

  .distributor-fnac i {
    @apply text-indigo-500;
  }

  .distributor-sur-place {
    @apply text-green-600;
  }

  .distributor-sur-place i {
    @apply text-green-600;
  }

  .distributor-invitations {
    @apply text-purple-500;
  }

  .distributor-invitations i {
    @apply text-purple-500;
  }

  /* Weather selector styles */
  .weather-selector {
    @apply transition-all duration-150 ease-in-out;
  }

  .weather-selector:hover {
    @apply scale-110;
  }

  /* Tooltip styles */
  [data-tooltip="tooltip"] {
    @apply relative cursor-help;
  }

  [data-tooltip="tooltip"]:hover::after {
    content: attr(title);
    @apply absolute z-50 px-3 py-2 text-sm text-white bg-gray-900 rounded-lg shadow-lg;
    @apply bottom-full left-1/2 transform -translate-x-1/2 mb-2;
    @apply opacity-100 pointer-events-none;
    @apply whitespace-nowrap max-w-xs;
    min-width: max-content;
  }

  [data-tooltip="tooltip"]:hover::before {
    content: '';
    @apply absolute z-50 border-4 border-transparent border-t-gray-900;
    @apply bottom-full left-1/2 transform -translate-x-1/2 -mb-1;
  }

  /* Ensure tooltips are visible even in table cells */
  td [data-tooltip="tooltip"]:hover::after {
    @apply fixed;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }
}