@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville&family=Libre+Franklin:wght@300;400;600&display=swap');

:root {
  --font-serif: 'Libre Baskerville', serif;
  --font-sans: 'Libre Franklin', sans-serif;
  --color-bg: #f4f6f8;
  --color-text: #222;
  --color-accent: #0055aa;
  --color-header: #00274d;
  --color-alert: #ffeeba;
  --color-alert-detail: #fff3cd;
  --color-footer: #111;
  --color-warning: #aa0000;
}

/* Base */
body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
}

/* Official Banner */
.gov-banner {
  background-color: #e9f5ff;
  color: #003366;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.95em;
  border-bottom: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gov-lock {
  font-size: 1.2em;
}

/* Executive Alert */
.alert-banner {
  background-color: var(--color-alert);
  color: #222;
  padding: 10px 20px;
  font-size: 0.95em;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

.alert-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.alert-arrow {
  font-size: 1.2em;
  margin-left: 10px;
}

.alert-dropdown {
  display: none;
  background-color: var(--color-alert-detail);
  padding: 15px 20px;
  border-top: 1px solid #ddd;
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Status Bar */
.status-bar {
  background-color: #dff0d8;
  color: #2e6e2e;
  text-align: center;
  padding: 8px 20px;
  font-size: 0.9em;
  border-bottom: 1px solid #ccc;
}

/* Header */
header {
  background-color: var(--color-header);
  color: white;
  text-align: center;
  padding: 20px;
  font-family: var(--font-serif);
}

header h1 {
  margin: 0;
  font-size: 2em;
}

header .powered {
  font-size: 0.9em;
  font-style: italic;
  color: #ccc;
}

/* Login Portal */
.login-portal {
  max-width: 600px;
  margin: 30px auto;
  padding: 0 20px;
  text-align: center;
}

.login-portal h2 {
  font-family: var(--font-serif);
  font-size: 1.4em;
  margin-bottom: 10px;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

#login-form input {
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #aaa;
  font-size: 1em;
}

#login-form button {
  background-color: var(--color-accent);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}

#login-status {
  font-size: 0.9em;
  color: #0055aa;
}

/* Government Notice */
#gov-notice {
  display: none;
  background-color: #fff8e1;
  border: 2px solid #ccc;
  padding: 20px;
  margin: 20px auto;
  max-width: 600px;
  text-align: center;
  border-radius: 8px;
}

#gov-notice button {
  margin-top: 10px;
  background-color: #0055aa;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* Chat Interface */
main {
  max-width: 600px;
  margin: 30px auto;
  padding: 0 20px;
}

.chat-container {
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  height: 400px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.message {
  margin-bottom: 15px;
  line-height: 1.4;
  position: relative;
}

.message .timestamp {
  font-size: 0.75em;
  color: #888;
  position: absolute;
  top: -16px;
  right: 0;
}

.user {
  text-align: right;
  color: var(--color-accent);
  font-weight: 600;
}

.bot {
  text-align: left;
  color: #333;
}

form {
  display: flex;
  margin-top: 20px;
}

input[type="text"] {
  flex: 1;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #aaa;
  font-size: 1em;
}

button {
  background-color: var(--color-accent);
  color: white;
  border: none;
  padding: 10px 16px;
  margin-left: 10px;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #003f88;
}

/* Transcript Export */
.export-section {
  text-align: center;
  margin: 20px auto;
}
.export-section button {
  background-color: #444;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
}
.export-section button:hover {
  background-color: #222;
}

/* Popup Warning */
.popup {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  border: 2px solid var(--color-warning);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 2000;
  width: 320px;
  padding: 20px;
  text-align: left;
  border-radius: 8px;
}

.popup-content h3 {
  margin-top: 0;
  font-family: var(--font-serif);
  color: var(--color-warning);
}

.close-popup {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.2em;
  cursor: pointer;
}

/* Footer */
footer {
  background-color: var(--color-footer);
  color: #eee;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
}

footer a {
  color: #eee;
  text-decoration: underline;
}