/* ==========================================
   ADMIN ASSISTANT OVERLAY STYLES
   ========================================== */

/* Backdrop (dark overlay behind panel) */
.assistant-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Main overlay panel */
.assistant-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: var(--bg-dark);
    border-left: 1px solid var(--neon-cyan);
    box-shadow: -4px 0 20px rgba(0, 255, 255, 0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Header */
.assistant-header {
    height: 60px;
    background: var(--surface-dark);
    border-bottom: 1px solid var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
}

.assistant-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

/* Close button */
.close-btn {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    transform: scale(1.05);
}

.close-btn:active {
    transform: scale(0.95);
}

/* Body area (scrollable content container) */
.assistant-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
}

/* Custom scrollbar for assistant body */
.assistant-body::-webkit-scrollbar {
    width: 8px;
}

.assistant-body::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.assistant-body::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 4px;
}

.assistant-body::-webkit-scrollbar-thumb:hover {
    background: var(--neon-magenta);
}

/* Responsive: Full width on mobile */
@media (max-width: 768px) {
    .assistant-overlay {
        width: 100vw;
        border-left: none;
    }
}

/* ==========================================
   QUICK ACTIONS SECTION
   ========================================== */

/* Quick actions container (2x2 grid) */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Individual action button */
.action-btn {
    background: var(--surface-dark);
    border: 1px solid var(--neon-cyan);
    color: var(--text-light);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.action-btn:hover:not(:disabled) {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    transform: translateY(-2px);
}

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

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button icon */
.btn-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* Button label */
.btn-label {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* Loading spinner */
.btn-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 255, 255, 0.2);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Loading state for button */
.action-btn.loading {
    pointer-events: none;
}

/* ==========================================
   ASSISTANT SECTIONS
   ========================================== */

/* Assistant Sections */
.assistant-section {
  border-bottom: 1px solid var(--border-secondary);
}

.section-header {
  padding: 12px 20px;
  background: rgba(0, 217, 255, 0.05);
  border-bottom: 1px solid rgba(0, 217, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.section-header:hover {
  background: rgba(0, 217, 255, 0.08);
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-chevron {
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.section-header.expanded .section-chevron {
  transform: rotate(0deg);
}

.section-header.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.section-content {
  max-height: 200px;
  overflow-y: auto;
}

/* Suggestions */
.suggestions-list {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-card {
  background: rgba(18, 22, 31, 0.8);
  border-left: 3px solid var(--neon-orange);
  border-radius: 4px;
  padding: 10px;
  font-size: 12px;
}

.suggestion-card.suggestion-warning {
  border-left-color: var(--neon-orange);
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.2);
}

.suggestion-card.suggestion-error {
  border-left-color: var(--neon-red);
  box-shadow: 0 0 10px rgba(255, 68, 102, 0.2);
}

.suggestion-card.suggestion-info {
  border-left-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.suggestion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.suggestion-icon {
  font-size: 14px;
  line-height: 1;
}

.suggestion-title {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
}

.dismiss-btn {
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.dismiss-btn:hover {
  color: var(--neon-cyan);
}

.suggestion-description {
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.suggestion-action-btn {
  padding: 4px 8px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 3px;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggestion-action-btn:hover {
  background: rgba(0, 217, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
}

/* Empty state */
.empty-state {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}

/* Chat Area */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assistant-chat-msg .bubble {
  background: rgba(18, 22, 31, 0.6);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
}

.assistant-chat-msg.user .bubble {
  background: rgba(0, 217, 255, 0.1);
  border-color: rgba(0, 217, 255, 0.4);
}

.assistant-chat-msg.assistant .bubble {
  background: rgba(18, 22, 31, 0.8);
  border-color: rgba(185, 104, 255, 0.3);
}

.empty-chat-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

/* Chat Input */
.chat-input-container {
  padding: 16px 20px;
  border-top: 1px solid var(--border-primary);
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
}

.chat-input {
  flex: 1;
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 4px;
  padding: 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input:focus {
  border-color: rgba(0, 217, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
  background: rgba(0, 217, 255, 0.08);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 44px;
  height: 44px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.5);
  border-radius: 4px;
  color: var(--neon-cyan);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn.enabled:hover {
  background: var(--neon-cyan);
  color: var(--bg-primary);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.send-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Recent Events */
.events-list {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-item {
  background: rgba(18, 22, 31, 0.6);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-item:hover {
  background: rgba(18, 22, 31, 0.8);
  border-color: rgba(0, 217, 255, 0.4);
}

.event-item.event-error {
  border-left: 3px solid var(--neon-red);
}

.event-item.event-warning {
  border-left: 3px solid var(--neon-orange);
}

.event-item.event-info {
  border-left: 3px solid var(--neon-green);
}

.event-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.event-icon {
  font-size: 14px;
  line-height: 1;
  margin-top: 2px;
}

.event-info {
  flex: 1;
}

.event-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.event-time {
  font-size: 10px;
  color: var(--text-muted);
}

.event-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 217, 255, 0.1);
}

.event-description {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.event-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.event-action-btn {
  padding: 3px 8px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 3px;
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-action-btn:hover {
  background: rgba(0, 217, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 217, 255, 0.4);
}
