/* ============================================================
   NamiBlu Strava Challenge Bridge — Frontend Styles
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --namiblu-strava: #FC4C02;
  --namiblu-primary: #0A2540;
  --namiblu-success: #1A9E5C;
  --namiblu-warning: #E6A817;
  --namiblu-surface: #FFFFFF;
  --namiblu-surface-alt: #F4F7FA;
  --namiblu-border: #DDE3EC;
  --namiblu-text: #1A2637;
  --namiblu-text-muted: #6B7A93;
  --namiblu-radius: 10px;
  --namiblu-shadow: 0 2px 12px rgba(10, 37, 64, .10);
}

/* ── Utility resets ─────────────────────────────────────────── */
.namiblu-progress-card *,
.namiblu-connect-card *,
.namiblu-join-card * {
  box-sizing: border-box;
}

/* ── Notices ────────────────────────────────────────────────── */
.namiblu-notice {
  padding: 12px 16px;
  border-radius: var(--namiblu-radius);
  margin-bottom: 16px;
  font-size: .93rem;
  font-weight: 500;
}

.namiblu-notice--success {
  background: #EDFAF3;
  color: var(--namiblu-success);
  border: 1px solid #A7E8C8;
}

.namiblu-notice--error {
  background: #FEF0EC;
  color: #C0391B;
  border: 1px solid #F9B9A8;
}

.namiblu-notice--info {
  background: #EEF3FB;
  color: var(--namiblu-primary);
  border: 1px solid #BDD0F0;
}

/* ── Buttons ────────────────────────────────────────────────── */
.namiblu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: filter .15s, transform .1s;
  line-height: 1;
}

.namiblu-btn:hover {
  filter: brightness(1.1);
}

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

.namiblu-btn--strava {
  background: var(--namiblu-strava);
  color: #fff;
}

.namiblu-btn--primary {
  background: var(--namiblu-primary);
  color: #fff;
}

.namiblu-btn--ghost {
  background: transparent;
  color: var(--namiblu-text-muted);
  border: 1px solid var(--namiblu-border);
}

.namiblu-btn--ghost:hover {
  color: var(--namiblu-text);
  border-color: #b0bfcf;
  filter: none;
  background: var(--namiblu-surface-alt);
}

.namiblu-btn--sm {
  padding: 7px 14px;
  font-size: .85rem;
}

/* ── Connect card ───────────────────────────────────────────── */
.namiblu-connect-card {
  background: var(--namiblu-surface);
  border: 1px solid var(--namiblu-border);
  border-radius: var(--namiblu-radius);
  padding: 24px;
  box-shadow: var(--namiblu-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.namiblu-connect-card--connected {
  border-left: 4px solid var(--namiblu-success);
}

.namiblu-connect-card__body h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--namiblu-text);
}

.namiblu-connect-card__body p {
  margin: 0 0 16px;
  color: var(--namiblu-text-muted);
  font-size: .93rem;
}

.namiblu-connect-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.namiblu-connect-card__icon {
  font-size: 2rem;
  line-height: 1;
}

.namiblu-connect-card__header strong {
  display: block;
  color: var(--namiblu-text);
  font-size: 1rem;
}

.namiblu-connect-card__status {
  display: block;
  font-size: .82rem;
  color: var(--namiblu-success);
  font-weight: 600;
  margin-top: 2px;
}

.namiblu-connect-card__athlete {
  display: block;
  font-size: .8rem;
  color: var(--namiblu-text-muted);
  margin-top: 1px;
}

/* ── Join card ──────────────────────────────────────────────── */
.namiblu-join-card {
  background: var(--namiblu-surface-alt);
  border: 2px dashed var(--namiblu-border);
  border-radius: var(--namiblu-radius);
  padding: 28px 24px;
  text-align: center;
}

.namiblu-join-card h3 {
  margin: 0 0 8px;
  color: var(--namiblu-text);
}

.namiblu-join-card p {
  margin: 0 0 18px;
  color: var(--namiblu-text-muted);
  font-size: .93rem;
}

/* ── Progress card ──────────────────────────────────────────── */
.namiblu-progress-card {
  background: var(--namiblu-surface);
  border: 1px solid var(--namiblu-border);
  border-radius: var(--namiblu-radius);
  padding: 24px;
  box-shadow: var(--namiblu-shadow);
}

.namiblu-progress-card--complete {
  border-top: 4px solid var(--namiblu-strava);
}

/* ── Badge banner ───────────────────────────────────────────── */
.namiblu-badge-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #FFF5F0 0%, #FFF0E8 100%);
  border: 1px solid #FBBF9A;
  border-radius: var(--namiblu-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.namiblu-badge-banner__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.namiblu-badge-banner__emoji {
  font-size: 2.8rem;
  line-height: 1;
}

.namiblu-badge-banner__label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--namiblu-primary);
}

.namiblu-badge-banner__subtitle {
  display: block;
  font-size: .83rem;
  color: var(--namiblu-strava);
  font-weight: 600;
  margin-top: 3px;
}

/* ── Reward message ─────────────────────────────────────────── */
.namiblu-reward-message {
  background: #FFFBF5;
  border-left: 3px solid var(--namiblu-warning);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  font-size: .93rem;
  color: var(--namiblu-text);
  margin-bottom: 20px;
}

/* ── Stats row ──────────────────────────────────────────────── */
.namiblu-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.namiblu-stat {
  background: var(--namiblu-surface-alt);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
}

.namiblu-stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--namiblu-primary);
  line-height: 1.1;
}

.namiblu-stat__label {
  display: block;
  font-size: .75rem;
  color: var(--namiblu-text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ── Progress bar ───────────────────────────────────────────── */
.namiblu-progress-bar {
  background: var(--namiblu-surface-alt);
  border-radius: 100px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.namiblu-progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--namiblu-strava) 0%, #FF7A45 100%);
  border-radius: 100px;
  transition: width .6s ease;
  min-width: 4px;
}

.namiblu-progress-card--complete .namiblu-progress-bar__fill {
  background: linear-gradient(90deg, var(--namiblu-success) 0%, #34D37B 100%);
}

/* ── Progress label ─────────────────────────────────────────── */
.namiblu-progress-label {
  font-size: .83rem;
  color: var(--namiblu-text-muted);
  margin: 0 0 16px;
  text-align: right;
}

/* ── Sync row ───────────────────────────────────────────────── */
.namiblu-sync-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.namiblu-sync-status {
  font-size: .83rem;
  color: var(--namiblu-text-muted);
}

/* ── Login gate ─────────────────────────────────────────────── */
.namiblu-progress-gate,
.namiblu-login-notice {
  background: var(--namiblu-surface-alt);
  border: 1px solid var(--namiblu-border);
  border-radius: var(--namiblu-radius);
  padding: 20px 24px;
  font-size: .93rem;
  color: var(--namiblu-text-muted);
}

.namiblu-progress-gate p {
  margin: 0 0 14px;
}

.namiblu-progress-gate p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
	.my-custom-sport-icon{
		width: 30px!important;
		height: 30px!important;
	}
}

@media (max-width: 767px) {
  .join-strava-club-sect .strava-club-logo {
    width: 120px !important;
    height: 120px !important;
  }
	
	.my-custom-sport-icon{
		width: 25px!important;
		height: 25px!important;
	}
}

@media (max-width: 480px) {
  .namiblu-connect-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .namiblu-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .namiblu-stat__value {
    font-size: 1.25rem;
  }
}

/* ── Confirm Active State ───────────────────────────────────── */
.namiblu-join-btn.namiblu-confirm-active {
  background: #d9534f !important;
  color: #fff !important;
  border-color: #d43f3a !important;
}

/* ── Strava Branded State Override ───────────────────────────── */
.namiblu-join-btn.namiblu-btn--strava {
  background-color: var(--namiblu-strava) !important;
  color: #ffffff !important;
  border: 1px solid var(--namiblu-strava) !important;
}

.namiblu-join-btn.namiblu-btn--strava:hover {
  filter: brightness(1.1) !important;
  background-color: var(--namiblu-strava) !important;
  color: #ffffff !important;
}

/* ── Strava Route Map Responsive & Shimmer Styling ────────────── */
@keyframes namiblu-map-shimmer {
  0% {
    background-color: var(--namiblu-surface-alt);
  }

  50% {
    background-color: #e5ebf2;
  }

  100% {
    background-color: var(--namiblu-surface-alt);
  }
}

.namiblu-route-map-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--namiblu-radius);
  overflow: hidden;
  box-shadow: var(--namiblu-shadow);
  border: 1px solid var(--namiblu-border);
  background: var(--namiblu-surface-alt);
  margin-bottom: 24px;
  animation: namiblu-map-shimmer 2s infinite ease-in-out;
}

/* Force the embedded iframe and placeholder to occupy full width and height dynamically */
.namiblu-route-map-wrapper iframe,
.namiblu-route-map-wrapper .strava-embed-placeholder,
.namiblu-route-map-wrapper .strava-embed-placeholder iframe {
  position: relative;
  z-index: 2;
  width: 100% !important;
  /*  height: 100% !important;*/
  display: block;
  border: none;
  background-color: #ffffff;
}

/* SVG Sporst Icons */
.my-custom-sport-icon {
  width: 40px;
  /* Adjust size */
  height: 40px;
  fill: #E25B3C;
  /* Dynamic fill color for SVG vectors */
  display: inline-block;
}

/* ── Smooth Scrolling & Reward Link UX ────────────────────────── */
html {
  scroll-behavior: smooth;
}

.namiblu-reward-link {
  color: var(--namiblu-strava, #FC4C02);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.namiblu-reward-link:hover {
  color: var(--namiblu-primary, #0A2540);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Location Map Shortcode ─────────────────────────────────── */
.namiblu-location-map-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--namiblu-radius, 10px);
  overflow: hidden;
  box-shadow: var(--namiblu-shadow, 0 2px 12px rgba(10, 37, 64, .10));
  border: 1px solid var(--namiblu-border, #DDE3EC);
  background: var(--namiblu-surface, #FFFFFF);
  margin-bottom: 24px;
}

.namiblu-location-map-wrapper iframe {
  display: block;
  width: 100% !important;
  border: none;
}

.namiblu-location-map-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--namiblu-border, #DDE3EC);
  background: var(--namiblu-surface-alt, #F4F7FA);
  font-size: 0.9rem;
  color: var(--namiblu-text, #1A2637);
  font-weight: 500;
}

.namiblu-location-map-address svg {
  fill: var(--namiblu-strava, #FC4C02);
  flex-shrink: 0;
}

/* ── Activity Feed ──────────────────────────────────────────── */
.namiblu-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom Scrollbar for activity feed */
.namiblu-activity-feed::-webkit-scrollbar {
  width: 6px;
}

.namiblu-activity-feed::-webkit-scrollbar-track {
  background: var(--namiblu-surface-alt, #F4F7FA);
  border-radius: 10px;
}

.namiblu-activity-feed::-webkit-scrollbar-thumb {
  background: var(--namiblu-border, #DDE3EC);
  border-radius: 10px;
}

.namiblu-activity-feed::-webkit-scrollbar-thumb:hover {
  background: var(--namiblu-text-muted, #6B7A93);
}

.namiblu-activity-embed {
  background: var(--namiblu-surface, #FFFFFF);
  border: 1px solid var(--namiblu-border, #DDE3EC);
  border-radius: var(--namiblu-radius, 10px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.namiblu-activity-embed iframe {
  display: block;
  border: none;
}

.namiblu-no-activities {
  text-align: center;
  padding: 24px;
  color: var(--namiblu-text-muted, #6B7A93);
  font-size: 0.93rem;
  background: var(--namiblu-surface-alt, #F4F7FA);
  border: 1px dashed var(--namiblu-border, #DDE3EC);
  border-radius: var(--namiblu-radius, 10px);
}

/* ── Activity Map Shortcode & Loader ────────────────────────── */
.namiblu-activity-map {
  position: relative;
  border-radius: var(--namiblu-radius, 10px);
  overflow: hidden;
  box-shadow: var(--namiblu-shadow, 0 2px 12px rgba(10, 37, 64, .10));
  border: 1px solid var(--namiblu-border, #DDE3EC);
  background: var(--namiblu-surface-alt, #F4F7FA);
}

.namiblu-map-loading-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--namiblu-text-muted, #6B7A93);
  font-size: 0.93rem;
  font-weight: 500;
  z-index: 1;
}

.namiblu-map-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(252, 76, 2, 0.15);
  /* Strava Orange light */
  border-radius: 50%;
  border-top-color: var(--namiblu-strava, #FC4C02);
  animation: namiblu-spin 0.8s linear infinite;
}

@keyframes namiblu-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── WhatsApp Button Styles ─────────────────────────────────── */
.namiblu-btn--whatsapp {
  background-color: #25D366 !important;
  color: #ffffff !important;
}

.namiblu-btn--whatsapp:hover {
  background-color: #20ba5a !important;
  color: #ffffff !important;
  filter: brightness(1.05) !important;
}

/* ============================================================
   NamiBlu Community Stats & Social Feed Component Styling (Strava Widget)
   ============================================================ */

/* ── Common Widget Layouts ─────────────────────────────────── */
.namiblu-strava-widget-stats,
.namiblu-strava-widget-feed-container {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  color: #333333;
}

.namiblu-widget-header {
  padding: 16px 20px 10px;
  border-bottom: 1px solid #f0f0f0;
}

.namiblu-widget-title {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.namiblu-widget-title a {
  color: #007fb6;
  text-decoration: none;
}

.namiblu-widget-title a:hover {
  text-decoration: underline;
}

.namiblu-widget-subtitle {
  font-size: 0.8rem;
  color: #8c8c8c;
  display: block;
}

/* ── Stats Widget specific ────────────────────────────────── */
.namiblu-strava-widget-stats .namiblu-widget-stats-body {
  padding: 20px;
}

.namiblu-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.namiblu-stat-col {
  display: flex;
  flex-direction: column;
}

.namiblu-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8c8c8c;
  margin-bottom: 6px;
  text-transform: capitalize;
}

.namiblu-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2b2b2b;
}

@media (max-width: 768px) {
  .namiblu-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 16px;
  }
}

@media (max-width: 480px) {
  .namiblu-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Feed Widget specific ─────────────────────────────────── */
.namiblu-community-feed-wrapper {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #fc4c02 #f5f5f5;
}

.namiblu-community-feed-wrapper::-webkit-scrollbar {
  width: 7px;
}

.namiblu-community-feed-wrapper::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.namiblu-community-feed-wrapper::-webkit-scrollbar-thumb {
  background-color: #fc4c02;
  border-radius: 4px;
}

.namiblu-widget-feed-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.namiblu-widget-feed-item:last-child {
  border-bottom: none;
}

.namiblu-widget-avatar-col {
  flex-shrink: 0;
}

.namiblu-widget-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e0e0e0;
  background: #f0f0f0;
}

.namiblu-widget-content-col {
  flex-grow: 1;
  min-width: 0;
  /* Prevents overflow in flexbox */
}

.namiblu-widget-athlete-name {
  font-size: 0.8rem;
  color: #8c8c8c;
  display: block;
  margin-bottom: 2px;
}

.namiblu-widget-activity-title {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.namiblu-widget-activity-title a {
  color: #007fb6;
  text-decoration: none;
}

.namiblu-widget-activity-title a:hover {
  text-decoration: underline;
}

.namiblu-widget-activity-stats {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 4px;
}

.namiblu-widget-stat-val:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 10px;
  background: #d9d9d9;
  margin-left: 12px;
  vertical-align: middle;
}

.namiblu-widget-activity-date {
  font-size: 0.75rem;
  color: #8c8c8c;
  display: block;
}

/* ── Widget Footers ───────────────────────────────────────── */
.namiblu-widget-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  border-radius: 0 0 4px 4px;
  gap:10px;
}

.namiblu-logo-strava img {
  height: 15px;
}

.namiblu-widget-cta-btn {
  height: 22px;
  font-size: 0.8em;
  line-height: 5px;
  font-weight: 600;
  background-color: #fc5200;
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 8px 10px;
  float: right;
  clear: both;
  border-radius: 3px;
  white-space: nowrap;
}

.namiblu-widget-cta-btn:hover {
  background: #e34000;
}

.namiblu-no-feed-activities {
  text-align: center;
  padding: 40px 20px;
  color: #8c8c8c;
  font-size: 0.9rem;
}

.namiblu-feed-card-photo{
  width: 100%;
}

p.namiblu-no-challenges{
  margin: 0px auto !important;
}