/**
 * Outlook TaskNotes Integration Styles
 */

/* TaskNotes button in Outlook toolbar */
.tasknotes-outlook-button {
  background: #2563eb !important;
  color: white !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  margin-left: 8px !important;
  font-size: 13px !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  min-height: 32px !important;
  transition: background-color 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.tasknotes-outlook-button:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

.tasknotes-outlook-button:active {
  background: #1e40af !important;
  transform: translateY(1px) !important;
}

.tasknotes-outlook-button:focus {
  outline: 2px solid #60a5fa !important;
  outline-offset: 2px !important;
}

/* Ensure button doesn't break Outlook layout */
.tasknotes-outlook-button {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* TaskNotes notification styling for Outlook */
.tasknotes-outlook-notification {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  padding: 12px 16px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  font-weight: 400 !important;
  z-index: 10000 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  max-width: 300px !important;
  word-wrap: break-word !important;
  animation: tasknotes-outlook-slide-in 0.3s ease-out !important;
}

.tasknotes-outlook-notification.success {
  background: #10b981 !important;
  color: white !important;
}

.tasknotes-outlook-notification.error {
  background: #ef4444 !important;
  color: white !important;
}

.tasknotes-outlook-notification.info {
  background: #3b82f6 !important;
  color: white !important;
}

/* Animation for notification */
@keyframes tasknotes-outlook-slide-in {
  from {
    transform: translateX(100%) !important;
    opacity: 0 !important;
  }
  to {
    transform: translateX(0) !important;
    opacity: 1 !important;
  }
}

/* Integration with Outlook command bar */
.ms-CommandBar .tasknotes-outlook-button {
  height: 32px !important;
  padding: 0 12px !important;
  margin: 0 4px !important;
}

/* Integration with modern Outlook toolbar */
[data-testid="toolbar"] .tasknotes-outlook-button {
  height: 36px !important;
  border-radius: 2px !important;
  font-size: 14px !important;
}

/* Loading state */
.tasknotes-outlook-button[disabled] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

.tasknotes-outlook-button.loading::after {
  content: '' !important;
  width: 12px !important;
  height: 12px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-top: 2px solid white !important;
  border-radius: 50% !important;
  animation: tasknotes-spin 1s linear infinite !important;
  margin-left: 6px !important;
}

@keyframes tasknotes-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tasknotes-outlook-button {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-height: 28px !important;
  }
  
  .tasknotes-outlook-notification {
    right: 10px !important;
    top: 10px !important;
    max-width: calc(100vw - 40px) !important;
    font-size: 13px !important;
  }
}

/* Dark theme support (Outlook dark mode) */
@media (prefers-color-scheme: dark) {
  .tasknotes-outlook-button {
    background: #0078d4 !important;
  }
  
  .tasknotes-outlook-button:hover {
    background: #106ebe !important;
  }
  
  .tasknotes-outlook-button:active {
    background: #005a9e !important;
  }
}