/* 선택 가능한 항목 공통 스타일 */
.selectable-item { 
    cursor: pointer; 
    /* transition: all 0.2s;  */
    border: 1px solid #444; 
    background: #222; 
    color: #ccc; 
    border-radius: 4px;
    padding: 5px;
    text-align: center;
    /* font-size: 0.9em; */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.selectable-item2 { 
    cursor: pointer; 
    /* transition: all 0.2s;  */
    border: 1px solid #444; 
    background: #222; 
    color: #ccc; 
    border-radius: 4px;
    padding: 5px;
    text-align: center;
    /* font-size: 0.9em; */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 내부 요소 스크롤바 생성 방지 */
.selectable-item, .selectable-item * {
    overflow: visible !important;
}

/* 마우스 호버 시 효과 */
.selectable-item:hover { 
    border-color: #666; 
}

/* 선택되었을 때의 시각적 강조 - 레이아웃 보호를 위해 굵기 변화 제거 */
.selectable-item.is-selected, .selectable-item2.is-selected, .pattern-row.is-selected { 
    border-color: #33ff33 !important; 
    background-color: rgba(51, 255, 51, 0.2) !important; /* 배경색 투명도 상향 */
}

/* 내부의 실제 라디오 버튼 및 체크박스 숨김 처리 */
.selectable-item input[type="radio"], 
.selectable-item input[type="checkbox"],
.selectable-item2 input[type="radio"], 
.selectable-item2 input[type="checkbox"],
.pattern-col-radio input[type="radio"] { 
    display: none; 
}

/* 대열 및 호위 설정을 위한 통일된 2열 그리드 레이아웃 */
.selection-grid {
    display: grid;
	/* flex-direction: column; */
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

/* 설정용 */
.selection-grid-column {
    display: flex;
	flex-direction: column;
    /* grid-template-columns: 1fr 1fr; */
    gap: 8px;
    margin-top: 8px;
}

/* 인벤토리, 장착장비, 스킬용 리스트 카드 스타일 통합 - 좌측 정렬 및 높이 통일 */
.inventory-item, .equip-item-row, .skill-item {
    justify-content: flex-start !important; 
    text-align: left !important;
    margin-bottom: 5px;
    padding: 10px 5px;
    width: 100%;
    min-height: 45px; 
    box-sizing: border-box;
	gap: 2px;
	white-space: nowrap;
	/* flex-wrap: wrap; */
}

/* 장착장비 빈 슬롯 스타일 */
.equip-item-row.is-empty {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid #222;
    cursor: default;
    pointer-events: none;
    color: #444;
}

/* 각 설정 그룹의 제목 스타일 */
.selection-group-title {
    /* font-size: 0.85em; */
    color: #aaa;
    margin-top: 15px;
    display: block;
}

/* 배운스킬 접기 버튼 */
.skill-toggle-btn {
    cursor: pointer;
    /* background: #333; */
    /* padding: 2px 8px; */
    /* border: 1px solid #444; */
    /* float: right; */
	margin-left: 10px;
}

.skill-toggle-btn:hover {
    /* background: #444; */
}

/* 행동패턴 아이콘 영역 스타일 */
.pattern-col-radio {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s;
}

.pattern-col-radio:hover, .is-selected .pattern-col-radio {
    color: #33ff33;
}

/* [추가] 행동패턴 상태 배지 스타일 - 기존 강조색(녹색) 유지 */
.pattern-status-badge {
    /* font-size: 0.9em; */
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #33ff33;
    color: #33ff33;
    background: rgba(51, 255, 51, 0.1);
	width: max-content;
	display: block;
	float: right;
	margin-bottom: 12px;
}
.fa-solid {
	font-weight: 900 !important;
}
.addflex1 {
	flex: 1;
}

/* Teams 전용 그리드: 한 행에 정확히 5개 배치 */
.teams-grid {
    grid-template-columns: repeat(5, 1fr) !important;
}

/* Teams 전용 아이템 스타일: 수직 정렬 및 중앙 정렬 */
.teams-item {
    flex-direction: column;
    justify-content: flex-end;
    /* padding: 10px 0; */
    /* min-height: auto; */
	/* max-height: 220px; */
	height: 220px;
	overflow: hidden !important;
	border-width: 3px;
}

/* 발판 디자인(carpet)이 카드 내부에서 중앙 정렬되도록 조정 */
.teams-item .carpet0, .teams-item .carpet1 {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
}

/* 상세설정 링크 버튼 스타일 보조 */
.teams-item .a0:hover {
    color: #33c5ff;
}

/* 설정페이지 체크박스 카드 */
.setting-check {
	flex-direction: column;
	padding: 10px 0;
}

/* -------------------------------------------------------------------
   [신규] 랭킹 목록 롤오버 시 팀 정보 슬라이드 확장 스타일
   ------------------------------------------------------------------- */

/* 랭킹 카드 아이템: 내용이 많아지면 줄바꿈 허용 */
.rank-card-item {
    flex-wrap: wrap; /* 내부 요소 줄바꿈 허용 */
    transition: background 0.3s;
	cursor: default;
}

/* .rank-card-item:hover { */
    /* background: rgba(0, 0, 0, 0.4); /* 호버 시 배경 조금 더 진하게 */ */
/* } */

/* 랭킹 카드 정보 영역 최소 너비 확보 */
.rank-card-info {
    min-width: 200px; 
}

/* 랭킹 팀 정보 (캐릭터 스프라이트) 슬라이드 스타일 */
.rank-team-info {
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    
    /* 내부 정렬 */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* 캐릭터 발바닥 맞춤 */
    gap: 10px;
    
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin-top: 0; /* 초기 상태 */
    flex-basis: 100%; /* 줄바꿈 후 전체 너비 차지 */
	position: relative;
}
.rank-team-info-wrap {
	position: relative;
	display: flex;
	align-items: end;
	height: 100%;
	z-index: 10;
	background: rgba(0,0,0,0);
	flex-wrap: wrap;
	justify-content: center;
}

/* 호버 시 확장 */
.rank-card-item:hover .rank-team-info {
    max-height: 500px; /* 캐릭터 카드 높이 고려하여 넉넉하게 */
    opacity: 1;
    margin-top: 10px;
    padding: 10px 0;
    display: flex;
	gap: 10px;
	overflow: hidden !important;
}

/* 개별 캐릭터 카드 스타일 (이미지+정보) */
.rank-char-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    text-align: center;
    position: relative;
	padding: 0 5px;
	min-width: 50px;
	opacity: 0;
}
.rank-card-item:hover .rank-char-card {
	opacity: 1;
}

/* 캐릭터 이미지 */
.rank-char-sprite {
    object-fit: contain;
}

/* 캐릭터 텍스트 정보 */
.rank-char-name {
    font-weight: bold;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 5px 0 0 0;
}

.rank-char-meta {
    color: #aaa;
    white-space: nowrap;
    line-height: 1.2;
	display: flex;
	flex-direction: column;
}

/* 직업명은 약간 더 밝게 */
.rank-char-job {
    color: #87ceeb;
	font-size: inherit;
}
.rank-char-lv {
    font-size: inherit;
}

/* 랭킹 페이지 전용 스타일 */
.rank-timer-alert {
    color: #ff6b6b;
    margin-top: 10px;
}

.rank-challenge-wrapper {
    padding: 0 10px;
}

.rank-text-alert {
    color: #ff6b6b;
}

.rank-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px;
}

.rank-grid-col {
    flex: 1;
    min-width: 300px;
}

.rank-col-title {
    margin-bottom: 10px;
	padding: 10px !important;
	text-align: center;
}

.rank-footer-right {
    margin-top: 15px;
    border-top: 1px solid #333;
    padding-top: 15px;
    text-align: right;
}

.rank-footer {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 20px;
	flex-direction: column;
	align-items: center;
}

.rank-btn-medium {
    width: 160px;
}

.rank-desc {
    margin-bottom: 15px;
}

.rank-note {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 10px;
}

/* 랭킹 리스트 (class.rank2.php) */
.rank-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-icon-img {
    width: 24px;
}

.rank-place-bottom {
    color: #888;
    font-size: 0.9em;
}

.rank-place-normal {
    color: #ccc;
    font-weight: bold;
}

.rank-card-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.rank-card-icon {
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.rank-card-sep {
    margin: 0 10px;
    opacity: 0.3;
}

.rank-card-info {
    flex: 1;
	display: flex;
	flex-direction: column;
}

.rank-card-stats {
    color: #999;
    /* font-size: 0.85em; */
    margin-left: 5px;
}

.rank-text-gold {
    color: #ffd700;
}

.rank-my-row {
	background: #87ceeb2e !important;
}

.rank-empty-msg {
    padding: 10px;
    color: #888;
}