/* ========================================
   iOS-style Calendar Tooltip Styles
   ======================================== */

.calendar-tooltip {
  position: fixed;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  max-width: 320px;
  min-width: 280px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.calendar-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Tooltip Header */
.tooltip-header {
  padding: 16px 20px 12px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
  border-radius: 16px 16px 0 0;
}

.tooltip-title {
  font-size: 16px;
  font-weight: 700;
  color: #1c1c1e;
  line-height: 1.3;
  margin-bottom: 8px;
  word-wrap: break-word;
}

.tooltip-work-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tooltip-work-type.work-type-analysis {
  background: rgba(52, 199, 89, 0.15);
  color: #34C759;
}

.tooltip-work-type.work-type-development {
  background: rgba(0, 122, 255, 0.15);
  color: #007AFF;
}

.tooltip-work-type.work-type-testing {
  background: rgba(255, 149, 0, 0.15);
  color: #FF9500;
}

.tooltip-work-type.work-type-unknown {
  background: rgba(142, 142, 147, 0.15);
  color: #8E8E93;
}

/* Tooltip Body */
.tooltip-body {
  padding: 16px 20px 20px 20px;
}

.tooltip-section {
  margin-bottom: 16px;
}

.tooltip-section:last-child {
  margin-bottom: 0;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.tooltip-row:last-child {
  margin-bottom: 0;
}

.tooltip-label {
  font-size: 13px;
  font-weight: 600;
  color: #8e8e93;
  flex-shrink: 0;
  min-width: 80px;
  text-align: left;
}

.tooltip-value {
  font-size: 13px;
  font-weight: 500;
  color: #1c1c1e;
  text-align: right;
  flex-grow: 1;
  word-wrap: break-word;
}

/* Special styling for dates section */
.dates-section {
  background: rgba(120, 120, 128, 0.04);
  padding: 12px 16px;
  border-radius: 12px;
  margin: 16px -4px 16px -4px;
}

.dates-section .tooltip-label {
  color: #666;
  font-weight: 700;
}

.dates-section .tooltip-value {
  font-weight: 600;
  color: #1c1c1e;
}

/* Description section */
.tooltip-description {
  font-size: 13px;
  line-height: 1.4;
  color: #3c3c43;
  background: rgba(120, 120, 128, 0.04);
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px -4px 0 -4px;
  font-style: italic;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .calendar-tooltip {
    background: rgba(28, 28, 30, 0.95);
    border: 1px solid rgba(84, 84, 88, 0.3);
    box-shadow: 
      0 10px 40px rgba(0, 0, 0, 0.3),
      0 2px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  .tooltip-header {
    background: linear-gradient(135deg, rgba(44, 44, 46, 0.8) 0%, rgba(28, 28, 30, 0.6) 100%);
    border-bottom: 1px solid rgba(84, 84, 88, 0.2);
  }

  .tooltip-title {
    color: #ffffff;
  }

  .tooltip-label {
    color: #98989d;
  }

  .tooltip-value {
    color: #ffffff;
  }

  .dates-section {
    background: rgba(58, 58, 60, 0.3);
  }

  .dates-section .tooltip-label {
    color: #98989d;
  }

  .dates-section .tooltip-value {
    color: #ffffff;
  }

  .tooltip-description {
    background: rgba(58, 58, 60, 0.3);
    color: #d1d1d6;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .calendar-tooltip {
    max-width: 280px;
    min-width: 250px;
    font-size: 14px;
  }

  .tooltip-header {
    padding: 14px 16px 10px 16px;
  }

  .tooltip-title {
    font-size: 15px;
  }

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

  .tooltip-row {
    margin-bottom: 6px;
    gap: 8px;
  }

  .tooltip-label {
    font-size: 12px;
    min-width: 70px;
  }

  .tooltip-value {
    font-size: 12px;
  }

  .tooltip-work-type {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .calendar-tooltip {
    background: #ffffff;
    border: 2px solid #000000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  }

  .tooltip-title {
    color: #000000;
  }

  .tooltip-label {
    color: #666666;
  }

  .tooltip-value {
    color: #000000;
  }

  .tooltip-work-type {
    border: 1px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .calendar-tooltip {
    transition: opacity 0.1s ease;
  }

  .calendar-tooltip.show {
    transform: none;
  }
}

/* Print styles - hide tooltips when printing */
@media print {
  .calendar-tooltip {
    display: none !important;
  }
} 