/* ============================================
   Author: Trey Kinard
   Website: Domain tbd
   Description: Stylesheet for World View Imaging client portal
   Last Updated: September 4, 2025
   ============================================ */

/* ========== Base Reset & Typography ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: #fff;
  color: #000;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ========== Headings ========== */
h1, h2 {
  margin-bottom: 1rem;
  font-weight: 500;
  text-align: center;
}

/* ========== Header & Navigation ========== */
.top-bar {
  background-color: #000;
  color: #fff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar h1 {
  font-size: 1.8rem;
}

.logo img {
  max-width: 120px;
  height: auto;
  display: block;
}

.top-bar nav a {
  color: white;
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 600;
}

.top-bar nav a:hover {
  text-decoration: underline;
}

/* ========== Forms ========== */
form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  width: 100%;
}

button {
  padding: 0.75rem;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #005fa3;
}

/* ========== Links ========== */
a {
  color: #0077cc;
  text-decoration: none;
  display: inline-block;
  margin-top: 1rem;
  text-align: center;
}

a:hover {
  text-decoration: underline;
}

/* ========== Access Key Response ========== */
.access-key {
  text-align: center;
  margin-top: 50px;
}

.access-key h2 {
  font-size: 2.4em;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
}

.access-key a {
  display: inline-block;
  margin-top: 15px;
  text-decoration: none;
  color: #0077cc;
  font-weight: bold;
}

.access-key a:hover {
  text-decoration: underline;
}

.key-box {
  display: inline-block;
  padding: 20px 40px;
  background-color: #f4f4f4;
  border: 3px dashed #555;
  font-family: monospace;
  font-size: 2.2em;
  margin-bottom: 30px;
  color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
}

.copy-btn {
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 1em;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.copy-btn:hover {
  background-color: #005fa3;
}

.paste-btn {
  background-color: #007BFF;
  color: #fff;
  border: none;
  padding: 8px 14px;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
  transition: background-color 0.3s ease, transform 0.2s ease;
  width: fit-content;
  max-width: 200px;
  margin-top: 8px;
}

.paste-btn:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.paste-btn:active {
  background-color: #004494;
  transform: translateY(0);
}

/* ========== Action Selection (todo.html) ========== */
form input[type="radio"] {
  margin-right: 0.5rem;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
}

/* ========== Gallery Grid (username.html) ========== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.thumbnail {
  text-align: center;
}

.thumbnail img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.thumbnail input[type="checkbox"] {
  margin-top: 0.5rem;
}

/* ========== Responsive Tweaks ========== */
@media (max-width: 768px) {
  .logo {
    margin-right: 16px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  form {
    width: 100%;
  }

  /* Button Sizing */
  #refreshBtn,
  #downloadBtn {
    font-size: 0.88rem;
    padding: 0.75rem 1.25rem;
    min-width: 40px;
  }

  /* Gallery Layout */
  .gallery {
    display: block;
    margin-top: 1rem;
    grid-template-columns: none;
    gap: 0;
  }

  .thumbnail {
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .thumbnail img {
    width: 100%;
    height: auto;
  }

  .thumbnail input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-top: 0.5rem;
  }

  /* Access Key Section */
  .key-box {
    font-size: 1.6em;
    padding: 16px 24px;
  }

  .copy-btn {
    font-size: 0.95em;
    padding: 6px 12px;
  }

  .access-key {
    margin-top: 30px;
  }
}

/* ========== Dark Mode Styling ========== */
[data-theme="dark"] body {
  background-color: #000;
  color: #fff;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] footer,
[data-theme="dark"] label,
[data-theme="dark"] input[type="radio"] {
  color: #fff;
}

[data-theme="dark"] button {
  background-color: #2196f3;
  color: #fff;
}

[data-theme="dark"] button:hover {
  background-color: #1976d2;
}

.floating-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: #0077cc;
  color: white;
  padding: 0.6rem 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

[data-theme="dark"] .floating-toggle {
  background: #2196f3;
}

/* ========== Consent Section (newkey.html) ========== */
.consent-explanation {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #f9f9f9;
  border-left: 4px solid #0077cc;
  font-size: 0.9rem;
  color: #333;
  border-radius: 4px;
}

[data-theme="dark"] .consent-explanation {
  background-color: #1e1e1e;
  border-left-color: #66ccff;
  color: #ccc;
}