/* =================================================================
   EXCAMAR AI COPILOT CSS
   Floating Action Button + Smart Prompt Studio Modal + Config Panel
   With Selection Edit Mode & Personal Library Integration
   ================================================================= */

/* Floating Action Button */
#excamar-ai-btn {
  position: fixed;
  bottom: 132px;
  right: 24px;
  z-index: 9990;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #3b82f6 100%);
  background-size: 200% 200%;
  animation: ai-glow-pulse 4s ease infinite;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  outline: none;
}

@keyframes ai-glow-pulse {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4), 0 0 0 0 rgba(236, 72, 153, 0.4);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 0 6px 22px rgba(236, 72, 153, 0.5), 0 0 0 6px rgba(124, 58, 237, 0);
  }
  100% {
    background-position: 0% 50%;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4), 0 0 0 0 rgba(236, 72, 153, 0);
  }
}

#excamar-ai-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.6), 0 4px 12px rgba(236, 72, 153, 0.4);
}

#excamar-ai-btn:active {
  transform: scale(0.95);
}

#excamar-ai-btn svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Tooltip */
#excamar-ai-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: inherit;
}

#excamar-ai-btn:hover::before {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Modal Overlay */
#excamar-ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#excamar-ai-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Modal Window */
#excamar-ai-dialog {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  background: #ffffff;
  color: #0f172a;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#excamar-ai-overlay.open #excamar-ai-dialog {
  transform: translateY(0) scale(1);
}

/* Dark Mode Modal */
.dark #excamar-ai-dialog,
[data-theme="dark"] #excamar-ai-dialog {
  background: #1e1e2e;
  color: #f8fafc;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Modal Header */
.ai-modal-header {
  padding: 18px 24px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dark .ai-modal-header,
[data-theme="dark"] .ai-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(236, 72, 153, 0.15));
  color: #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark .ai-header-icon,
[data-theme="dark"] .ai-header-icon {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.25));
  color: #a78bfa;
}

.ai-header-icon svg {
  width: 20px;
  height: 20px;
}

.ai-header-title-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ai-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-modal-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.ai-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.2);
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .ai-badge,
[data-theme="dark"] .ai-badge {
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.25);
}

.ai-lib-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.dark .ai-lib-badge,
[data-theme="dark"] .ai-lib-badge {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.ai-header-subinfo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-mode-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 6px;
}

.ai-mode-badge.create {
  background: #ede9fe;
  color: #6d28d9;
}

.dark .ai-mode-badge.create {
  background: #3b3254;
  color: #c4b5fd;
}

.ai-mode-badge.edit {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.dark .ai-mode-badge.edit {
  background: #78350f;
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.3);
}

.ai-workspace-tag {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
}

.ai-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-settings-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-settings-toggle-btn:hover,
.ai-settings-toggle-btn.active {
  background: #ede9fe;
  color: #7c3aed;
  border-color: #c4b5fd;
}

.dark .ai-settings-toggle-btn {
  background: #27273a;
  border-color: #3b3b52;
  color: #cbd5e1;
}

.dark .ai-settings-toggle-btn:hover,
.dark .ai-settings-toggle-btn.active {
  background: #3b3254;
  color: #c4b5fd;
  border-color: #7c3aed;
}

.ai-modal-close {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  transition: background-color 0.15s, color 0.15s;
}

.ai-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

.dark .ai-modal-close:hover,
[data-theme="dark"] .ai-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

/* Collapsible Settings Panel */
.ai-settings-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.25s ease;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.dark .ai-settings-panel {
  background: #161622;
  border-bottom-color: #2e2e42;
}

.ai-settings-panel.open {
  max-height: 480px;
  padding: 16px 24px;
}

.ai-settings-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ai-settings-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-cfg-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.dark .ai-cfg-label {
  color: #cbd5e1;
}

.ai-cfg-hint {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.dark .ai-cfg-hint {
  color: #94a3b8;
}

.ai-cfg-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ai-cfg-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.dark .ai-cfg-input {
  border-color: #3b3b52;
  background: #1f1f2e;
}

.dark .ai-cfg-input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.ai-model-preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.ai-model-pill {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-model-pill:hover {
  border-color: #8b5cf6;
  color: #7c3aed;
}

.ai-model-pill.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.dark .ai-model-pill {
  border-color: #3b3b52;
  background: #27273a;
  color: #cbd5e1;
}

.dark .ai-model-pill:hover {
  border-color: #a78bfa;
  color: #c4b5fd;
}

.dark .ai-model-pill.active {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #8b5cf6;
}

.ai-settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.ai-btn-text {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
}

.ai-btn-text:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.ai-btn-small-primary {
  background: #7c3aed;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.ai-btn-small-primary:hover {
  background: #6d28d9;
}

/* Modal Body */
.ai-modal-body {
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Active Config Info Banner */
.ai-active-config-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 8px;
  font-size: 11.5px;
}

.dark .ai-active-config-bar {
  background: rgba(167, 139, 250, 0.08);
  border-color: rgba(167, 139, 250, 0.18);
}

.ai-cfg-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
}

.dark .ai-cfg-summary {
  color: #cbd5e1;
}

.ai-endpoint-badge {
  font-family: monospace;
  font-size: 11px;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .ai-endpoint-badge {
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.15);
}

/* Selection Context Card */
.ai-sel-context-card {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fefce8;
  border: 1px solid #fde047;
  color: #854d0e;
}

.dark .ai-sel-context-card {
  background: #422006;
  border-color: #a16207;
  color: #fef08a;
}

.ai-sel-context-card.active {
  display: flex;
}

.ai-sel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-sel-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-sel-icon {
  font-size: 14px;
}

.ai-sel-label {
  font-size: 12px;
  font-weight: 700;
}

.ai-btn-save-sel {
  background: #ffffff;
  color: #b45309;
  border: 1px solid #fcd34d;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-btn-save-sel:hover {
  background: #fef3c7;
  color: #92400e;
}

.dark .ai-btn-save-sel {
  background: #78350f;
  border-color: #d97706;
  color: #fef3c7;
}

.dark .ai-btn-save-sel:hover {
  background: #92400e;
}

.ai-sel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-sel-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .ai-sel-chip {
  background: #1e1e2e;
  color: #e2e8f0;
  border-color: #3b3b54;
}

.ai-sel-chip-more {
  font-size: 11px;
  color: #64748b;
  align-self: center;
}

.ai-sel-hint {
  font-size: 11px;
  opacity: 0.85;
}

/* Library Shelf Card */
.ai-lib-shelf-card {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.dark .ai-lib-shelf-card,
[data-theme="dark"] .ai-lib-shelf-card {
  background: #052e16;
  border-color: #16a34a;
  color: #bbf7d0;
}

.ai-lib-shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-lib-shelf-title {
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-lib-shelf-hint {
  font-size: 11px;
  opacity: 0.85;
}

.ai-lib-chips-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 80px;
  overflow-y: auto;
}

.ai-lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: #ffffff;
  color: #15803d;
  border: 1px solid #bbf7d0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ai-lib-chip:hover {
  background: #dcfce7;
  color: #166534;
  border-color: #4ade80;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.ai-lib-chip:active {
  transform: translateY(0);
}

.dark .ai-lib-chip,
[data-theme="dark"] .ai-lib-chip {
  background: #14532d;
  color: #dcfce7;
  border-color: #16a34a;
}

.dark .ai-lib-chip:hover,
[data-theme="dark"] .ai-lib-chip:hover {
  background: #166534;
  border-color: #22c55e;
}

.ai-lib-chip-icon {
  font-size: 13px;
  line-height: 1;
}

.ai-lib-chip-name {
  font-size: 11.5px;
}

/* Prompt Box Container */
.ai-prompt-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-prompt-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dark .ai-prompt-label,
[data-theme="dark"] .ai-prompt-label {
  color: #cbd5e1;
}

.ai-prompt-hint {
  font-size: 11.5px;
  font-weight: normal;
  color: #64748b;
}

.dark .ai-prompt-hint,
[data-theme="dark"] .ai-prompt-hint {
  color: #94a3b8;
}

/* Smart Textarea */
.ai-textarea-wrapper {
  position: relative;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ai-textarea-wrapper:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: #ffffff;
}

.dark .ai-textarea-wrapper,
[data-theme="dark"] .ai-textarea-wrapper {
  border-color: #334155;
  background: #181825;
}

.dark .ai-textarea-wrapper:focus-within,
[data-theme="dark"] .ai-textarea-wrapper:focus-within {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
  background: #11111b;
}

#excamar-ai-prompt {
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
  max-height: 240px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

#excamar-ai-prompt::placeholder {
  color: #94a3b8;
}

.dark #excamar-ai-prompt::placeholder,
[data-theme="dark"] #excamar-ai-prompt::placeholder {
  color: #64748b;
}

/* Options Bar */
.ai-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.ai-style-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-opt-label {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.dark .ai-opt-label,
[data-theme="dark"] .ai-opt-label {
  color: #94a3b8;
}

.ai-pill-selector {
  display: inline-flex;
  padding: 3px;
  background: #e2e8f0;
  border-radius: 8px;
}

.dark .ai-pill-selector,
[data-theme="dark"] .ai-pill-selector {
  background: #28283d;
}

.ai-pill-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dark .ai-pill-btn,
[data-theme="dark"] .ai-pill-btn {
  color: #94a3b8;
}

.ai-pill-btn.active {
  background: #ffffff;
  color: #7c3aed;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .ai-pill-btn.active,
[data-theme="dark"] .ai-pill-btn.active {
  background: #3b3b54;
  color: #c4b5fd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Status / Generating indicator */
#excamar-ai-status {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.dark #excamar-ai-status,
[data-theme="dark"] #excamar-ai-status {
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.2);
}

#excamar-ai-status.active {
  display: flex;
}

.ai-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(124, 58, 237, 0.3);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}

.dark .ai-spinner,
[data-theme="dark"] .ai-spinner {
  border-color: rgba(167, 139, 250, 0.3);
  border-top-color: #a78bfa;
}

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

/* Modal Footer */
.ai-modal-footer {
  padding: 14px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dark .ai-modal-footer,
[data-theme="dark"] .ai-modal-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.ai-btn-secondary {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-btn-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dark .ai-btn-secondary,
[data-theme="dark"] .ai-btn-secondary {
  border-color: #475569;
  color: #94a3b8;
}

.dark .ai-btn-secondary:hover,
[data-theme="dark"] .ai-btn-secondary:hover {
  background: #2a2a3e;
  color: #f8fafc;
}

#excamar-ai-dialog .ai-btn-primary,
button#excamar-ai-generate {
  background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
  background-color: #7c3aed !important;
  color: #ffffff !important;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
  transition: all 0.15s ease;
}

.ai-btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.5);
}

.ai-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.ai-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Toast Notifications */
#excamar-ai-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 10001;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#excamar-ai-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#excamar-ai-toast.success {
  background: #065f46;
  border-color: #10b981;
}

#excamar-ai-toast.error {
  background: #991b1b;
  border-color: #ef4444;
}
