/* mps-styles.css - estilos globales del plugin */

.mps-athlete-card {
    display:flex;
    gap:15px;
    align-items:center;
    margin-bottom:18px;
}

.mps-athlete-card img {
    border-radius:100%;
    width:80px;
    height:80px;
    object-fit:cover;
}

.mps-activities-heading { margin-top:0; margin-bottom:12px; font-size:18px; color:#111; }

#activities-feed { display:flex; flex-direction:column; gap:20px; }

/* Card */
.activity-card {
    background:#fff;
    border-radius:12px;
    padding:15px;
    box-shadow:0 2px 10px rgba(0,0,0,0.06);
    display:flex;
    flex-direction:column;
    gap:8px;
    opacity:0;
    transform:translateY(10px);
    animation:mpsFadeIn .36s ease forwards;
}

/* Fade-in */
@keyframes mpsFadeIn {
    to { opacity:1; transform:translateY(0); }
}

/* Day separator */
.mps-day-sep { margin-top:30px; margin-bottom:10px; }

/* Small meta row */
.mps-meta-row { display:flex; gap:20px; margin-top:10px; font-size:14px; color:#333; }

/* Icon */
.mps-activity-icon { font-size:20px; }

/* Loader area */
#activities-loader { text-align:center; padding:20px 0; }

/* Skeleton */
.mps-skeleton-card {
    background:#fff;
    border-radius:12px;
    padding:15px;
    margin-bottom:12px;
    display:flex;
    flex-direction:column;
    gap:10px;
    overflow:hidden;
    position:relative;
}

.mps-skel-bar { background:#eee; border-radius:4px; height:14px; width:100%; position:relative; overflow:hidden; }
.mps-skel-row { display:flex; gap:12px; margin-top:8px; }
.mps-skel-bar::after {
    content:"";
    position:absolute;
    top:0;
    left:-120%;
    width:120%;
    height:100%;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation:mpsShimmer 1.1s ease-in-out infinite;
}
@keyframes mpsShimmer { 100% { left:100%; } }

/* Responsive tweaks */
@media (max-width:640px) {
    .activity-card { padding:12px; }
    .mps-athlete-card img { width:60px; height:60px; }
}


/* -----------------------------------------
   ATHLETE CARD — Same style as activities
----------------------------------------- */

.mps-athlete-card {
    background:#fff;
    border-radius:14px;
    padding:18px;
    box-shadow:0 3px 12px rgba(0,0,0,0.08);
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-bottom:20px;
    opacity:0;
    transform:translateY(8px);
    animation:mpsFadeIn .35s ease forwards;
}

.mps-athlete-header {
    display:flex;
    align-items:center;
    gap:15px;
}

.mps-athlete-photo-wrapper {
    width:55px;
    height:55px;
    border-radius:50%;
    overflow:hidden;
    background:#f3f3f3;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:inset 0 1px 3px rgba(0,0,0,0.08);
}

.mps-athlete-photo {
    width:100%;
    height:100%;
    object-fit:cover;
}

.mps-athlete-name {
    font-size:17px;
    font-weight:600;
    color:#111;
}

.mps-athlete-link {
    font-size:14px;
    color:var(--accent);
    text-decoration:none;
}

.mps-athlete-link:hover {
    text-decoration:underline;
}

/* Panel oculto inicialmente */
.mps-extra-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all .35s ease;
    margin-top: 10px;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

/* Panel desplegado */
.mps-toggle-card.active .mps-extra-panel {
    max-height: 5000px; /* suficiente para todo */
    opacity: 1;
}

/* Marcar tarjeta clicable si tiene info extra */
.mps-toggle-card[data-has-extra="1"] {
    cursor: pointer;
}

/* Bloques dentro del panel */
.mps-extra-block {
    margin-bottom: 10px;
}

.mps-extra-block strong {
    color:#111;
    font-weight:600;
}

/* Header con icono de despliegue */
.mps-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Icono SVG */
.mps-toggle-icon svg {
    transition: transform .25s ease, color .25s ease;
    color: #888;
}

/* Tarjeta clicable */
.mps-toggle-card[data-has-extra="1"] {
    cursor: pointer;
}

/* Hover */
.mps-toggle-card[data-has-extra="1"]:hover .mps-toggle-icon svg {
    color: var(--accent);
}
button.mps-activity-toggle-btn:hover, button.mps-activity-toggle-btn:focus{
    background: none !important;
}

/* Rotación cuando está abierto */
.mps-toggle-card.active .mps-toggle-svg svg {
    transform: rotate(180deg);
    color: var(--accent);
}

/* Panel oculto inicialmente */
.mps-extra-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all .35s ease;
    margin-top: 10px;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

/* Panel desplegado */
.mps-toggle-card.active .mps-extra-panel {
    max-height: 500px;
    opacity: 1;
}

/* Description debajo del título */
.mps-activity-description {
    font-size: 13px;
    color: #555;
    margin-top: 5px;
    line-height: 1.4;
}

/* =========================
   MPS - Activity Card (premium)
   ========================= */

.mps-activity-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
    transition: transform .16s ease, box-shadow .16s ease;
    margin-bottom: 16px;
    overflow: visible;
}

.mps-activity-card:focus-within,
.mps-activity-card:hover {
    box-shadow: 0 10px 26px rgba(16,24,40,0.08);
}

/* Top button */
.mps-activity-top { margin: 0; padding: 0; }
.mps-activity-toggle-btn {
    width: 100%;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border:0;
    background:transparent;
    padding:0;
    cursor: pointer;
    text-align:left;
}

/* Left area */
.mps-activity-left { display:flex; gap:12px; align-items:flex-start; }

/* Icon circle */
.mps-activity-icon-wrapper {
    width:56px;
    height:56px;
    border-radius:50%;
    background:#f4f6f8;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
    flex: 0 0 56px;
}
.mps-activity-icon { font-size:24px; line-height:1; }

/* Main text */
.mps-activity-main { flex:1; min-width:0; }
.mps-activity-title {
    display:block;
    font-weight:700;
    font-size:16px;
    color:#0f1724;
    line-height:1.2;
}
.mps-activity-shortdesc {
    margin-top:6px;
    font-size:13px;
    color:#525f7a;
    line-height:1.4;
    max-height:3.6em;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* Subline */
.mps-activity-sub { margin-top:8px; font-size:13px; color:#6b7280; }

/* Right area */
.mps-activity-right { display:flex; align-items:center; gap:12px; flex-shrink:0; padding-top:15px; }

/* Metric pills */
.mps-metric-pills { 
    display: flex;
    flex-wrap: wrap;   
    gap:10px; 
    align-items:center; 
}

.mps-pill {
    display:flex;
    align-items:center;
    gap:8px;
    background:#fbfbfd;
    border-radius:10px;
    padding:6px 8px;
    min-width:64px;
    box-shadow: 0 1px 2px rgba(11,15,25,0.02);
    font-size:13px;
}
.mps-pill-suffer { background:#fff7ed; border:1px solid rgba(255,85,0,0.06); }
.mps-pill-icon { color:#9aa3b2; }
.mps-pill-value { font-weight:700; color:#0f1724; }
.mps-pill-label { font-size:11px; color:#6b7280; }

/* Toggle chevron */
.mps-toggle-svg svg,
.mps-toggle-svg polyline {
    color:#9aa3b2;
    transition: transform .25s ease, color .25s ease;
}

/* When hovered */
/*.mps-toggle-card[data-has-extra="1"]:hover .mps-toggle-svg svg,
.mps-toggle-card[data-has-extra="1"]:hover .mps-pill { color:var(--accent); }*/

/* Extra panel */
.mps-extra-panel {
    margin-top:12px;
    padding:0 14px;
    border-radius:10px;
    background:#fbfdff;
    border:1px solid rgba(15,23,36,0.03);
    max-height:0;
    overflow:hidden;
    opacity:0;
    transition: max-height .36s cubic-bezier(.2,.8,.2,1), opacity .28s ease, padding .28s ease;
}

/* When open -> class active will be toggled by JS */
.mps-toggle-card.active .mps-extra-panel {
    max-height: 1000px; /* generous max to animate */
    opacity:1;
    padding:12px 14px;
    font-size: 15px;
}

/* Extra block */
.mps-extra-block { margin-bottom:10px; }
.mps-extra-title { font-weight:700; color:#0f1724; margin-bottom:6px; }
.mps-extra-text { color:#374151; line-height:1.5; margin:0; }

/* Accessibility focus */
.mps-activity-toggle-btn:focus { outline: 3px solid rgba(59,130,246,0.12); border-radius:10px; }

/* Responsive */
@media (max-width:720px) {
    .mps-activity-icon-wrapper { width:55px; height:55px; }
    .mps-pill { padding:6px 6px; min-width:56px;  margin-bottom: 10px;}
    .mps-activity-title { font-size:15px; }
}

#strava-connection {
    display: block;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}


/* ========= STRUCTURE ========== */
.mps-struct-section { margin-bottom:18px; }

.mps-struct-title {
    font-weight:700;
    font-size:14px;
    margin-bottom:8px;
}

/* Color labels */
.mps-struct-warmup .mps-struct-title { color:#d97706; }
.mps-struct-main    .mps-struct-title { color:#2563eb; }
.mps-struct-cooldown .mps-struct-title { color:#7c3aed; }

/* Simple boxed text */
.mps-struct-box {
    background:#fff;
    border-radius:10px;
    padding:12px;
    font-size:14px;
    box-shadow:0 1px 4px rgba(0,0,0,0.05);
}

/* INTERVAL CARD */
.mps-struct-interval {
    background:#fff;
    border-radius:10px;
    padding:14px;
    box-shadow:0 1px 5px rgba(0,0,0,0.06);
    margin-bottom:12px;
}

.mps-interval-heading {
    font-weight:700;
    margin-bottom:10px;
}

.mps-interval-meta {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:10px;
}

.mps-interval-pill {
    background:#f5f7fa;
    padding:6px 10px;
    border-radius:8px;
    font-size:13px;
}

.mps-interval-description {
    font-size:13px;
    color:#4b5563;
}