/**
 * Quick Capture Styles
 * Dashboard quick add input bar
 */

/* Quick capture container */
.quick-capture {
  margin-bottom: 1.5rem;
}

.quick-capture-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--content-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-capture-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.quick-capture-icon {
  font-size: 1.25rem;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.quick-capture-wrapper:focus-within .quick-capture-icon {
  opacity: 1;
}

.quick-capture-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--content-text);
  outline: none;
  min-width: 0;
}

.quick-capture-input::placeholder {
  color: var(--content-text);
  opacity: 0.4;
}

/* Type indicator */
.quick-capture-type {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--hover-bg);
  border-radius: 6px;
  color: var(--content-text);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.quick-capture-type.visible {
  opacity: 1;
  transform: scale(1);
}

.quick-capture-type-icon {
  font-size: 0.875rem;
}

.quick-capture-type.type-task {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.quick-capture-type.type-expense {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.quick-capture-type.type-event {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.quick-capture-type.type-note {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

[data-theme="dark"] .quick-capture-type.type-task {
  background: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .quick-capture-type.type-expense {
  background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .quick-capture-type.type-event {
  background: rgba(168, 85, 247, 0.2);
}

[data-theme="dark"] .quick-capture-type.type-note {
  background: rgba(245, 158, 11, 0.2);
}

/* Submit button */
.quick-capture-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.3;
  transform: scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.quick-capture-submit:hover {
  background: var(--primary-hover, #5a6fd6);
}

.quick-capture-submit.active {
  opacity: 1;
  transform: scale(1);
}

.quick-capture-submit:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.quick-capture-submit-icon {
  font-size: 1.125rem;
  line-height: 1;
}

/* Loading state */
.quick-capture-submit.loading .quick-capture-submit-icon {
  display: none;
}

.quick-capture-submit.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: quick-capture-spin 0.6s linear infinite;
}

@keyframes quick-capture-spin {
  to { transform: rotate(360deg); }
}

/* Hints below input */
.quick-capture-hints {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
  font-size: 0.7rem;
  color: var(--content-text);
  opacity: 0.4;
}

.quick-capture-hint {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.quick-capture-hint kbd {
  padding: 0.1rem 0.3rem;
  font-size: 0.65rem;
  font-family: inherit;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

/* Preview area */
.quick-capture-preview {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--hover-bg);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--content-text);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: none;
}

.quick-capture-preview.visible {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.quick-capture-preview-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.quick-capture-preview-row:last-child {
  margin-bottom: 0;
}

.quick-capture-preview-label {
  font-weight: 500;
  opacity: 0.6;
  min-width: 70px;
}

.quick-capture-preview-value {
  flex: 1;
}

/* Success animation */
.quick-capture-success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--content-bg);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.quick-capture-wrapper.success .quick-capture-success {
  opacity: 1;
  visibility: visible;
}

.quick-capture-success-icon {
  font-size: 1.5rem;
  animation: quick-capture-success-bounce 0.4s ease;
}

@keyframes quick-capture-success-bounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .quick-capture-hints {
    display: none;
  }
  
  .quick-capture-wrapper {
    padding: 0.75rem;
  }
  
  .quick-capture-input {
    font-size: 0.9375rem;
  }
}
