/* HPE Brand Colors and Variables */
:root {
  --hpe-green: #00b94a;
  --hpe-green-dark: #009639;
  --hpe-green-light: #33c766;
  --hpe-blue: #0096d6;
  --hpe-blue-dark: #0073a3;
  --hpe-gray-900: #1a1a1a;
  --hpe-gray-800: #2d2d2d;
  --hpe-gray-700: #404040;
  --hpe-gray-600: #666666;
  --hpe-gray-500: #808080;
  --hpe-gray-400: #cccccc;
  --hpe-gray-300: #e6e6e6;
  --hpe-gray-200: #f2f2f2;
  --hpe-gray-100: #f8f8f8;
  --hpe-white: #ffffff;

  --font-family: "Metric", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --border-radius: 8px;
  --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--hpe-gray-800);
  background-color: var(--hpe-white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Styles */
.header {
  background: var(--hpe-white);
  border-bottom: 1px solid var(--hpe-gray-300);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 24px;
  color: var(--hpe-gray-900);
}

.logo img {
  height: 32px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  text-decoration: none;
  color: var(--hpe-gray-700);
  font-weight: 500;
  transition: var(--transition);
}

.nav a:hover {
  color: var(--hpe-green);
}

/* Button Styles */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-small);
}

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

.btn-primary:hover {
  background: var(--hpe-green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background: var(--hpe-white);
  color: var(--hpe-gray-800);
  border: 2px solid var(--hpe-gray-400);
}

.btn-secondary:hover {
  border-color: var(--hpe-green);
  color: var(--hpe-green);
}

.btn-icon {
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--hpe-gray-600);
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--hpe-gray-200);
  color: var(--hpe-gray-800);
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--hpe-gray-100) 0%,
    var(--hpe-white) 100%
  );
  padding: 80px 0;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  color: var(--hpe-gray-900);
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 20px;
  color: var(--hpe-gray-600);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-graphic {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cloud-icon,
.server-icon {
  font-size: 64px;
  color: var(--hpe-green);
  animation: float 3s ease-in-out infinite;
}

.server-icon {
  color: var(--hpe-blue);
  animation-delay: 1.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Features Section */
.features {
  padding: 80px 0;
  background: var(--hpe-white);
}

.features h2 {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  color: var(--hpe-gray-900);
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--hpe-white);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-small);
  text-align: center;
  transition: var(--transition);
}

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

.feature-card i {
  font-size: 48px;
  color: var(--hpe-green);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--hpe-gray-900);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--hpe-gray-600);
  line-height: 1.6;
}

/* Chat Toggle Button */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--hpe-green);
  color: var(--hpe-white);
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-large);
  transition: var(--transition);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle:hover {
  transform: scale(1.1);
  background: var(--hpe-green-dark);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff4444;
  color: var(--hpe-white);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Chat Popup */
.chat-popup {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 500px; /* Increased from 400px */
  height: 700px; /* Increased from 600px */
  background: var(--hpe-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-large);
  display: none;
  flex-direction: column;
  z-index: 1001;
  overflow: hidden;
}

.chat-popup.open {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat Header */
.chat-header {
  background: var(--hpe-green);
  color: var(--hpe-white);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-controls {
  display: flex;
  gap: 8px;
}

.chat-controls .btn-icon {
  color: var(--hpe-white);
  background: rgba(255, 255, 255, 0.1);
}

.chat-controls .btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--hpe-white);
}

/* Chat Body */
.chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 20px; /* Increased from 16px */
  overflow-y: auto;
  scroll-behavior: smooth;
}

.message {
  display: flex;
  gap: 16px; /* Increased from 12px */
  margin-bottom: 20px; /* Increased from 16px */
  max-width: 100%;
}

.message-avatar {
  width: 40px; /* Increased from 32px */
  height: 40px; /* Increased from 32px */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px; /* Increased from 14px */
  flex-shrink: 0;
}

.agent-message .message-avatar {
  background: var(--hpe-green);
  color: var(--hpe-white);
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-avatar {
  background: var(--hpe-blue);
  color: var(--hpe-white);
}

.message-content {
  flex: 1;
  min-width: 0;
}

.user-message .message-content {
  text-align: right;
}

.message-content p {
  background: var(--hpe-gray-100);
  padding: 16px 20px; /* Increased from 12px 16px */
  border-radius: var(--border-radius);
  margin-bottom: 4px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 16px; /* Added explicit font size */
}

.user-message .message-content p {
  background: var(--hpe-blue);
  color: var(--hpe-white);
  margin-left: auto;
  display: inline-block;
  max-width: 85%;
}

.agent-message .message-content p {
  max-width: 85%;
}

.message-time {
  font-size: 12px; /* Increased from 11px */
  color: var(--hpe-gray-500);
  margin-left: 16px;
}

.user-message .message-time {
  margin-left: 0;
  margin-right: 16px;
}

/* Qualification Panel (Floating Window) */
.qualification-window .qualification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.qualification-window .qualification-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--hpe-gray-800);
}

.qualification-window .qualification-score {
  background: var(--hpe-green);
  color: var(--hpe-white);
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.qualification-window .bant-scores {
  display: grid;
  gap: 8px;
}

.qualification-window .bant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qualification-window .bant-item span {
  font-size: 14px;
  color: var(--hpe-gray-700);
  min-width: 70px;
}

.qualification-window .score-bar {
  flex: 1;
  height: 8px;
  background: var(--hpe-gray-300);
  border-radius: 4px;
  overflow: hidden;
}

.qualification-window .score-fill {
  height: 100%;
  background: var(--hpe-green);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Chat Footer */
.chat-footer {
  border-top: 1px solid var(--hpe-gray-300);
  padding: 16px;
}

.chat-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

#chatInput {
  flex: 1;
  padding: 14px; /* Increased from 12px */
  border: 1px solid var(--hpe-gray-400);
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 16px; /* Increased from 14px */
  outline: none;
  transition: var(--transition);
}

#chatInput:focus {
  border-color: var(--hpe-green);
  box-shadow: 0 0 0 3px rgba(0, 185, 74, 0.1);
}

#sendButton {
  padding: 14px;
  background: var(--hpe-green);
  color: var(--hpe-white);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  min-width: 50px;
  font-size: 16px;
}

#sendButton:hover:not(:disabled) {
  background: var(--hpe-green-dark);
}

#sendButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px; /* Increased from 11px */
  color: var(--hpe-gray-500);
  margin-top: 8px; /* Added margin top */
}

.typing-indicator {
  display: none;
  color: var(--hpe-green);
}

.typing-indicator.show {
  display: block;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.show {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--hpe-gray-300);
  border-left: 4px solid var(--hpe-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Proposal Download Styling */
.proposal-download {
  display: flex;
  align-items: center;
  margin: 16px 0;
  padding: 16px;
  background: rgba(0, 117, 201, 0.08);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--hpe-blue);
  animation: fadeIn 0.3s ease-out;
}

.proposal-icon {
  font-size: 28px;
  color: var(--hpe-blue);
  margin-right: 16px;
}

.proposal-info {
  flex: 1;
}

.proposal-info h4 {
  margin: 0 0 4px 0;
  color: var(--hpe-blue);
  font-weight: 500;
}

.proposal-info p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--text-color);
}

.download-button {
  display: inline-block;
  padding: 8px 16px;
  background: var(--hpe-blue);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.download-button:hover {
  background: var(--hpe-blue-dark);
}

.download-button i {
  margin-right: 6px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .nav {
    display: none;
  }

  .chat-popup {
    width: calc(100vw - 24px);
    height: calc(100vh - 120px);
    right: 12px;
    bottom: 80px;
    font-size: 16px; /* Added to ensure text is readable on mobile */
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .features {
    padding: 40px 0;
  }

  .features h2 {
    font-size: 28px;
  }
}

/* Chat Animation Classes */
.message.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar,
.qualification-panel::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.qualification-panel::-webkit-scrollbar-track {
  background: var(--hpe-gray-200);
}

.chat-messages::-webkit-scrollbar-thumb,
.qualification-panel::-webkit-scrollbar-thumb {
  background: var(--hpe-gray-400);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.qualification-panel::-webkit-scrollbar-thumb:hover {
  background: var(--hpe-gray-500);
}

/* Full Screen Mode */
.chat-popup.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  z-index: 2000;
  animation: expandFullscreen 0.3s ease-out;
}

@keyframes expandFullscreen {
  from {
    transform: scale(0.9);
    opacity: 0.9;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.chat-popup.fullscreen .chat-header {
  padding: 20px 40px;
}

.chat-popup.fullscreen .chat-messages {
  padding: 30px 40px;
}

.chat-popup.fullscreen .chat-footer {
  padding: 20px 40px;
}

/* Qualification Panel Floating Window */
.qualification-window {
  position: fixed;
  top: 80px;
  right: 24px;
  width: 300px;
  background: var(--hpe-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-large);
  z-index: 999;
  overflow: hidden;
  display: none;
  animation: slideDown 0.3s ease-out;
}

.qualification-window.open {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.qualification-window-header {
  background: var(--hpe-green);
  color: var(--hpe-white);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qualification-window-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.qualification-window-body {
  padding: 20px;
}

.qualification-window .close-button {
  background: rgba(255, 255, 255, 0.1);
  color: var(--hpe-white);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.qualification-window .close-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Remove qualification panel from chat popup */
.chat-popup .qualification-panel {
  display: none;
}

/* Responsive adjustments for full screen */
@media (max-width: 768px) {
  .qualification-window {
    width: calc(100vw - 48px);
    right: 24px;
  }

  .chat-popup.fullscreen .chat-header,
  .chat-popup.fullscreen .chat-messages,
  .chat-popup.fullscreen .chat-footer {
    padding: 16px;
  }
}
