/* Apple-Inspired Modern Design 
-------------------------------------------------- */

:root {
  /* Apple-inspired color palette */
  --primary-color: #0071e3;     /* Apple blue */
  --secondary-color: #86c8f8;   /* Light blue */
  --success-color: #34c759;     /* Apple green */
  --warning-color: #ffcc00;     /* Apple yellow */
  --danger-color: #ff3b30;      /* Apple red */
  --info-color: #5ac8fa;        /* Apple light blue */
  --purple-color: #7d7aff;      /* Light purple */
  --dark-color: #1d1d1f;        /* Apple dark gray */
  --medium-dark-color: #444;    /* Medium dark for text */
  --grey-color: #86868b;        /* Apple gray */
  --light-grey-color: #f5f5f7;  /* Apple light gray */
  --white-color: #ffffff;       /* White */
  
  /* Layout variables */
  --navbar-height: 56px;
  --sidebar-width: 250px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --boxshadow-soft: 0 2px 10px rgba(0, 0, 0, 0.05);
  --boxshadow-medium: 0 4px 18px rgba(0, 0, 0, 0.08);
  --boxshadow-strong: 0 8px 28px rgba(0, 0, 0, 0.12);
  --transition-speed: 0.3s;
}

/* Base styles */
body {
  font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--light-grey-color);
  color: var(--dark-color);
  line-height: 1.5;
  padding-top: var(--navbar-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5em;
  color: var(--dark-color);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  line-height: 1.6;
  color: var(--medium-dark-color);
}

.text-muted {
  color: var(--grey-color) !important;
}

/* Navbar styling */
.navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8) !important;
  box-shadow: var(--boxshadow-soft);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
  font-weight: 600;
  color: var(--dark-color) !important;
}

/* Apple-style brand styling */
.apple-brand {
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
}

.brand-text {
  font-family: 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--purple-color);
  display: inline-block;
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--dark-color);
  font-weight: 500;
  transition: color var(--transition-speed);
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

.navbar-dark .navbar-nav .nav-link.active {
  color: var(--primary-color);
}

/* Sidebar styling */
.sidebar {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--boxshadow-soft);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 1.5rem;
}

.sidebar .nav-link {
  color: var(--medium-dark-color);
  border-radius: var(--border-radius-sm);
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
  transition: all var(--transition-speed);
  font-weight: 500;
}

.sidebar .nav-link:hover {
  background-color: rgba(0, 113, 227, 0.08);
  color: var(--primary-color);
}

.sidebar .nav-link.active {
  background-color: rgba(0, 113, 227, 0.12);
  color: var(--primary-color);
  font-weight: 600;
}

.sidebar .nav-link i {
  opacity: 0.8;
  margin-right: 0.75rem;
}

/* Card styling */
.card {
  border: none;
  border-radius: var(--border-radius-md);
  box-shadow: var(--boxshadow-soft);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--boxshadow-medium);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.dashboard-card {
  height: 100%;
  box-shadow: var(--boxshadow-soft);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--boxshadow-medium);
}

/* Button styling */
.btn {
  border-radius: var(--border-radius-sm);
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  transition: all var(--transition-speed);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #0062cc;
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.3);
}

.btn-outline-primary {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Chart containers */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  margin: 1rem 0;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: var(--boxshadow-soft);
}

/* Status indicators */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.status-active {
  background-color: var(--success-color);
}

.status-idle {
  background-color: var(--warning-color);
}

.status-offline {
  background-color: var(--danger-color);
}

/* Progress bars */
.progress {
  height: 0.5rem;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  border-radius: 1rem;
}

/* Metrics and data cards */
.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-color);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--grey-color);
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.metric-good {
  color: var(--success-color);
}

.metric-warning {
  color: var(--warning-color);
}

.metric-bad {
  color: var(--danger-color);
}

/* Thermal map and data center visualization */
.thermal-map {
  height: 250px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--boxshadow-soft);
  background-image: linear-gradient(
    to right,
    #4575b4,
    #74add1,
    #abd9e9,
    #e0f3f8,
    #fee090,
    #fdae61,
    #f46d43,
    #d73027
  );
}

/* Forms and inputs */
.form-control {
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.form-label {
  font-weight: 500;
  color: var(--medium-dark-color);
  margin-bottom: 0.5rem;
}

/* Custom controls and switches */
.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Forecasting controls */
.forecast-controls {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--boxshadow-soft);
}

.forecast-control-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-color);
  margin-bottom: 0.5rem;
}

.forecast-radio-item label {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all var(--transition-speed);
  text-align: center;
  font-weight: 500;
}

.forecast-radio-item input[type="radio"]:checked + label {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.2);
}

/* Notifications */
.toast-container {
  z-index: 1090;
}

.toast {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--boxshadow-medium);
  border: none;
}

/* Loading indicators */
.loading-overlay {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius-md);
}

/* Responsive styles */
@media (max-width: 992px) {
  .card-body {
    padding: 1.25rem;
  }
  
  .metric-value {
    font-size: 1.5rem;
  }
  
  .sidebar {
    width: 0;
    padding: 0;
  }
  
  .content-container {
    margin-left: 0;
  }
  
  .sidebar.show {
    width: var(--sidebar-width);
    padding-top: 1.5rem;
  }
}

@media (max-width: 768px) {
  .card-body {
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .chart-container {
    height: 250px;
  }
  
  .thermal-map {
    height: 200px;
  }
}

/* Apple-style Data Center Metrics */
.apple-metrics-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 0px;
  margin-bottom: 28px;
}

.apple-metric-card {
  background-color: rgba(250, 250, 253, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.03);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.apple-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.apple-metric-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #999;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.apple-metric-value {
  font-size: 2.6rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #333;
  letter-spacing: -0.03em;
  line-height: 1;
}

.apple-metric-label {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 20px;
  font-weight: 400;
}

.apple-metric-description {
  font-size: 0.8rem;
  color: #999;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 400;
}

.apple-metric-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-bottom: 16px;
  font-size: 14px;
}

.apple-metric-icon.pue {
  background-color: #7d7aff;
}

.apple-metric-icon.wue {
  background-color: #48adf1;
}

.apple-metric-icon.cue {
  background-color: #30d158;
}

.apple-metric-icon.ere {
  background-color: #0a84ff;
}

.apple-metric-progress {
  height: 3px;
  background-color: rgba(0, 0, 0, 0.04);
  border-radius: 1.5px;
  margin: 16px 0;
  overflow: hidden;
}

.apple-metric-progress-bar {
  height: 100%;
  border-radius: 1.5px;
  transition: width 0.5s ease;
}

/* Value color variants */
.apple-metric-value.good {
  color: #30d158;
}

.apple-metric-value.warning {
  color: #ff9f0a;
}

.apple-metric-value.bad {
  color: #ff453a;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .apple-metrics-layout {
    grid-template-columns: 1fr;
  }
  
  .apple-metric-value {
    font-size: 2.2rem;
  }
}

/* Utility classes */
.bg-purple {
  background-color: var(--purple-color) !important;
}

/* AI Assistant Floating Chat */
.ai-assistant-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
  width: 380px;
  transition: all 0.3s ease;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.ai-assistant-container.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ai-assistant-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--boxshadow-medium);
  cursor: pointer;
  z-index: 1060;
  transition: all 0.2s ease;
  border: none;
}

/* Hide the button when chat is open */
.ai-assistant-container.open ~ .ai-assistant-button,
body.assistant-open .ai-assistant-button {
  display: none !important;
}

.ai-assistant-button i {
  font-size: 24px;
}

.ai-assistant-button:hover {
  transform: scale(1.1);
}

.ai-assistant-container.open .ai-assistant-button {
  transform: scale(0.8);
  opacity: 0.7;
}

.ai-assistant-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--boxshadow-strong);
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 450px;
  display: flex;
  flex-direction: column;
}

.ai-assistant-header {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dark-color);
}

.ai-assistant-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-assistant-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-assistant-title i {
  font-size: 20px;
  color: var(--primary-color);
}

.ai-assistant-title span {
  font-weight: 600;
  font-size: 16px;
}

.ai-assistant-close {
  background: transparent;
  border: none;
  color: var(--grey-color);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.ai-assistant-close:hover {
  opacity: 1;
}

.ai-assistant-conversation {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-assistant-message {
  display: flex;
  max-width: 80%;
}

.ai-assistant-message.user {
  margin-left: auto;
  justify-content: flex-end;
}

.ai-assistant-message.assistant {
  margin-right: auto;
  justify-content: flex-start;
}

.message-content {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  line-height: 1.5;
}

.ai-assistant-message.user .message-content {
  background: linear-gradient(135deg, var(--primary-color), #0062cc);
  color: white;
  border-top-right-radius: 4px;
}

.ai-assistant-message.assistant .message-content {
  background: rgba(0, 0, 0, 0.05);
  color: var(--dark-color);
  border-top-left-radius: 4px;
}

.ai-assistant-input-area {
  padding: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

/* New suggestion section styling */
.ai-assistant-suggestions {
  padding: 0 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  /* Hidden by default, shown via JavaScript */
  /* Changed from display: none to make it easier to debug */
  display: none; 
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ai-assistant-suggestions.visible {
  display: block;
}

.suggestions-title {
  font-size: 13px;
  color: var(--grey-color);
  margin: 10px 0 8px;
  font-weight: 500;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.suggestion-chip {
  display: inline-block;
  background: rgba(0, 113, 227, 0.08);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid rgba(0, 113, 227, 0.12);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: rgba(0, 113, 227, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Remove old suggestion bubble styles */
.suggestion-bubble {
  display: none; /* We're not using this anymore */
}

.input-container {
  display: flex;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: var(--border-radius-md);
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.input-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

#aiAssistantInput {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  flex-grow: 1;
  outline: none;
}

#aiAssistantSend {
  border: none;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#aiAssistantSend:hover {
  background-color: #0062cc;
  transform: scale(1.05);
}

/* Typing indicator */
.ai-assistant-typing {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 16px;
  border-radius: 18px;
  width: fit-content;
  margin: 8px 0 8px 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.typing-dot {
  width: 8px;
  height: 8px;
  background-color: rgba(0, 113, 227, 0.5);
  border-radius: 50%;
  margin: 0 3px;
  animation: typing-animation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-animation {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Sample question style */
.sample-question {
  display: inline-block;
  color: #6940A5;
  font-size: 0.85rem;
  margin-top: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.sample-question:hover {
  color: #9163CB;
  text-decoration: underline;
} 