/*
 * XIBIS+ AERO - XI-CORE Overlay Styles
 * Version: 1.1 (Overlay Only - Preserving Original Theme)
 */

/* =========================================
   1. XI-CORE SMART GLASS OVERLAY (The "Sabre" Side-Panel)
   ========================================= */
#xi-help-overlay {
  position: fixed;
  top: 0;
  right: -450px; /* Hidden by default */
  width: 400px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.85); /* Light Mode Glass */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); /* Professional Ease */
  display: flex;
  flex-direction: column;
}

#xi-help-overlay.active {
  right: 0;
}

/* Overlay Header */
.xi-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.xi-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.xi-close-btn {
  cursor: pointer;
  font-size: 1.2rem;
  color: #6c757d;
  transition: color 0.2s;
  background: none;
  border: none;
}

.xi-close-btn:hover {
  color: #000;
}

/* System Status Bar (GDS/DB) */
.xi-system-status {
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  gap: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ccc;
}

.dot.online {
  background-color: #198754; /* Success Green */
  box-shadow: 0 0 5px rgba(25, 135, 84, 0.4);
}

.dot.offline {
  background-color: #dc3545; /* Danger Red */
}

/* XI-CORE Conversation Area */
.xi-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* AI Message Bubble */
.xi-message-ai {
  background: white;
  padding: 1.2rem;
  border-radius: 0px 12px 12px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

.xi-message-ai::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent white transparent transparent;
}

.xi-avatar-icon {
  width: 32px;
  height: 32px;
  background: black; /* XIBIS Black */
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

/* Quick Action Buttons */
.xi-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 1rem;
}

.btn-xi-action {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-xi-action:hover {
  background: rgba(13, 110, 253, 0.15);
  transform: translateX(4px);
}

/* Input Area (Bottom) */
.xi-footer {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.xi-input-group {
  position: relative;
}

.xi-input {
  width: 100%;
  padding: 12px 15px;
  padding-right: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  background: white;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.xi-input:focus {
  border-color: #0d6efd;
}

.xi-send-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #0d6efd;
  background: none;
  border: none;
  cursor: pointer;
}

/* =========================================
   2. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 576px) {
    #xi-help-overlay {
        width: 100%;
        right: -100%; /* Hide completely off-screen */
        border-left: none;
    }

    #xi-help-overlay.active {
        right: 0;
    }

    .xi-header, .xi-body, .xi-footer {
        padding: 1.25rem; /* Reduce padding on mobile */
    }
    
    .creative-card-body {
        padding: 2rem !important;
    }
}
