/**
 * 파일경로: /assets/css/pt/lifelink-pt.css
 * 파일역할: PT Module Styles (Catalog & Player) (Ver 2.2 - Filter UI Added)
 * * [수정됨] 필터 그룹(Group) 및 통증 회피용 Warning Chip 스타일 추가
 */

/* --- PT Main Catalog --- */
.ll-pt-main-page {
    background-color: #f8f9fa;
}

.ll-pt-body {
    padding-top: 10px;
}

/* Hero Section */
.ll-pt-hero {
    background: linear-gradient(135deg, #2d3436 0%, #000000 100%);
    border-radius: 24px;
    padding: 30px 24px;
    color: #fff;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ll-pt-hero::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.ll-pt-hero-badge {
    display: inline-block;
    background: rgba(75, 123, 236, 0.2);
    color: #4b7bec;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(75, 123, 236, 0.3);
    width: fit-content;
}

.ll-pt-hero h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.ll-pt-hero p {
    font-size: 14px;
    color: #b2bec3;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.ll-pt-start-btn {
    background: #4b7bec;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(75, 123, 236, 0.4);
}
.ll-pt-start-btn:active { transform: scale(0.96); }

/* Themes Section */
.ll-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
    padding: 0 4px;
}
.ll-section-header h3 { font-size: 18px; font-weight: 700; margin: 0; color: #2d3436; }
.ll-section-sub { font-size: 12px; color: #636e72; }

.ll-theme-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 4px 20px 4px; 
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ll-theme-scroll::-webkit-scrollbar { display: none; }

.ll-theme-card {
    flex: 0 0 100px;
    background: #fff;
    border: 1px solid #f1f2f6;
    border-radius: 18px;
    padding: 15px 10px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.ll-theme-card.is-active {
    border-color: #4b7bec;
    background: #f0f5ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(75, 123, 236, 0.15);
}
.ll-theme-icon { font-size: 32px; margin-bottom: 8px; }
.ll-theme-name { font-size: 13px; font-weight: 600; color: #2d3436; }

/* Filter UI (Enhanced) */
.ll-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.ll-filter-group {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ll-filter-group::-webkit-scrollbar { display: none; }

.ll-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #2d3436;
    margin-right: 5px;
    white-space: nowrap;
}

.ll-filter-chip {
    background: #fff;
    border: 1px solid #dfe6e9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #636e72;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
}

.ll-filter-chip.active {
    background: #2d3436;
    color: #fff;
    border-color: #2d3436;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(45, 52, 54, 0.2);
}

/* Pain Avoidance Style */
.ll-filter-chip.warning {
    border-color: #ffcccc;
    color: #ff7675;
    background: #fff5f5;
}
.ll-filter-chip.warning.active {
    background: #ff7675;
    color: #fff;
    border-color: #ff7675;
    box-shadow: 0 2px 6px rgba(255, 118, 117, 0.3);
}

/* Program List */
.ll-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding-bottom: 40px;
}

.ll-prog-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: transform 0.2s;
    cursor: pointer;
}
.ll-prog-card:active { transform: scale(0.98); }

.ll-prog-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
}
.ll-prog-title {
    font-size: 15px;
    font-weight: 700;
    color: #2d3436;
    margin: 0;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.ll-prog-stars {
    flex-shrink: 0;
    font-size: 12px;
    color: #636e72;
}
.ll-prog-desc {
    font-size: 13px;
    color: #636e72;
    margin: 0;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ll-prog-meta {
    font-size: 12px;
    color: #636e72;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.ll-prog-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero card (recommendation area) */
.ll-pt-hero-card {
    background: linear-gradient(135deg, #2d3436 0%, #000000 100%);
    border-radius: 24px;
    padding: 24px 20px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}
.ll-pt-hero-card .ll-pt-hero-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.3;
    color: #fff;
}
.ll-pt-hero-card .ll-pt-hero-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin: 0 0 16px 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ll-pt-impact-banner {
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
}

/* Mobile: tighter list & hero */
@media (max-width: 480px) {
    .ll-program-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-bottom: 32px;
    }
    .ll-prog-card {
        padding: 14px 16px;
        gap: 8px;
    }
    .ll-prog-title { font-size: 14px; }
    .ll-prog-desc { font-size: 12px; }
    .ll-pt-hero-card {
        padding: 20px 16px;
    }
    .ll-pt-hero-card .ll-pt-hero-title { font-size: 18px; }
    .ll-pt-hero-card .ll-pt-hero-desc {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

.ll-prog-icon {
    width: 56px;
    height: 56px;
    background: #f1f2f6;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #b2bec3;
}
.ll-prog-info h4 { margin: 0 0 6px 0; font-size: 16px; font-weight: 700; color: #2d3436; }
.ll-prog-meta { font-size: 12px; color: #636e72; display: flex; align-items: center; gap: 6px; }
.ll-prog-play { margin-left: auto; color: #4b7bec; font-size: 20px; }


/* --- PT Player (Overlay) --- */
.ll-pt-session {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.ll-pt-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}
.ll-pt-title { font-size: 16px; font-weight: 600; margin: 0; }

.ll-pt-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ll-pt-video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
}

.ll-video-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-direction: column;
    z-index: 10;
    text-align: center;
    padding: 20px;
}
.ll-video-overlay h2 { margin: 0 0 10px 0; font-size: 24px; }
.ll-video-overlay p { margin: 0 0 20px 0; opacity: 0.8; }

.ll-pt-controls {
    flex: 1;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
}

/* Timer Ring */
.ll-pt-timer-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 30px;
}
.ll-timer-ring { transform: rotate(-90deg); }
.ll-ring-bg { fill: none; stroke: #f1f2f6; stroke-width: 8; }
.ll-ring-bar { 
    fill: none; stroke: #4b7bec; stroke-width: 8; stroke-linecap: round;
    transition: stroke-dashoffset 1s linear; 
}
.ll-timer-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 800;
    color: #2d3436;
    font-variant-numeric: tabular-nums;
}

.ll-pt-status { text-align: center; margin-bottom: 40px; }
.ll-badge-step { 
    background: #e5edff; color: #4b7bec; 
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; 
    margin-bottom: 10px; display: inline-block;
}
.ll-current-action { font-size: 24px; font-weight: 700; margin: 0 0 8px 0; }
.ll-next-action { font-size: 14px; color: #999; }

.ll-pt-btn-row { display: flex; gap: 20px; }
.ll-btn-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    background: #f1f2f6; color: #2d3436;
    transition: all 0.2s;
}
.ll-btn-circle:active { background: #dfe6e9; transform: scale(0.95); }
#ll-btn-pause { background: #fff; border: 2px solid #eee; }
#ll-btn-skip { background: #e5edff; color: #4b7bec; }