/* ============================================================
   Weather Compass — Community Stories / Pic of the Day
   stories.css — Dark glass theme
   ============================================================ */

/* ---- Utility ---- */
.stories-hidden { display: none !important; }

/* ---- Featured Pic of the Day ---- */
.stories-featured-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
.stories-featured-img {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: cover;
}
.stories-featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}
.stories-badge {
  display: inline-block;
  background: #f59e0b;
  color: #1a1a2e;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.stories-featured-caption {
  color: #f0f0f0;
  font-size: 1rem;
  line-height: 1.4;
  margin: 6px 0 4px;
}
.stories-featured-credit {
  color: #a0aec0;
  font-size: 0.85rem;
  margin: 0;
}

/* ---- Gallery title ---- */
.stories-gallery-title {
  color: #e2e8f0;
  font-size: 1.15rem;
  margin: 28px 0 14px;
  font-weight: 600;
}

/* ---- Gallery grid ---- */
#stories-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  #stories-gallery {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
  }
}
.stories-gallery-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stories-gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.stories-gallery-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.stories-gallery-info {
  padding: 10px 12px;
}
.stories-gallery-caption {
  color: #cbd5e0;
  font-size: 0.85rem;
  line-height: 1.35;
  margin: 0 0 4px;
}
.stories-gallery-credit {
  color: #718096;
  font-size: 0.75rem;
  margin: 0;
}

/* ---- Empty / status ---- */
.stories-empty {
  color: #718096;
  text-align: center;
  padding: 32px 16px;
  font-size: 0.95rem;
}

/* ---- Share button ---- */
.stories-btn-primary {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 24px auto;
  padding: 14px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.stories-btn-primary:hover { opacity: 0.9; }

.stories-btn-secondary {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 8px auto 0;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.08);
  color: #a0aec0;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.stories-btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }

/* ---- Submit form ---- */
.stories-form-card {
  background: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px 20px;
  margin: 16px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.stories-form-card h3 {
  color: #e2e8f0;
  margin: 0 0 18px;
  font-size: 1.15rem;
}
.stories-form-card label {
  display: block;
  color: #a0aec0;
  font-size: 0.85rem;
  margin: 14px 0 5px;
  font-weight: 500;
}
.stories-req { color: #f56565; }
.stories-hint { color: #718096; font-weight: 400; }
.stories-char-count {
  float: right;
  font-size: 0.8rem;
  color: #718096;
  font-weight: 400;
}

.stories-form-card input[type="text"],
.stories-form-card textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.stories-form-card input[type="text"]:focus,
.stories-form-card textarea:focus {
  outline: none;
  border-color: #667eea;
}
.stories-form-card textarea {
  resize: vertical;
  min-height: 72px;
}

.stories-form-card input[type="file"] {
  width: 100%;
  padding: 10px 0;
  color: #a0aec0;
  font-size: 0.9rem;
}
.stories-form-card input[type="file"]::file-selector-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-right: 10px;
}

/* photo preview */
#stories-preview-wrap {
  margin: 10px 0;
  text-align: center;
}
#stories-preview-img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* form actions */
.stories-form-actions {
  margin-top: 18px;
}

/* status messages */
#stories-status {
  margin-top: 10px;
  font-size: 0.9rem;
  min-height: 22px;
}
.stories-status-info  { color: #63b3ed; }
.stories-status-error { color: #fc8181; }

/* ---- Thank you ---- */
.stories-thank-you {
  text-align: center;
}
.stories-thank-you h3 {
  color: #68d391;
  font-size: 1.3rem;
}
.stories-thank-you p {
  color: #a0aec0;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 12px 0 20px;
}
