/* ===========================
   Company News Feed - Styles
   =========================== */

body {
  font-family: sans-serif;
  margin: 0;
  padding: 40px 20px;
  background-color: #f5f5f5;
  color: #333;
}

header, main {
  max-width: 680px;
  margin: 0 auto;
}

header {
  margin-bottom: 40px;
}

header h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

header p {
  color: #666;
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: #4a90e2;
  padding: 0;
  margin-top: 8px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

/* ===========================
   API Key Setup
   =========================== */

.api-key-section {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.api-key-section p {
  margin: 0 0 12px;
  color: #333;
}

#api-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#apiKeyInput {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#apiKeyInput:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74,144,226,0.15);
}

#saveApiKeyBtn {
  background-color: #4a90e2;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

#saveApiKeyBtn:hover {
  background-color: #357abd;
}

.api-key-hint {
  font-size: 13px;
  color: #666;
  margin: 12px 0 0 !important;
}

/* ===========================
   Search Area
   =========================== */

#search-section {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

#search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

#queryInput {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#queryInput:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74,144,226,0.15);
}

#searchBtn {
  background-color: #4a90e2;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

#searchBtn:hover {
  background-color: #357abd;
}

/* Watchlist quick picks */
#watchlist-picks {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.picks-label {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #aaa;
  letter-spacing: 0.5px;
  padding-top: 6px;
  white-space: nowrap;
}

#watchlist-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.picks-btn {
  background-color: #f0faf3;
  color: #27ae60;
  border: 1px solid #b8e8c8;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

.picks-btn:hover {
  background-color: #d6f5e0;
}

/* ===========================
   Article Cards
   =========================== */

.article-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid #4a90e2;
}

/* Article title as a clickable link */
.article-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  line-height: 1.4;
  display: block;
  margin-bottom: 8px;
}

.article-title:hover {
  color: #4a90e2;
  text-decoration: underline;
}

/* Source name and publish date on the same row */
.article-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.article-source {
  font-size: 12px;
  font-weight: bold;
  color: #4a90e2;
}

.article-date {
  font-size: 12px;
  color: #aaa;
}

/* Short description text */
.article-description {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* Result count shown above the articles */
#resultsCount {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

/* ===========================
   Status Messages
   =========================== */

.status-message {
  text-align: center;
  color: #aaa;
  padding: 40px 0;
  margin: 0;
}

.error-message {
  text-align: center;
  color: #e74c3c;
  padding: 32px 0;
  margin: 0;
}
