/* css/style.css - Fixed version based on original design */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
}

body {
  background-color: #000;
  color: #fff;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Main app container for new structure */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}

/* Header for new structure */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Logo fix for white logo on black background */
.logo {
  max-width: 400px;
  height: auto;
  transition: all 0.3s ease;
  /* Simple white glow for visibility */
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Auth links styling to match original */
.auth-links {
  display: flex;
  gap: 10px;
}

.auth-links a,
.auth-link {
  padding: 8px 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.auth-links a:hover,
.auth-link:hover {
  background-color: #333;
  border-color: #555;
}

/* User info section */
.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
}

.user-info span {
  color: #ccc;
}

.dashboard-link,
.logout-link {
  padding: 8px 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff !important;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dashboard-link:hover,
.logout-link:hover {
  background-color: #333;
  border-color: #555;
}

/* Content area */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

/* Container for compatibility */
.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px;
  padding-bottom: 60px;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Logo container */
.logo-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-bottom: 30px !important;
  margin-top: 20px !important;
  transition: all 0.3s ease;
}

.logo-container.compact {
  margin-bottom: 10px !important;
  margin-top: 5px !important;
}

.logo-container.compact .logo {
  max-width: 300px;
}

/* Tagline styles */
.tagline {
  text-align: center !important;
  max-width: 700px !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  width: 100% !important;
  transition: all 0.3s ease;
  margin: 10px auto;
}

.tagline p {
  margin: 0;
  padding: 2px 0;
  color: #ccc;
}

.logo-container.compact + .tagline {
  font-size: 11px !important;
  margin-top: 0 !important;
  margin-bottom: 5px !important;
}

/* User greeting */
.user-greeting {
  text-align: center;
  color: #ccc;
  font-size: 14px;
  margin-top: 5px;
}

/* Auth section */
#auth-section {
  margin-top: 10px;
  margin-bottom: 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.logo-container.compact ~ #auth-section {
  margin-top: 0;
  margin-bottom: 5px;
}

.logo-container.compact ~ #auth-section p {
  margin-bottom: 5px;
}

.logo-container.compact ~ #auth-section .auth-button {
  padding: 6px 15px;
  font-size: 12px;
}

.auth-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.auth-button {
  padding: 8px 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.auth-button:hover {
  background-color: #333;
  border-color: #555;
}

/* Chat section */
#chat-section {
  width: 100%;
  max-width: 800px;
  margin: 20px auto;
}

/* Chat container */
.chat-container {
  flex-grow: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 5px 0;
  margin-bottom: 5px;
  background-color: transparent;
  border: none;
  opacity: 1 !important;
  position: relative;
}

#chat-display,
.chat-display {
  overflow-y: auto;
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.4;
  padding: 0 10px;
  max-height: 150px;
  min-height: 50px;
}

/* Scrollbar styling */
#chat-display::-webkit-scrollbar,
.chat-display::-webkit-scrollbar {
  width: 6px;
}

#chat-display::-webkit-scrollbar-track,
.chat-display::-webkit-scrollbar-track {
  background: #111;
}

#chat-display::-webkit-scrollbar-thumb,
.chat-display::-webkit-scrollbar-thumb {
  background: #333;
}

#chat-display::-webkit-scrollbar-thumb:hover,
.chat-display::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Messages - no fade out */
.bot-message {
  margin-bottom: 10px;
  color: #fff;
  position: relative;
  opacity: 1 !important;
}

.user-message {
  margin-bottom: 10px;
  color: #aaa;
  opacity: 1 !important;
}

/* Remove fade out animation */
.bot-message.fade-out,
.user-message.fade-out {
  opacity: 1 !important;
  transform: none !important;
}

/* Typewriter cursor animation */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: #fff;
  animation: blink 1s infinite;
  margin-left: 2px;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* Input container */
.input-container {
  display: flex;
  position: relative;
  margin-top: 0;
  padding: 0;
}

#user-input {
  width: 100%;
  padding: 12px;
  background-color: #000;
  color: #fff;
  border: none;
  border-bottom: 1px solid #333;
  outline: none;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  transition: border-color 0.2s ease;
}

#user-input:focus {
  border-bottom-color: #666;
}

#user-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#send-button {
  padding: 12px 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  transition: all 0.2s ease;
  margin-left: 10px;
}

#send-button:hover:not(:disabled) {
  background-color: #333;
  border-color: #555;
}

#send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Disclaimer */
.disclaimer {
  font-size: 8px;
  color: #666;
  text-align: center;
  padding: 10px 20px;
  margin-top: auto;
  line-height: 1.2;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: fixed;
  bottom: 5px;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.9);
}

/* Rate display */
.rate-display {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #333;
  background-color: #111;
  border-radius: 4px;
  text-align: center;
}

.rate-display h2 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #fff;
  font-weight: normal;
}

.rate-amount {
  font-size: 36px;
  color: #66ff66;
  margin: 15px 0;
  font-weight: bold;
}

.rate-comparison p {
  margin: 5px 0;
  color: #ccc;
  font-size: 14px;
}

.savings {
  color: #66ff66;
}

.total-cost {
  margin: 15px 0;
  padding: 10px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  font-size: 16px;
}

.rate-details {
  margin-top: 15px;
  color: #aaa;
  font-size: 12px;
  line-height: 1.4;
}

.rate-details p {
  margin: 5px 0;
}

/* Rate actions */
.rate-actions {
  margin-top: 20px;
}

.rate-actions button,
.rate-display button {
  padding: 10px 20px;
  background-color: #333;
  border: 1px solid #444;
  color: #fff;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  transition: all 0.2s ease;
  font-size: 14px;
}

.rate-actions button:hover,
.rate-display button:hover {
  background-color: #444;
  border-color: #666;
}

/* Success message */
.success-message {
  margin-top: 15px;
  color: #66ff66;
  font-size: 14px;
}

.success-message a {
  color: #66ff66;
  text-decoration: underline;
}

/* Auth prompt */
.auth-prompt {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.auth-prompt button {
  padding: 10px 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  transition: all 0.2s ease;
  font-size: 14px;
}

.auth-prompt button:hover {
  background-color: #333;
  border-color: #555;
}

/* Dashboard styles */
.dashboard-header {
  background-color: #111;
  border: 1px solid #333;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-user-info h1 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 5px;
  font-weight: normal;
}

.dashboard-user-info p {
  color: #aaa;
  font-size: 14px;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
}

.dashboard-actions button,
.dashboard-actions a {
  padding: 8px 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dashboard-actions button:hover,
.dashboard-actions a:hover {
  background-color: #333;
  border-color: #555;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: #111;
  border: 1px solid #333;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  color: #66ff66;
  margin-bottom: 5px;
  font-weight: bold;
}

.stat-label {
  font-size: 12px;
  color: #aaa;
  text-transform: uppercase;
}

/* Rate history */
.rate-history {
  background-color: #111;
  border: 1px solid #333;
  padding: 20px;
  overflow-x: auto;
}

.rate-history h2 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #fff;
  font-weight: normal;
}

.rate-history table {
  width: 100%;
  border-collapse: collapse;
}

.rate-history th,
.rate-history td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #333;
}

.rate-history th {
  color: #aaa;
  font-size: 12px;
  text-transform: uppercase;
}

.rate-history td {
  color: #ccc;
  font-size: 14px;
}

.rate-history .savings {
  color: #66ff66;
}

.eco-badge {
  color: #66ff66;
  font-size: 16px;
}

/* Button styles */
.btn {
  padding: 10px 20px;
  background-color: #333;
  border: 1px solid #444;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Courier New', monospace;
  transition: all 0.2s ease;
  display: inline-block;
  line-height: 1.2;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background-color: #444;
  border-color: #666;
}

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

/* Form styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #ccc;
}

.form-group input {
  width: 100%;
  padding: 10px;
  background-color: #111;
  border: 1px solid #333;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #666;
}

/* Error message styles */
.error-message {
  background-color: #331111;
  border: 1px solid #663333;
  color: #ff6666;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* Loading spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #333;
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive styles */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
  }
  
  .logo {
    max-width: 300px;
  }
  
  .logo-container.compact .logo {
    max-width: 200px;
  }
  
  .tagline {
    font-size: 12px;
    max-width: 95%;
  }
  
  .logo-container.compact + .tagline {
    font-size: 11px !important;
  }
  
  .logo-container {
    margin-bottom: 20px !important;
    margin-top: 15px !important;
  }
  
  .logo-container.compact {
    margin-bottom: 10px !important;
    margin-top: 5px !important;
  }
  
  .chat-container {
    padding: 5px 0;
    margin-bottom: 5px;
  }
  
  #chat-display,
  .chat-display {
    font-size: 14px;
    max-height: 150px;
    margin-bottom: 5px;
  }
  
  #user-input {
    font-size: 14px;
    padding: 10px;
  }
  
  .auth-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 200px;
    margin: 10px auto;
  }
  
  .auth-button {
    width: 100%;
  }
  
  .rate-display {
    padding: 15px;
  }
  
  .rate-amount {
    font-size: 28px;
  }
  
  .disclaimer {
    font-size: 7px;
    padding: 8px 15px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .dashboard-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .dashboard-actions {
    justify-content: center;
  }
}
