/* Profile Card Styling */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: var(--md-default-bg-color);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

.card h3 { margin: 10px 0 5px; }
.card p { margin: 0; font-size: 0.9em; color: gray; }

/* Apply shared background settings to both header and tabs */
.md-header, .md-tabs {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('../assets/format/header-1900x640.webp');
  
  /* --- 1. CONTROL THE SCALING --- */
  /* 'cover' zooms to fill. Try '100vw' to fit width perfectly. */
  background-size: 100vw auto; 

  /* --- 2. CONTROL THE CROP --- */
  /* 'center top' ensures the top of the photo is never cropped off. */
  background-position: center -250px; 

  /* locks image to the window for the seamless effect */
  background-attachment: fixed; 
  background-repeat: no-repeat;
}

/* Optional: Clean up the tab borders */
.md-tabs {
  box-shadow: none;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* 1. Make the Site Title bigger and bolder */
.md-header__title {
  font-size: 1.5rem; /* Default is roughly 1.1rem */
  font-weight: 800;  /* Makes it extra bold */
  line-height: 1.8;  /* Adjusts spacing if it gets too tall */
}

/* 2. Make the Navigation Tabs bigger */
.md-tabs__link {
  font-size: 0.9rem; /* Default is roughly 0.7rem */
  font-weight: 600;  /* Makes it semi-bold */
}

/* Increase the Logo Size */
.md-header__button.md-logo img, 
.md-header__button.md-logo svg {
  height: 42px;    /* Default is usually 24px. 40-45px fits best. */
  width: auto;     /* Maintains the aspect ratio */
}

/* Style the auto-generated blog posts as cards */
article.md-post {
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 0.5rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    background-color: var(--md-default-bg-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Add a subtle floating effect when you hover over the card */
article.md-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Fix spacing for the title inside the card */
article.md-post > header > h2 {
    margin-top: 0;
}

.airmonitor-shell {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.airmonitor-shell [hidden] {
  display: none !important;
}

.airmonitor-dashboard {
  display: grid;
  gap: 1.25rem;
}

.airmonitor-lock {
  max-width: 34rem;
  border: 1px solid rgba(57, 73, 171, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.airmonitor-lock-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
}

.airmonitor-lock-input {
  width: min(18rem, 100%);
  min-height: 2.9rem;
  padding: 0.72rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(57, 73, 171, 0.28);
  background: #fff;
  color: var(--md-default-fg-color);
  font: inherit;
  box-shadow: inset 0 0 0 1px rgba(57, 73, 171, 0.06);
}

.airmonitor-lock-input:focus {
  outline: 2px solid rgba(57, 73, 171, 0.22);
  outline-offset: 2px;
}

.airmonitor-lock-message {
  min-height: 1.5rem;
  margin-top: 0.9rem;
  color: var(--md-default-fg-color--light);
}

.airmonitor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgba(63, 81, 181, 0.09), rgba(0, 150, 136, 0.08)),
    var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
}

.airmonitor-field {
  display: grid;
  gap: 0.35rem;
  min-width: 180px;
  font-weight: 600;
}

.airmonitor-field span {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
}

.airmonitor-field select,
.airmonitor-refresh {
  min-height: 2.8rem;
  padding: 0.68rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(57, 73, 171, 0.22);
  background: #fff;
  color: var(--md-default-fg-color);
  font: inherit;
}

.airmonitor-refresh {
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, #3949ab, #1565c0);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(57, 73, 171, 0.22);
}

.airmonitor-status {
  margin: 0 0 0 auto;
  color: var(--md-default-fg-color--light);
  font-size: 0.9rem;
}

.airmonitor-site-cards,
.airmonitor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.airmonitor-site-card,
.airmonitor-metric {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-default-bg-color);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.airmonitor-site-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background: var(--md-default-bg-color);
  appearance: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.airmonitor-site-card:hover,
.airmonitor-site-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(63, 81, 181, 0.45);
  box-shadow: 0 14px 28px rgba(63, 81, 181, 0.12);
}

.airmonitor-site-card h3,
.airmonitor-panel h2,
.airmonitor-table-header h2 {
  margin: 0;
}

.airmonitor-site-card p,
.airmonitor-table-header p {
  margin: 0;
}

.airmonitor-site-meta,
.airmonitor-metric-label {
  color: var(--md-default-fg-color--light);
  font-size: 0.85rem;
}

.airmonitor-site-reading,
.airmonitor-metric-value {
  margin-top: 0.45rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.airmonitor-site-reading small,
.airmonitor-metric-value small {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
}

.airmonitor-chart-grid {
  display: grid;
  gap: 1rem;
}

.airmonitor-panel {
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-default-bg-color);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.airmonitor-chart {
  width: 100%;
  min-height: 280px;
  margin-top: 0.85rem;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.78));
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.airmonitor-chart-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.airmonitor-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.airmonitor-chart-empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: var(--md-default-fg-color--light);
  font-weight: 600;
}

.airmonitor-chart-axis,
.airmonitor-chart-grid {
  stroke: rgba(15, 23, 42, 0.14);
  stroke-width: 1;
}

.airmonitor-chart-label {
  fill: rgba(15, 23, 42, 0.66);
  font-size: 12px;
}

.airmonitor-chart-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.airmonitor-chart-area {
  opacity: 0.14;
}

.airmonitor-chart-guide {
  stroke: rgba(15, 23, 42, 0.28);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.airmonitor-chart-focus {
  stroke: #fff;
  stroke-width: 2;
}

.airmonitor-chart-tooltip {
  position: absolute;
  min-width: 10rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  z-index: 2;
}

.airmonitor-chart-tooltip strong,
.airmonitor-chart-tooltip span {
  display: block;
}

.airmonitor-chart-tooltip span {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.86);
}

.airmonitor-table-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.airmonitor-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

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

.airmonitor-table th,
.airmonitor-table td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  text-align: left;
  white-space: nowrap;
}

.airmonitor-table tbody tr:hover {
  background: rgba(63, 81, 181, 0.05);
}

@media (max-width: 900px) {
  .airmonitor-status {
    width: 100%;
    margin-left: 0;
  }

  .airmonitor-chart {
    min-height: 240px;
  }
}
