/* ReShare Circular Reuse Platform — Sandstone-based Design System.
   No Bootstrap classes: the UI is built on flask_construct_ui (`fcu-*`) with a
   small ReShare layer (`rs-*`) for pieces sandstone doesn't provide (badges,
   inline Material icon sizing, card hover). Icons are Material Symbols. */

/* --- Custom Variables & Tokens --- */
:root {
  --reshare-primary: #10b981;
  --reshare-primary-dark: #059669;
  --reshare-primary-light: #ecfdf5;
  --reshare-cta-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  --reshare-cta-shadow-hover: 0 6px 20px rgba(16, 185, 129, 0.35);

  --reshare-btn-radius: 8px;
  --reshare-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Material Symbols: size inline icons relative to surrounding text --- */
/* Scoped to page content so the framework navbar/sidebar icons keep their
   own sizing. Gives the same "flows with text" feel Bootstrap Icons had. */
.fcu-main-content .material-symbols-outlined {
  font-size: 1.2em;
  line-height: 1;
  vertical-align: -0.15em;
}

/* --- Button theming (sandstone fcu-btn, ReShare green identity) --- */
.fcu-btn {
  border-radius: var(--reshare-btn-radius);
  gap: 0.5rem;
  font-weight: 600;
  transition: var(--reshare-transition);
}

.fcu-btn:focus-visible {
  outline: 2px solid var(--reshare-primary);
  outline-offset: 2px;
}

.fcu-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 6px;
}

.fcu-btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
  border-radius: 12px;
}

/* Primary / success share the vibrant ReShare CTA identity */
.fcu-btn--primary,
.fcu-btn--success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #059669;
  color: #ffffff;
  box-shadow: var(--reshare-cta-shadow);
}

.fcu-btn--primary:hover,
.fcu-btn--success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #047857;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--reshare-cta-shadow-hover);
}

.fcu-btn--primary:active,
.fcu-btn--success:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.fcu-btn--secondary {
  background-color: var(--fcu-surface);
  border-color: var(--fcu-border);
  color: var(--fcu-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fcu-btn--secondary:hover {
  background-color: var(--fcu-surface-alt);
  border-color: var(--fcu-text-muted);
  color: var(--fcu-text);
  transform: translateY(-1px);
}

/* Outline success — ReShare custom modifier (sandstone has no outline variant) */
.fcu-btn--outline-success {
  background-color: transparent;
  border: 1.5px solid var(--reshare-primary);
  color: var(--reshare-primary);
}

.fcu-btn--outline-success:hover {
  background-color: var(--reshare-primary);
  border-color: var(--reshare-primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--reshare-cta-shadow);
}

.fcu-btn--warning:hover {
  transform: translateY(-1px);
}

.fcu-btn--danger:hover {
  transform: translateY(-1px);
}

/* --- Distinct inline text links --- */
.fcu-link,
a.fcu-link {
  color: var(--reshare-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--reshare-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.fcu-link:hover,
a.fcu-link:hover {
  color: var(--reshare-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Badges — ReShare component (sandstone provides no badge) --- */
.rs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.32em 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}

.rs-badge--pill { border-radius: 999px; }

.rs-badge--success   { background-color: var(--fcu-success); color: var(--fcu-on-success); border-color: var(--fcu-success); }
.rs-badge--warning   { background-color: var(--fcu-warning); color: var(--fcu-on-warning); border-color: var(--fcu-warning); }
.rs-badge--primary   { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #ffffff; border-color: #059669; }
.rs-badge--info      { background-color: var(--fcu-info); color: var(--fcu-on-info); border-color: var(--fcu-info); }
.rs-badge--danger    { background-color: var(--fcu-danger); color: var(--fcu-on-danger); border-color: var(--fcu-danger); }
.rs-badge--neutral   { background-color: var(--fcu-surface-alt); color: var(--fcu-text); border-color: var(--fcu-border); }

/* Soft/subtle variants reuse the alert tokens so they track the theme */
.rs-badge--success-soft { background-color: var(--fcu-alert-success-bg); color: var(--fcu-alert-success-text); border-color: var(--fcu-alert-success-border); }
.rs-badge--info-soft    { background-color: var(--fcu-alert-info-bg);    color: var(--fcu-alert-info-text);    border-color: var(--fcu-alert-info-border); }
.rs-badge--warning-soft { background-color: var(--fcu-alert-warning-bg); color: var(--fcu-alert-warning-text); border-color: var(--fcu-alert-warning-border); }
.rs-badge--danger-soft  { background-color: var(--fcu-alert-danger-bg);  color: var(--fcu-alert-danger-text);  border-color: var(--fcu-alert-danger-border); }

/* --- Card hover lift (ReShare) --- */
.rs-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rs-card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* --- Page wrapper: centered, max-width set inline per page --- */
.rs-page {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* --- Mobile Responsive (< 768px): sidebar nav becomes a sticky top bar --- */
@media (max-width: 768px) {
  .fcu-app-layout {
    grid-template-areas:
      "navbar"
      "sidebar"
      "main"
      "footer" !important;
    grid-template-columns: 100% !important;
    grid-template-rows: var(--fcu-navbar-height) auto 1fr auto !important;
  }

  .fcu-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--fcu-border) !important;
    padding: 6px 12px !important;
    background-color: var(--fcu-surface-alt) !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: var(--fcu-navbar-height) !important;
    z-index: 90 !important;
  }

  .fcu-navigation {
    width: 100% !important;
  }

  .fcu-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
  }

  .fcu-menu-item {
    flex: 1 0 auto !important;
    margin: 0 !important;
  }

  .fcu-menu-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 14px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    color: var(--fcu-text-muted) !important;
    text-decoration: none !important;
    transition: var(--reshare-transition) !important;
    background-color: transparent !important;
  }

  .fcu-menu-link:hover,
  .fcu-menu-link.active {
    background-color: var(--fcu-surface) !important;
    color: var(--reshare-primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  }

  .fcu-menu-text {
    display: inline !important;
  }

  .rs-page {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .fcu-main-content {
    padding: 12px !important;
  }

  .fcu-navbar {
    padding: 0 12px !important;
  }

  .fcu-navbar__brand {
    font-size: 1.05rem !important;
  }

  .fcu-navbar__search {
    max-width: 150px;
  }

  /* Button rows tagged rs-actions collapse to full-width stacked buttons */
  .rs-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  .rs-actions .fcu-btn {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .rs-badge {
    font-size: 0.725rem !important;
  }

  .fcu-btn {
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
  }

  .fcu-btn-lg {
    font-size: 0.95rem !important;
    padding: 0.65rem 1.25rem !important;
  }
}
