/* Base styles inspired by shadcn/ui */
:root {
  /* Color system */
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 222 47% 11%;
  --primary-foreground: 210 40% 98%;
  --secondary: 240 4.8% 95.9%;
  --secondary-foreground: 240 5.9% 10%;
  --muted: 240 4.8% 95.9%;
  --muted-foreground: 240 3.8% 46.1%;
  --accent: 240 4.8% 95.9%;
  --accent-foreground: 240 5.9% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 240 5.9% 90%;
  --input: 240 5.9% 90%;
  --ring: 240 5.9% 10%;
  --radius: 0.5rem;

  /* Derived colors */
  --background-rgb: hsl(var(--background));
  --foreground-rgb: hsl(var(--foreground));
  --card-rgb: hsl(var(--card));
  --card-foreground-rgb: hsl(var(--card-foreground));
  --popover-rgb: hsl(var(--popover));
  --popover-foreground-rgb: hsl(var(--popover-foreground));
  --primary-rgb: hsl(var(--primary));
  --primary-foreground-rgb: hsl(var(--primary-foreground));
  --secondary-rgb: hsl(var(--secondary));
  --secondary-foreground-rgb: hsl(var(--secondary-foreground));
  --muted-rgb: hsl(var(--muted));
  --muted-foreground-rgb: hsl(var(--muted-foreground));
  --accent-rgb: hsl(var(--accent));
  --accent-foreground-rgb: hsl(var(--accent-foreground));
  --destructive-rgb: hsl(var(--destructive));
  --destructive-foreground-rgb: hsl(var(--destructive-foreground));
  --border-rgb: hsl(var(--border));
  --input-rgb: hsl(var(--input));
  --ring-rgb: hsl(var(--ring));

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  color: hsl(var(--muted-foreground));
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(var(--primary), 0.8);
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header and Navigation */
header {
  padding: 1.5rem 0;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
}

header h1 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
  color: hsl(var(--foreground));
}

/* Main content */
main {
  padding: 2rem 0;
  min-height: calc(100vh - 180px);
}

/* Card */
.card {
  background-color: hsl(var(--card));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.card-content {
  padding: 1.5rem;
}

.card-footer {
  padding: 1.5rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Sections */
section {
  margin-bottom: 2rem;
}

.hero {
  text-align: center;
  padding: 3rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero p {
  margin-bottom: 2rem;
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(222, 47%, 20%); /* Darker shade instead of opacity */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary), 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--secondary));
  border-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  transform: translateY(-1px);
}

.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
  background-color: hsl(0, 84.2%, 50.2%); /* Darker red instead of opacity */
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  transform: translateY(-1px);
}

.btn-link {
  background-color: transparent;
  color: hsl(var(--primary));
  height: auto;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
  transform: none;
}

.btn-icon {
  height: 2.5rem;
  width: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Button groups */
.btn-group {
  display: flex;
  gap: 0.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-input {
  display: block;
  width: 100%;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  color: hsl(var(--foreground));
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsla(var(--ring), 0.1);
}

.form-input::placeholder {
  color: hsl(var(--muted-foreground));
}

/* Login section */
.login-section {
  max-width: 400px;
  margin: 0 auto;
}

/* Profile section */
.profile-section {
  max-width: 700px;
  margin: 0 auto;
}

.profile-card {
  border-radius: var(--radius);
  overflow: hidden;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow);
}

.profile-header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background-color: hsl(var(--muted));
  border-bottom: 1px solid hsl(var(--border));
}

.profile-avatar {
  margin-right: 1.5rem;
}

.profile-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid hsl(var(--background));
  box-shadow: var(--shadow);
}

.profile-info h3 {
  margin-bottom: 0.25rem;
  font-size: 1.25rem;
}

.profile-info p {
  margin-bottom: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

.profile-details {
  padding: 1.5rem;
}

.profile-details h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
}

.profile-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}

.profile-table td.label {
  font-weight: 500;
  width: 40%;
  color: hsl(var(--foreground));
}

.profile-table td.value {
  color: hsl(var(--muted-foreground));
}

.profile-table tr:last-child td {
  border-bottom: none;
}

.profile-actions {
  padding: 1.5rem;
  border-top: 1px solid hsl(var(--border));
  text-align: right;
}

/* Callback section */
.callback-section {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

/* Utility classes */
.hidden {
  display: none;
}

.loading {
  text-align: center;
  padding: 2rem 0;
  color: hsl(var(--muted-foreground));
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  margin-top: 1rem;
  border: 2px solid hsla(var(--muted-foreground), 0.2);
  border-left-color: hsl(var(--primary));
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.error {
  background-color: hsla(var(--destructive), 0.1);
  color: hsl(var(--destructive));
  padding: 1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  font-size: 0.875rem;
}

.success {
  background-color: hsla(142, 76%, 36%, 0.1);
  color: hsl(142, 76%, 36%);
}

.info {
  background-color: hsla(221, 83%, 53%, 0.1);
  color: hsl(221, 83%, 53%);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: hsl(var(--muted-foreground));
  border-top: 1px solid hsl(var(--border));
  font-size: 0.875rem;
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2rem;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-avatar {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .btn-group {
    flex-direction: column;
  }
}

/* FBP home navigation styles (from former css/hamburger.css) */
.fbp-home header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.fbp-home header h1 {
  flex: 0 0 100%;
  text-align: center;
  margin: 0 0 0.75rem 0;
}

.fbp-home .menu-btn {
  display: none;
}

.fbp-home #main-nav {
  display: block;
  position: static;
  width: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  flex: 0 0 100%;
}

.fbp-home #main-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

@media (max-width: 700px) {
  .fbp-home .menu-btn {
    display: inline-flex;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1001;
  }

  .fbp-home #main-nav {
    display: none;
    position: fixed;
    top: 3.25rem;
    left: 0.75rem;
    width: min(92vw, 320px);
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  }

  .fbp-home #main-nav[data-open="true"] {
    display: block;
  }

  .fbp-home #main-nav ul {
    display: block;
  }

  .fbp-home #main-nav li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

.fbp-home header {
  padding-left: 3.5rem;
}

/* Picksheet form styles (from former styles/fbp.css) */
#picksheet td {
  text-align: center;
  vertical-align: middle;
}

#picksheet .container {
  display: inline-block;
  position: relative;
  width: 25px;
  height: 25px;
  padding-left: 0;
  margin-bottom: 0;
  cursor: pointer;
}

#picksheet .container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

#picksheet .checkmark {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 25px;
  width: 25px;
  transform: translate(-50%, -50%);
  background-color: #eee;
  border-radius: 50%;
}

#picksheet .container:hover input ~ .checkmark {
  background-color: #ccc;
}

#picksheet .container input:checked ~ .checkmark {
  background-color: #2196F3;
}

#picksheet .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

#picksheet .container input:checked ~ .checkmark:after {
  display: block;
}

#picksheet .container .checkmark:after {
  top: 9px;
  left: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

#spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

#spinner.is-visible {
  opacity: 1;
  visibility: visible;
}
#spinner img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}