/**
 * Natural Date Input Styles
 * Enhanced date input with natural language support
 */

/* Container */
.natural-date-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Text input */
.natural-date-text {
  flex: 1;
  padding-right: 70px !important; /* Space for preview and button */
}

.natural-date-input.focused .natural-date-text {
  border-color: var(--primary-color, #667eea);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Native date input (hidden by default) */
.natural-date-native {
  position: absolute;
  right: 28px;
  width: 24px;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Calendar button */
.natural-date-calendar-btn {
  position: absolute;
  right: 4px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.natural-date-calendar-btn:hover {
  opacity: 1;
  background: var(--hover-bg, #f3f4f6);
}

/* Preview badge */
.natural-date-preview {
  position: absolute;
  right: 36px;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary-color, #667eea);
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(4px);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.natural-date-preview.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Suggestions dropdown */
.natural-date-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--content-bg, white);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
  animation: naturalDateFadeIn 0.15s ease;
}

@keyframes naturalDateFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.natural-date-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  cursor: pointer;
  transition: background 0.1s ease;
}

.natural-date-suggestion:first-child {
  border-radius: 7px 7px 0 0;
}

.natural-date-suggestion:last-child {
  border-radius: 0 0 7px 7px;
}

.natural-date-suggestion:hover,
.natural-date-suggestion.selected {
  background: var(--hover-bg, #f9fafb);
}

.natural-date-suggestion.selected {
  background: rgba(102, 126, 234, 0.1);
}

.suggestion-text {
  font-size: 14px;
  color: var(--content-text, #1f2937);
  font-weight: 500;
  text-transform: capitalize;
}

.suggestion-date {
  font-size: 12px;
  color: var(--content-text-secondary, #6b7280);
}

/* Dark mode adjustments */
[data-theme="dark"] .natural-date-suggestions {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .natural-date-preview {
  background: rgba(102, 126, 234, 0.2);
}

/* Responsive */
@media (max-width: 480px) {
  .natural-date-preview {
    display: none;
  }
  
  .natural-date-text {
    padding-right: 36px !important;
  }
}
