/* 
 * SOMA Minihome Global Design 
 * 모든 미니홈피 관련 디자인은 이 파일에서 통일합니다.
 */

/* 1. 기본 폰트 및 배경 설정 */
.soma-minihome-container {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 2. 컨텐츠 박스 공통 디자인 (그림자 없이 깔끔한 선 위주) */
.soma-content-box {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* 3. 섹션 제목 (일촌평, 방명록 등 상단 제목줄) */
.soma-section-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ff6600; /* HONDAL Orange 포인트 */
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 4. 리스트 아이템 (한 줄씩 구분되는 점선) */
.soma-list-item {
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}

/* 5. 강조 텍스트 및 링크 (작성자 이름 등) */
.soma-user-link {
    color: #ff6600;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dashed #ff6600;
}
.soma-user-link:hover {
    color: #e65c00;
}

/* 6. 날짜 및 부가정보 */
.soma-meta-text {
    color: #bbb;
    font-size: 11px;
    margin-left: 8px;
}

/* 프로필 상단 버튼 영역 (공개 메시지, 친구 관리 등) 완전 제거 */
.member-header-actions.action,
#post-mention,
.friendship-button,
.generic-button {
    display: none !important;
}

/* BuddyPress 기본 프로필 헤더의 액션 버튼 그룹 전체 숨김 */
#item-header-content #item-buttons,
#item-header-content .action {
    display: none !important;
}

/* 방명록 페이지네이션 스타일 개선 */
.soma-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 25px 0;
    padding: 10px 0;
}

.soma-pagination a, 
.soma-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 5px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s ease;
}

/* 현재 페이지 강조 (오렌지 포인트) */
.soma-pagination .current,
.soma-pagination span.current {
    background: #ff6600 !important;
    color: #fff !important;
    border-color: #ff6600 !important;
    font-weight: bold;
}

/* 마우스 호버 및 터치 시 피드백 */
.soma-pagination a:active,
.soma-pagination a:hover {
    background: #f8f8f8;
    border-color: #ff6600;
    color: #ff6600;
}

/* 모바일 전용: 터치 영역 확대 */
@media (max-width: 768px) {
    .soma-pagination {
        gap: 12px; /* 버튼 사이 간격 더 넓게 */
    }
    .soma-pagination a, 
    .soma-pagination span {
        min-width: 42px; /* 모바일에서 더 크게 */
        height: 42px;
        font-size: 16px;
    }
}

/* 메뉴 컨테이너: 화살표/그라데이션 표시를 위해 상대 위치 설정 */
#object-nav {
    position: relative;
    margin-bottom: 15px;
}

/* 메뉴 리스트: 한 줄 유지 및 가로 스크롤 */
#object-nav ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px 5px !important;
    border-bottom: 2px solid #f5f5f5;
}

/* 스크롤바 숨기기 */
#object-nav ul::-webkit-scrollbar {
    display: none;
}

/* 가로 스크롤 힌트 (양옆 그라데이션 효과) */
#object-nav::before,
#object-nav::after {
    content: '';
    position: absolute;
    top: 0;
    width: 30px;
    height: 100%;
    z-index: 2;
    pointer-events: none; /* 클릭 방해 금지 */
    transition: opacity 0.3s;
}

/* 왼쪽 화살표 느낌의 그라데이션 */
#object-nav::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0));
    content: '◀';
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 10px;
    color: #ff6600;
    padding-left: 2px;
}

/* 오른쪽 화살표 느낌의 그라데이션 */
#object-nav::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.9), rgba(255,255,255,0));
    content: '▶';
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 10px;
    color: #ff6600;
    padding-right: 2px;
}

/* PC에서는 화살표 숨기기 (스크롤이 필요 없으므로) */
@media (min-width: 769px) {
    #object-nav::before,
    #object-nav::after {
        display: none;
    }
}



/* 훈련 리스트
/* 훈련일지 전용 추가 스타일 */
    .soma-log-header { 
        display: flex; 
        justify-content: space-between; 
        align-items: center; 
        margin-bottom: 20px; 
        padding-bottom: 15px; 
        border-bottom: 2px solid #ff6600;
    }
    .btn-write { 
        background: #ff6600; 
        color: #fff; 
        border: none; 
        padding: 8px 16px; 
        border-radius: 6px; 
        cursor: pointer; 
        font-weight: bold; 
        font-size: 12px;
    }
    .soma-table-wrapper { 
        width: 100%; 
        background: #fff; 
        border-radius: 8px; 
    }
    .soma-list-table { width: 100%; border-collapse: collapse; }
    .soma-list-table th { 
        background: #fcfcfc; 
        padding: 12px; 
        text-align: center; 
        font-size: 11px; 
        color: #666; 
        border-bottom: 1px solid #eee; 
    }
    .soma-list-table td { 
        padding: 15px 10px; 
        border-bottom: 1px solid #f5f5f5; 
        font-size: 12px; 
        text-align: center; 
    }
    .soma-list-table tr:hover { background: #fffaf5; cursor: pointer; }
    
    .badge-dist { 
        background: #2c3e50; 
        color: #fff; 
        padding: 3px 8px; 
        border-radius: 12px; 
        font-weight: bold; 
        font-size: 10px;
    }
    .badge-pace { color: #ff6600; font-weight: bold; }
    .log-detail-row { display: none; background: #fafafa; }
    .img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .img-item { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }

    /* --- 모바일 카드형 리스트 핵심 CSS --- */
   @media (max-width: 600px) {
    /* 클릭 가능한 영역임을 알리는 디자인 */
    .soma-list-table tr {
        margin-bottom: 12px;
        border: 1px solid #eee;
        border-radius: 12px;
        background: #fff;
        padding: 5px 10px;
        transition: background 0.2s;
    }
        .soma-list-table thead { display: none; } /* 헤더 숨김 */
        
        .soma-list-table tr {
            margin-bottom: 15px;
            border: 1px solid #eee;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            overflow: hidden;
            position: relative;
            padding: 10px;
        }

        .soma-list-table td {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 5px !important;
            border-bottom: 1px dashed #f0f0f0 !important;
            text-align: right;
        }

        .soma-list-table td:last-child { border-bottom: none !important; }

        /* 왼쪽 설명 라벨 강제 삽입 */
        .soma-list-table td::before {
            content: attr(data-label);
            font-weight: bold;
            color: #999;
            font-size: 11px;
            flex-shrink: 0;
        }
        
        /* 상세 내용은 카드 안에 꽉 차게 */
    /* 상세 내역 행 스타일 초기화 (중요) */
    .log-detail-row {
        display: none; /* 기본은 숨김 */
        border: none !important;
        background: transparent !important;
        margin-top: -10px !important; /* 위 카드와 밀착 */
    }
  /* 상세 내역 안의 TD (라벨 제거) */
    .log-detail-row td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
    }
	/* 상세 내역 td::before 라벨 숨기기 */
    .log-detail-row td::before {
        content: none !important;
    }
    
	
/* 1. 훈련일지, 일촌평(홈), 방명록 페이지에서 빈 서브메뉴 영역 완전히 제거 */
.bp-user.home #subnav.user-subnav,
.bp-user.training-log #subnav.user-subnav,
.bp-user.guestbook #subnav.user-subnav {
    display: none !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* 2. 메뉴와 본문 사이의 간격 미세 조정 */
.bp-user.home #item-body,
.bp-user.training-log #item-body,
.bp-user.guestbook #item-body {
    padding-top: 0 !important;
    margin-top: -10px !important; /* 위로 살짝 더 끌어올림 */
}

/* 3. 일촌평 박스(soma-ichon-box) 상단 여백 조절 */
#soma-ichon-box {
    margin-top: 10px !important; /* 너무 붙었다 싶으면 이 값을 늘리세요 */
}
/* 1. 디자인 시스템 변수 정의: 모든 파일의 색상을 통일합니다. */
/* 1. 디자인 시스템 변수 */
:root {
    --soma-main-orange: #ff6600;
    --soma-bg-light: #fcfcfc;
    --soma-border-color: #ddd;
    --soma-text-dark: #333;
    --soma-text-gray: #666;
    --soma-table-header: #f8f9fa;
}

/* 2. 공통 컨테이너 */
.soma-content-box {
    background: #ffffff;
    border: 1px solid var(--soma-border-color);
    border-radius: 4px; /* 미니홈피 느낌을 위해 약간 각지게 */
    padding: 20px;
    margin-bottom: 20px;
}

.soma-section-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--soma-main-orange);
    border-bottom: 2px solid var(--soma-main-orange);
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

/* 3. 서브 메뉴 (정보 보기, 수정 등) 한 줄 정렬 */
#subnav {
    display: block !important; /* 사라졌던 메뉴 다시 보이게 설정 */
    margin-bottom: 15px !important;
}

#subnav ul {
    display: flex !important;
    flex-wrap: nowrap !important; /* 줄바꿈 절대 방지 */
    overflow-x: auto !important; /* 넘치면 가로 스크롤 */
    gap: 10px !important;
    padding: 5px 0 !important;
    border: none !important;
}

#subnav ul li {
    flex: 0 0 auto !important;
    background: none !important;
}

#subnav ul li a {
    white-space: nowrap !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
}

/* 4. 러너 상세 프로필 테이블 수정 */
/* 4. 러너 상세 프로필 테이블 수정 (2열 강제 고정 및 빈 공간 제거) */
.soma-list-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #eee !important;
    table-layout: auto !important; /* 고정 너비 해제하여 빈 공간 방지 */
    margin: 0 !important;
}

.soma-list-table tr {
    display: table-row !important;
}

.soma-list-table th {
    background-color: var(--soma-table-header) !important;
    color: var(--soma-text-gray) !important;
    padding: 12px 15px !important;
    border: 1px solid #eee !important;
    text-align: left !important;
    font-size: 13px !important;
    white-space: nowrap; /* 항목 이름 줄바꿈 방지 */
    width: 1% !important; /* 내용만큼만 너비 차지 */
}

.soma-list-table td {
    padding: 12px 15px !important;
    border: 1px solid #eee !important;
    text-align: center !important; /* 기록 중앙 정렬 */
    font-weight: bold;
    font-size: 14px;
    background: #fff !important;
}

/* 혹시 존재할지 모르는 3번째 칸 숨기기 */
.soma-list-table td:nth-child(3),
.soma-list-table th:nth-child(3) {
    display: none !important;
}

/* 5. 응원 문구 박스 */
.soma-cheer-box {
    margin-top: 25px;
    padding: 20px;
    background: var(--soma-bg-light);
    border-radius: 8px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

/* 스크롤바 숨기기 (선택 사항 - 깔끔한 디자인을 위해) */
#subnav ul#member-secondary-nav::-webkit-scrollbar {
    display: none;
}


/* 6. 이미지 그리드 관련 */
.soma-mini-img-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.soma-mini-img-item { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; border: 1px solid #ddd; }





/* 러닝용품후기-대회후기 공용 css */

/* 1. 평점 그리드: 4열 1행 유지 */
.rating-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

/* 2. 각 항목: 라벨과 바, 숫자를 수직 배치 */
.rating-grid > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.rating-value {
    font-weight: bold;
    color: #1a365d;
    font-size: 14px;
}

/* 3. 슬라이더 디자인 */
.rating-grid input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100% !important;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    outline: none;
    margin: 5px 0 15px 0 !important;
}

.rating-grid input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #1a365d;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* 4. 컨테이너 및 공통 레이아웃 */
.hondal-board-container { 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
    box-sizing: border-box; 
}

/* 5. 상단 컨트롤 영역 (필터 + 검색) */
.gear-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-bar { display: flex; gap: 8px; margin-bottom: 0 !important; }
.filter-bar a {
    padding: 8px 16px; 
    border-radius: 6px; 
    border: 1px solid #e2e8f0; 
    text-decoration: none; 
    font-size: 13px; 
    background: #fff; 
    color: #475569;
    transition: all 0.2s;
}
.filter-bar a.active { background: #1a365d; color: #fff; border-color: #1a365d; }

@media screen and (max-width: 600px) {
    /* 1. 상세 평점: 한 줄에 하나씩(세로) 나열하여 조작 편의성 증대 */
    .rating-grid {
        grid-template-columns: 1fr !important; /* 4열에서 1열로 변경 */
        gap: 20px !important;
        margin: 10px 0 !important;
    }

    /* 2. 검색바: 모델명 검색창과 버튼을 가로로 한 줄 배치 */
    .gear-controls {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .gear-search-wrapper {
        display: flex !important;
        width: 100% !important;
        min-width: auto !important; /* 너비 고정 해제 */
        height: 36px !important; /* 높이 줄임 */
    }

    .gear-search-input {
        flex: 1 !important; /* 입력창이 남은 공간 다 차지 */
        height: 100% !important;
        padding: 0 10px !important;
        font-size: 13px !important;
        border: 1px solid #e2e8f0 !important;
        border-right: none !important; /* 버튼과 연결 */
    }

    .gear-search-btn {
        width: 60px !important; /* 검색 버튼 크기 축소 */
        height: 100% !important;
        padding: 0 !important;
        font-size: 13px !important;
        background: #1a365d !important;
        border-radius: 0 6px 6px 0 !important;
        white-space: nowrap !important;
    }

    /* 3. 카테고리 필터: 4열 유지 및 폰트 최적화 */
    .filter-bar {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 4px !important;
    }

    .filter-bar a {
        font-size: 11px !important;
        height: 38px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }

    /* 4. 입력 폼의 다른 요소들 간격 조정 */
    .hondal-form-wrapper .form-section div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .hondal-btn-submit {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        
        /* 핵심 설정 */
        white-space: nowrap !important;    /* 글자 줄바꿈 절대 방지 */
        font-size: 13px !important;        /* 글자 크기를 살짝 줄임 (기존 14~15px에서 조정) */
        padding: 10px 12px !important;     /* 좌우 여백 최적화 */
        letter-spacing: -0.5px !important; /* 자간을 좁혀 폭 확보 */
        
        flex: 2 !important;                /* 취소 버튼과의 비율 유지 */
        width: auto !important;            /* 고정 너비 해제 */
    }

    /* 취소 버튼도 비율 맞춤 */
    .hondal-btn-cancel {
        flex: 1 !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
}