/*
 * File: assets/style.css
 * Version: 1.0.3 (local)
 * Initialized: 2025-11-11
 * Description: Contains global stylesheet for application layout and design.
 */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

html, body {
  margin: 0;
  padding: 0;
  background: #fafafa;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: #0077ff; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 20px 10px; font-weight: 600; }

/* ===== Navigation Header ===== */
.nav-header {
  font-weight: bold;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.user-info { text-align: right; font-size: 12px; padding: 5px 10px; }
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0077ff;
  color: #fff;
  padding: 10px 20px; 
  line-height: 1;
}
.nav-bar a { color: #fff; text-decoration: none; margin-right: 15px; font-size: 1em; }
.nav-bar a:hover { text-decoration: underline; }
.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-left a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  margin-right: 0;
}
.nav-left a.logo {
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}
/* Add the vertical divider between logo and About */
.nav-left a + a::before {
  content: '|';
  color: rgba(255, 255, 255, 0.7);
  margin: 0 8px;
}
/* ===== Nav Divider (between logo and About) ===== */
.nav-left .divider {
  color: #fff;
  opacity: 0.6;
  margin: 0 8px;
  font-weight: 300;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.logo { font-size: 1.2em; font-weight: bold; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; font-size: 1.35em; cursor: pointer; color: #fff; margin-left: auto; user-select: none; transform: translateY(-0.5px); }
.nav-links { display: flex; align-items: center; }
.nav-links a {
  color: #fff;
  text-decoration: none;
  margin-left: 15px;
  font-weight: 500;
}

/* === Active Nav Highlighting (by body ID) === */
body#page-discover .nav-links a.discover,
body#page-feed .nav-links a.feed,
body#page-user .nav-links a.profile,
body#page-add .nav-links a.add {
  font-weight: 600;
  border-bottom: 2px solid #fff;
}

/* Keep avatar aligned with nav links */
.user-badge {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}
.user-badge a {
  display: inline-block;
  text-decoration: none;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0077ff;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.user-avatar:hover {
  transform: scale(1.08);
  border-color: #0055cc;
}

/* ===== Layout ===== */
.page-content {
  padding: 0 20px 40px 20px; /* equal horizontal margin, extra bottom space */
  max-width: 900px;          /* comfortable reading width */
  box-sizing: border-box;
}
body.fullwidth .page-content {
  max-width: none;
  padding: 0 10px 40px 10px;
  width: 100%;
}

h1, h2, h3, h4, h5 {
  margin-left: 0;
  margin-right: 0;
  font-weight: 600;
}

/* ===== Buttons ===== */
button, .button {
  background: #0077ff; color: white;
  border: none; border-radius: 6px;
  padding: 8px 16px; cursor: pointer;
  font-size: 1em; font-weight: bold;
  text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: #005fd1; }

/* ===== Forms ===== */
form.form-styled {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 480px;
    margin: 20px 0 40px 0; /* vertical only */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  textarea,
  select {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
  }
  /* Leave checkboxes and radios inline */
  input[type="checkbox"],
  input[type="radio"] {
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
  }
}

footer {
  border-top: 1px solid;
  margin-top: 10px;
  font-size: 11px;
  padding: 10px 20px;
}

/* ===== Steps ===== */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 16px 0; /* add vertical spacing, no left flush */
}
.step {
  border-radius: 6px; padding: 6px 10px;
  font-weight: 600; font-size: 0.9em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.step.active { background: #0077ff; color: #fff; }
.step:hover { 
  background: rgba(0, 119, 255, 0.15);  /* semi-transparent Chime blue */
  color: #003f91;                       /* darker text for visibility */
}

.step.active {
  background: #0077ff;
  color: #fff;
}

/* ===== Autocomplete feedback ===== */
.input-wrapper { position: relative; display: inline-block; width: 100%; }
.input-spinner {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #0077ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.autocomplete-error input {
  border-color: #ff4d4d;
  box-shadow: 0 0 3px rgba(255,77,77,0.4);
}
/* ===== Autocomplete hint ===== */
.hint {
  padding: 6px 8px;
  color: #777;
  font-style: italic;
  background: #fafafa;
  border: 1px dashed #ccc;
  border-radius: 4px;
  margin-top: 4px;
  font-size: 0.9em;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}
.hint.show {
  opacity: 1;
}

/* === Compact action icons (my_chimes table) === */
.action-icon {
  display: inline-block;
  margin: 0 4px;
  color: #0077ff;
  text-decoration: none;
  font-size: 1.1em;
  transition: color 0.2s, transform 0.2s;
}
.action-icon.edit:hover {
  color: #5cb85c;
  transform: scale(1.2);
}
.action-icon.delete:hover {
  color: #d9534f;
  transform: scale(1.2);
}

table.mychimes {
  width: 100%;
  border-collapse: collapse;

  /* Fixed header */
  thead {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  thead th {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }

  th {
    background: #0077ff;
    color: #fff;
    text-align: left;
    padding: 8px;
  }

  td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
  }

  td:first-child,
  th:first-child {
    width: 100px;
    white-space: nowrap;
  }

  tr:nth-child(even) td {
    background: #f9f9f9;
  }

  tr:hover td {
    background: #eef6ff;
  }
}

.suggestion.provisional {
  font-style: italic;
  color: #666;
  background: #f8f8f8;
}
.suggestions-hint {
  padding: 6px 10px;
  font-size: 0.85em;
  color: #666;
  border-top: 1px dashed #ddd;
}
.suggest-info {
  color: #666;
  margin-left: 4px;
  display: inline-block;
  font-style: italic;
  font-size: 0.9em;
}

.suggestions .suggestion:hover .suggest-info {
  color: #333;
}

.suggestion.active {
  background: #0077ff;
  color: #fff;
}
.suggestion.active .suggest-info {
  color: #e0e0e0;
}

.multi-releases {
  color: #999;
  font-size: 0.8em;
  cursor: help;
  margin-left: 4px;
}
.multi-releases:hover {
  color: #333;
}

.filter-bar {
  margin: 10px 0 15px;
  padding: 8px 12px;
  background: #eef6ff;
  border-left: 4px solid #0077ff;
  font-size: 0.95em;
}
.filter-bar .clear-filter {
  margin-left: 12px;
  font-size: 0.9em;
  color: #0077ff;
  text-decoration: none;
}
.filter-bar .clear-filter:hover {
  text-decoration: underline;
}

.user-badge {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 0.9em;
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.logout-container {
  margin-top: 40px;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #ddd;
}

.logout-link {
  display: inline-block;
  background: #d9534f;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95em;
  transition: background 0.2s ease;
}

.logout-link:hover {
  background: #c9302c;
}

input.input-text {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  margin-bottom: 12px;
}

.access-section {
  margin-top: 16px;
  border-top: 1px solid #e0e8f5;
  padding-top: 12px;

  .access-toggle {
    width: 100%;
    background: #f8fbff;
    border: 1px solid #cce0ff;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    color: #0077ff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .access-toggle:hover {
    background: #eef6ff;
    color: #005fd1;
  }
  .access-panel {
    margin-top: 10px;
    animation: slideDown 0.25s ease;
  }
  .access-panel.hidden {
    display: none;
  }
  .access-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
  }

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

input[type="date"],
input[type="datetime-local"] {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95em;
  width: 100%;
  box-sizing: border-box;
}

/* ===== Mobile layout ===== */
@media (max-width: 700px) {
  .page-content { padding: 0 12px 40px 12px; }
  .nav-bar {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .logo { order: 1; }
  .nav-toggle { order: 2; }
  .nav-toggle-label { order: 2; display: block; margin-left: auto; }
  .nav-links {
    order: 3;
    flex-basis: 100%;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 10px;
  }
  .nav-toggle:checked ~ .nav-links {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links a { display: block; padding: 8px 0; font-size: 1.05em; }

  form { width: i95%; margin: 10px; box-sizing: border-box; }

  /* Hide the "|" when stacked on mobile */
  .nav-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .nav-left a + a::before {
    content: '';
    margin: 0;
  }
  .nav-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-left .divider {
    display: none; /* fully hide it on mobile */
  }
  .nav-left a {
    margin: 2px 0;
  }
}
