.my-xc-summary__stat--action {
  appearance: none;
  background: #f8fafc;
  border: 1px solid rgba(15, 76, 129, 0.18);
  border-radius: 8px;
  padding: 0.6rem 0.92rem;
  min-width: 150px;
  color: #0f172a;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.my-xc-summary__stat--action .my-xc-summary__stat-value {
  color: inherit;
}

.my-xc-summary__stat--action.is-active {
  background: #0f4c81;
  color: #fff;
  border-color: #0f4c81;
  box-shadow: 0 12px 32px rgba(15, 76, 129, 0.25);
}

.my-xc-summary__stat--action.is-active .my-xc-summary__stat-value,
.my-xc-summary__stat--action.is-active .my-xc-summary__stat-label {
  color: #fff;
}

.my-xc-summary__stat--action:not(.is-active):hover,
.my-xc-summary__stat--action:not(.is-active):focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 76, 129, 0.2);
}

.my-xc-summary__country-flag {
  border: 1px solid rgba(15, 76, 129, 0.15);
  border-radius: 8px;
  padding: 0.48rem 0.42rem;
  width: 90px;
  background: #f8fafc;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.my-xc-summary__country-flag img {
  width: 36px;
  height: 24px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.my-xc-summary__country-flag span {
  font-size: 0.85rem;
  text-align: center;
}

.my-xc-summary__country-flag strong {
  font-size: 0.85rem;
  color: #0f4c81;
}

.my-xc-summary__panel-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.my-xc-summary__reset--primary {
  border-radius: 8px;
  padding: 0.3rem 0.78rem;
  background: linear-gradient(120deg, #0f4c81, #1d87f8);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.25);
}

.my-xc-summary__reset--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.my-xc-summary__filter-form input[type="date"].is-highlighted {
  animation: myXcSummaryDatePulse 1.2s ease-in-out infinite;
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.35);
  background: #fff8f1;
}

@keyframes myXcSummaryDatePulse {
  0% {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15), 0 0 12px rgba(249, 115, 22, 0.2);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.45), 0 0 18px rgba(249, 115, 22, 0.35);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.15), 0 0 12px rgba(249, 115, 22, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .my-xc-summary__filter-form input[type="date"].is-highlighted {
    animation: none;
  }
}

body.dark-mode .my-xc-summary__stat--action {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(96, 165, 250, 0.28);
  color: #f8fafc;
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.28);
}

body.dark-mode .my-xc-summary__stat--action.is-active {
  background: linear-gradient(120deg, #1d4ed8, #2563eb);
  border-color: rgba(147, 197, 253, 0.45);
}

body.dark-mode .my-xc-summary__country-flag {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(96, 165, 250, 0.22);
  color: #e5eefb;
}

body.dark-mode .my-xc-summary__country-flag strong {
  color: #93c5fd;
}

body.dark-mode .my-xc-summary__filter-form input[type="date"].is-highlighted {
  background: rgba(120, 53, 15, 0.42);
  border-color: rgba(249, 115, 22, 0.48);
}

body.dark-mode .my-xc-summary__filter-toggle {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(96, 165, 250, 0.28);
  color: #dbeafe;
}

body.dark-mode .my-xc-summary__map-card > .my-xc-summary__filters .my-xc-summary__panel--collapsible {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(96, 165, 250, 0.2);
}

/* Compact flightbook map controls */
.my-xc-summary__stat--action,
.my-xc-summary__country-flag,
.my-xc-summary__reset--primary {
  border-radius: 8px;
}

.my-xc-summary__stat--action {
  padding: 0.62rem 0.92rem;
  min-width: 138px;
}

.my-xc-summary__country-flag {
  padding: 0.5rem 0.45rem;
  width: 84px;
}

.my-xc-summary__panel-header-actions {
  gap: 0.5rem;
}

.my-xc-summary__layout {
  display: block;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.my-xc-summary > .my-xc-summary__layout {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
}

.my-xc-summary,
.my-xc-summary__content,
.my-xc-summary__map-card,
.my-xc-summary__results {
  width: 100%;
  max-width: none;
}

.my-xc-summary__content,
.my-xc-summary__map-card,
.my-xc-summary__map-wrap,
#myXcSummaryMap {
  inline-size: 100%;
  min-inline-size: 0;
}

.my-xc-summary__filters {
  position: static;
  display: block;
  width: 100%;
}

.my-xc-summary__panel--collapsible {
  padding: 0.72rem 0.85rem;
}

.my-xc-summary__map-card > .my-xc-summary__filters {
  margin-bottom: 0.65rem;
}

.my-xc-summary__map-card > .my-xc-summary__filters .my-xc-summary__panel--collapsible {
  background: #f8fafc;
  border: 1px solid rgba(15, 76, 129, 0.14);
  box-shadow: none;
}

.my-xc-summary__panel--collapsible .my-xc-summary__panel-header {
  margin-bottom: 0;
}

.my-xc-summary__panel--collapsible.is-expanded .my-xc-summary__panel-header {
  margin-bottom: 0.75rem;
}

.my-xc-summary__panel-body[hidden] {
  display: none !important;
}

.my-xc-summary__filter-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 34px;
  padding: 0.32rem 0.78rem;
  border: 1px solid rgba(15, 76, 129, 0.2);
  border-radius: 8px;
  background: rgba(15, 76, 129, 0.08);
  color: #0f4c81;
  font-weight: 700;
  cursor: pointer;
}

.my-xc-summary__filter-toggle:hover,
.my-xc-summary__filter-toggle:focus-visible {
  background: rgba(15, 76, 129, 0.14);
  outline: none;
}

.my-xc-summary__filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.72rem;
}

.my-xc-summary__filter-form fieldset {
  margin: 0;
}

.my-xc-summary__reset--primary {
  padding: 0.32rem 0.82rem;
}

.my-xc-summary__map-card {
  position: relative;
}

.my-xc-summary__map-wrap {
  position: relative;
  width: 100%;
}

.my-xc-summary__map-mode-tabs {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 525;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid rgba(15, 76, 129, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.my-xc-summary__map-mode-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-width: 6.25rem;
  min-height: 2.05rem;
  padding: 0.34rem 0.68rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f4c81;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.my-xc-summary__map-mode-tab:hover,
.my-xc-summary__map-mode-tab:focus-visible {
  background: rgba(15, 76, 129, 0.08);
  outline: none;
}

.my-xc-summary__map-mode-tab.is-active {
  background: #0f4c81;
  color: #fff;
}

.my-xc-summary__map-controls {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 520;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.my-xc-summary__map-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid rgba(15, 76, 129, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f4c81;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.my-xc-summary__map-control:hover,
.my-xc-summary__map-control:focus-visible {
  background: #fff;
  border-color: rgba(15, 76, 129, 0.34);
  color: #08365f;
  outline: none;
  transform: translateY(-1px);
}

.my-xc-summary__map-control.is-active,
.my-xc-summary__map-control[aria-pressed="true"] {
  background: #0f4c81;
  border-color: #0f4c81;
  color: #fff;
}

.my-xc-summary__map-control--select select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.my-xc-summary__map-control i {
  pointer-events: none;
}

.my-xc-summary__timeline-index {
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
}

.my-xc-summary__timeline-index span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.28);
}

.my-xc-summary__timeline-popup-content {
  display: grid;
  gap: 0.34rem;
  min-width: 210px;
  color: #0f172a;
  font-size: 0.88rem;
}

.my-xc-summary__timeline-popup-head {
  display: grid;
  gap: 0.15rem;
}

.my-xc-summary__timeline-popup-head strong {
  color: #7f1d1d;
  font-size: 0.94rem;
}

.my-xc-summary__timeline-popup-head span {
  color: #475569;
  font-weight: 700;
}

.my-xc-summary__timeline-popup-actions {
  margin-top: 0.2rem;
}

.my-xc-summary__timeline-popup-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.34rem 0.7rem;
  border-radius: 6px;
  background: #0f4c81;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.my-xc-summary__fullscreen-toggle {
  min-height: 38px;
}

.my-xc-summary__fullscreen-toggle.is-active {
  background: #0f4c81;
  border-color: #0f4c81;
  color: #fff;
}

.my-xc-summary__fullscreen-toggle i {
  width: 1em;
  text-align: center;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card {
  grid-template-columns: minmax(210px, 34%) minmax(0, 1fr);
  min-height: 176px;
  width: 100%;
  min-width: 0;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__preview,
.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__preview-overlay {
  min-height: 176px;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__preview-placeholder {
  font-size: 1.35rem;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__body {
  gap: 0.5rem;
  padding: 0.72rem 0.85rem;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__title {
  font-size: 1.02rem;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__meta {
  font-size: 0.84rem;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem 0.55rem;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__metric {
  font-size: 0.86rem;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__status,
.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__metric-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__status img,
.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__metric-icon img {
  width: 1.05rem !important;
  height: 1.05rem !important;
  max-width: 1.05rem !important;
  max-height: 1.05rem !important;
  object-fit: contain;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__pilot-flag,
.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__launch img,
.my-xc-summary__results-list[data-view-mode="dashboard"] img[src*="/assets/images/country/"] {
  width: 20px !important;
  height: 14px !important;
  max-width: 20px !important;
  max-height: 14px !important;
  flex: 0 0 20px;
  border-radius: 2px;
  object-fit: cover;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__glider img {
  max-width: 4.8rem;
  height: 1.2rem;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__quick-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(15, 76, 129, 0.14);
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.08);
  color: #0f4c81;
  cursor: pointer;
}

.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__quick-actions button:hover,
.my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__quick-actions button:focus-visible {
  background: #0f4c81;
  color: #fff;
  outline: none;
}

.my-xc-summary__result-start-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.my-xc-summary__result-start-flag {
  width: 1.25rem;
  height: 0.9rem;
  flex: 0 0 auto;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.my-xc-summary__map-card:fullscreen,
.my-xc-summary__map-card:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0.75rem;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.my-xc-summary__map-card:fullscreen .my-xc-summary__map-wrap,
.my-xc-summary__map-card:-webkit-full-screen .my-xc-summary__map-wrap,
.my-xc-summary__map-card:fullscreen .my-xc-summary__map-status,
.my-xc-summary__map-card:-webkit-full-screen .my-xc-summary__map-status {
  flex: 0 0 auto;
}

.my-xc-summary__map-card:fullscreen .my-xc-summary__map-wrap,
.my-xc-summary__map-card:-webkit-full-screen .my-xc-summary__map-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.my-xc-summary__map-card:fullscreen .my-xc-summary__map,
.my-xc-summary__map-card:-webkit-full-screen .my-xc-summary__map {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border-radius: 8px;
}

.my-xc-summary__map-card:fullscreen .my-xc-summary__map-status,
.my-xc-summary__map-card:-webkit-full-screen .my-xc-summary__map-status {
  margin-top: 0.45rem;
}

body.dark-mode .my-xc-summary__fullscreen-toggle.is-active {
  background: #2563eb;
  border-color: rgba(147, 197, 253, 0.5);
  color: #fff;
}

body.dark-mode .my-xc-summary__map-card:fullscreen,
body.dark-mode .my-xc-summary__map-card:-webkit-full-screen {
  background: #0f172a;
}

body.dark-mode .my-xc-summary__map-control {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(96, 165, 250, 0.3);
  color: #dbeafe;
  box-shadow: 0 14px 26px rgba(2, 6, 23, 0.35);
}

body.dark-mode .my-xc-summary__map-control.is-active,
body.dark-mode .my-xc-summary__map-control[aria-pressed="true"] {
  background: #2563eb;
  border-color: rgba(147, 197, 253, 0.5);
  color: #fff;
}

body.dark-mode .my-xc-summary__map-mode-tabs {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 14px 26px rgba(2, 6, 23, 0.35);
}

body.dark-mode .my-xc-summary__map-mode-tab {
  color: #dbeafe;
}

body.dark-mode .my-xc-summary__map-mode-tab:hover,
body.dark-mode .my-xc-summary__map-mode-tab:focus-visible {
  background: rgba(96, 165, 250, 0.16);
}

body.dark-mode .my-xc-summary__map-mode-tab.is-active {
  background: #2563eb;
  color: #fff;
}

body.dark-mode .my-xc-summary__results-list[data-view-mode="dashboard"] {
  background: transparent;
  border: 0;
}

@media (max-width: 640px) {
  .my-xc-summary__map-card {
    padding: 0.55rem;
  }

  .my-xc-summary__map-controls {
    top: 0.55rem;
    left: 0.55rem;
    gap: 0.35rem;
  }

  .my-xc-summary__map-mode-tabs {
    top: 0.55rem;
    right: 0.55rem;
  }

  .my-xc-summary__map-mode-tab {
    min-width: 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
  }

  .my-xc-summary__map-mode-tab span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .my-xc-summary__map-control {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 9px;
  }

  .my-xc-summary__results-list[data-view-mode="dashboard"] {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__preview,
  .my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__preview-overlay {
    height: 165px;
    min-height: 165px;
  }

  .my-xc-summary__results-list[data-view-mode="dashboard"] .flight-dashboard-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
