@charset "utf-8";

/**
 * kimsaem Modern Card Widget Skin for Rhymix
 * Clean, trendy Apple/Toss style card UI
 */

/* 기본 테마 변수 (Ocean Blue 기본값) */
.ks-widget-card {
    --ks-primary: #2563eb;
    --ks-primary-soft: #eff6ff;
    --ks-primary-hover: #1d4ed8;
    --ks-text-main: #191f28;
    --ks-text-sub: #8b95a1;
    --ks-text-body: #333d4b;
    --ks-border: #edf0f5;
    --ks-bg: #ffffff;
    --ks-item-hover: #f8fafc;
    --ks-comment: #8b95a1;
    
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    background: var(--ks-bg);
    border: 1px solid var(--ks-border);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    padding: 24px 22px 20px;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    word-break: break-all;
}

.ks-widget-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
}

/* 6대 테마 프리셋 */
.ks-widget-card.ks-theme-blue {
    --ks-primary: #2563eb;
    --ks-primary-soft: #eff6ff;
    --ks-primary-hover: #1d4ed8;
}

.ks-widget-card.ks-theme-indigo {
    --ks-primary: #6366f1;
    --ks-primary-soft: #eef2ff;
    --ks-primary-hover: #4f46e5;
}

.ks-widget-card.ks-theme-emerald {
    --ks-primary: #059669;
    --ks-primary-soft: #ecfdf5;
    --ks-primary-hover: #047857;
}

.ks-widget-card.ks-theme-pink {
    --ks-primary: #e11d48;
    --ks-primary-soft: #fff1f2;
    --ks-primary-hover: #be123c;
}

.ks-widget-card.ks-theme-orange {
    --ks-primary: #ea580c;
    --ks-primary-soft: #fff7ed;
    --ks-primary-hover: #c2410c;
}

.ks-widget-card.ks-theme-dark {
    --ks-primary: #1e293b;
    --ks-primary-soft: #f1f5f9;
    --ks-primary-hover: #0f172a;
}

/* 카드 헤더 */
.ks-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ks-header-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

/* 좌측 원형 소프트 뱃지 아이콘 */
.ks-badge-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background-color: var(--ks-primary-soft);
    color: var(--ks-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    transition: transform 0.2s ease;
}

.ks-widget-card:hover .ks-badge-icon {
    transform: scale(1.05);
}

.ks-badge-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.ks-badge-icon i {
    font-size: 20px;
    line-height: 1;
}

/* 타이틀 & 서브타이틀 */
.ks-header-text {
    display: flex;
    flex-direction: column;
}

.ks-main-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--ks-text-main);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.4px;
}

.ks-sub-title {
    font-size: 13px;
    font-weight: 400;
    color: var(--ks-text-sub);
    line-height: 1.4;
    margin: 3px 0 0 0;
    letter-spacing: -0.2px;
}

/* 우측 더 보기 링크 */
.ks-more-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ks-primary);
    text-decoration: none;
    padding: 6px 4px;
    white-space: nowrap;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ks-more-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 상단 탭 스타일 */
.ks-tab-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f1f3f5;
    -webkit-overflow-scrolling: touch;
}

.ks-tab-bar::-webkit-scrollbar {
    display: none;
}

.ks-tab-item {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: #f2f4f6;
    color: #6b7684;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.ks-tab-item:hover {
    background: #e5e8eb;
    color: #333d4b;
}

.ks-tab-item.active {
    background: var(--ks-primary);
    color: #ffffff;
    font-weight: 600;
}

/* 게시물 리스트 */
.ks-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ks-post-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ks-post-item + .ks-post-item {
    margin-top: 2px;
}

/* 리스트 아이템 링크 */
.ks-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.ks-item-link:hover {
    background-color: var(--ks-item-hover);
}

.ks-item-main {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    margin-right: 12px;
}

/* 카테고리 / 말머리 */
.ks-category {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ks-text-body);
    white-space: nowrap;
    margin-right: 4px;
    flex-shrink: 0;
}

/* 게시물 제목 */
.ks-title {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ks-text-body);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    letter-spacing: -0.2px;
    transition: color 0.15s ease;
}

.ks-item-link:hover .ks-title {
    color: var(--ks-primary);
}

/* New 뱃지/도트 */
.ks-new-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background-color: #f04452;
    margin-left: 6px;
    flex-shrink: 0;
    display: inline-block;
}

/* 우측 댓글 수 카운트 */
.ks-comment-count {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ks-comment);
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.2px;
}

/* 빈 목록 표시 */
.ks-empty-list {
    text-align: center;
    padding: 30px 0;
    color: var(--ks-text-sub);
    font-size: 14px;
}

/* 모바일 반응형 최적화 */
@media (max-width: 480px) {
    .ks-widget-card {
        padding: 18px 16px 14px;
        border-radius: 20px;
    }
    .ks-badge-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        margin-right: 10px;
    }
    .ks-badge-icon svg {
        width: 18px;
        height: 18px;
    }
    .ks-main-title {
        font-size: 15.5px;
    }
    .ks-sub-title {
        font-size: 12px;
    }
    .ks-more-link {
        font-size: 13px;
    }
    .ks-item-link {
        padding: 8px 6px;
    }
    .ks-title,
    .ks-category {
        font-size: 13.5px;
    }
    .ks-comment-count {
        font-size: 12.5px;
    }
}
