/* -------------------- [레이아웃] -------------------- */
.dm_calendar_box {
	padding: 10px;
	max-width: 1100px;
	margin: 0 auto;
}
.dm_calendar_box:after {
    content: "";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}
.dm_card {
	background: white;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	border-radius: 10px;
	padding: 10px;
	width: 100%;
	box-sizing: border-box;
}
.dm_mission,
.dm_rank {
    width: 30%; /* 부모 크기의 30%를 유지 */

}
.dm_h4 {
	margin-top: 5px;
	font-size: 14px;
}

/* -------------------- [미션 영역] -------------------- */

.dm_attendance {
		
	flex-direction: column-reverse;
}
.dm_attendance-message {
	width:100%;
	padding-top: 10px;
}
.dm_attendance-action {
	width:100%;
	display: contents;
}
.dm_attendance-button {
padding: 10px 10px;
}

.dm_mission_list {
	    float: right;
}
.dm_mission_status {
	display: flex;
	justify-content: space-between;
	font-weight: bold;
	background: #f8f8f8;
	padding: 10px;
	border-radius: 5px;
	margin-bottom: 5px;
}
.dm_mission_desc {
	margin-top: 7px;
	color: #2e604a;
}
.dm_mission_item {
	background: #f8f8f8;
	padding: 5px 10px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
}
.dm_mission_header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: bold;
}
.dm_mission_header h4{
	font-size: 12px;
}
.dm_mission_icon {
	font-size: 18px;
	margin-right: 8px;
}
.dm_mission_reward {
	background: #ffcc00;
	padding: 4px 6px;
	border-radius: 6px;
	font-size: 12px;
	color: #6d4c41;
	font-weight: bold;
}
.dm_mission_reward.dm_small_reward {
	background: #ffeb99;
	font-size: 12px;
	padding: 3px 6px;
}
.dm_mission_progress {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0px;
	font-size:12px;
}
.dm_mission_timer{
	font-size:12px;
}
.dm_progress_bar {
	flex: 1;
	height: 12px;
	background: #e0e0e0;
	border-radius: 5px;
	overflow: hidden;
	margin-right: 10px;
}
.dm_progress_fill {
	height: 100%;
	background: #4caf50;
}
.dm_mission_item_status {
	font-size: 12px;
	color: #333;
	background: #e0e0e0;
	padding: 3px 6px;
	border-radius: 4px;
	font-weight: bold;
}

/* -------------------- [캘린더 영역] -------------------- */
.dm_calendar_container {
	width: 69%;
	float:left;

}
.dm_calendar_header {
	text-align: left;
}
.dm_calendar_title {
	margin: 0 0 5px;
	font-size: 1.5em;
	font-weight: bold;
}
.dm_badge_legend {
	margin: 10px 0;
	font-size: 1em;
	text-align: left;
}
.dm_badge_legend span {
	margin-right: 4px;
	display: inline-flex;
	align-items: center;
}
.fc-day-badges {
	margin-top: 4px;
	text-align: center;
	font-size: 0.9em;
}
.dm_badge {
	display: inline-block;
	padding: 2px 2px;
	border-radius: 3px;
	margin: 0 1px;
}
.dm_badge.dm_earned {
	background: #fff;
}
.dm_badge .dm_badge_icon {
	font-size: 1.1em;
}
.dm_banner {
	border-radius: 10px;
	margin-bottom:15px;
}
.dm_banner img {
	border-radius: 10px;
	width: 100%;
}

/* -------------------- [랭킹 영역] -------------------- */
.dm_rank {
	float:right;
	margin-top:20px;
}
.dm_my_rank {
	display: flex;
	justify-content: space-between;
	background: #ecf5ff;
	padding: 5px 2px;;
	border-radius: 12px;
	font-weight: bold;
	font-size: 12px;
	border: 1px solid #c2d9ff;
	margin-bottom: 10px;
}
.dm_rank_list {
	list-style: none;
	padding: 0;
	font-size: 12px;
}
.dm_rank_item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 5px 2px;
	margin-bottom: 6px;
	border-radius: 12px;
}
.dm_rank_1 {
	background: #fff5d8;
	border-color: #fff5d8;
}
.dm_rank_2 {
	background: #f8f8f8;
	border-color: #e0e0e0;
}
.dm_rank_3 {
	background: #fef4e8;
	border-color: #eacdac;
}
.dm_rank_default {
	background: none;
	border: none;
}
.dm_rank_pos {
	font-weight: bold;
	min-width: 40px;
	text-align: left;
}
.dm_rank_pos.dm_gray {
	color: #bbb;
}
.dm_rank_name {
	flex: 1;
	text-align: left;
	padding-left: 10px;
	min-width: 80px;
	display: flex;
	align-items: center;
}
.dm_rank_score {
	margin-right: 6px;
	white-space: nowrap;
}
.dm_rank_streak {
	min-width: 40px;
	text-align: right;
}

/* -------------------- [FullCalendar 보완] -------------------- */
.fc .fc-daygrid-day-frame {
	min-height: 80px;
	cursor:pointer;
}
.fc-col-header-cell {
	text-align: center;
	font-size: 14px;
}
.fc-button-prev .fc-icon,
.fc-button-next .fc-icon {
	transform: none !important;
	transition: none !important;
}
.dm_calendar {
	width: 100%;
}
.m_br {
	display: none;
}

/* -------------------- [출석 영역] -------------------- */
.dm_attendance-info {
	background: #f0f0f0;
	padding: 15px;
	border-radius: 10px;
	font-size: 14px;
	color: #333;
	text-align: center;
	margin-bottom: 15px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	border: 1px solid #e0e0e0;
}

/* -------------------- [출석 시간 안내] -------------------- */
.dm_attendance-time {
	font-weight: bold;
	font-size: 13px;
	margin-bottom: 10px;
}

/* -------------------- [보상 박스 컨테이너] -------------------- */
.dm_attendance-rewards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	max-width: 100%;
}
.dm_reward-card {
	background: #f7f9fc;
	border: 1px solid #d0d7e3;
	border-radius: 6px;
	padding: 6px 10px;
	min-width: 60px;
	text-align: center;
	font-size: 12px;
	font-weight: bold;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/* -------------------- [개근일 스타일 (파란색 강조)] -------------------- */
.dm_days {
	color: #555;
	font-size: 13px;
	font-weight: bold;
	display: block;
}

/* -------------------- [포인트 스타일 (오렌지 강조, 더 작게)] -------------------- */
.dm_points {
	color: #ff6b00;
	font-size: 10px;
	font-weight: bold;
	display: block;
}

/* -------------------- [캘린더 타이틀과 아이콘을 가로 정렬] -------------------- */
.dm_calendar_title_wrapper {
	display: block;
	width: 100%;
	text-align:right;
	margin-bottom:5px;
}
.dm_calendar_icon {
	width: 20px;
	height: 20px;
	object-fit: contain;
	cursor: pointer;
	transition: transform 0.3s ease;
}

/* -------------------- [무한 회전 애니메이션 정의] -------------------- */
@keyframes rotateInfinite {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* -------------------- [마우스를 올리면 계속 회전] -------------------- */
.dm_calendar_icon:hover {
	animation: rotateInfinite 3s linear infinite;
}

/* -------------------- [dm_rank_inner] -------------------- */
.dm_rank_inner {
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	width: 100%;
	min-height: 50vh;
}

/* -------------------- [출석 UI] -------------------- */
.dm_attendance {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #E6F4EA;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	color: #2E604A;
	margin-bottom: 15px;
}
.dm_attendance-message {
	font-size: 13px;
	font-weight: bold;
	color: #2E604A;
}
.dm_attendance-action {
	margin-left: auto;
}
.dm_attendance-button {
	background: #6ABF69;
	color: #fff;
	border: none;
	padding: 12px 20px;
	font-size: 16px;
	font-weight: bold;
	border-radius: 25px;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(106,191,105,0.3);
	transition: all 0.3s ease;
}
.dm_attendance-button:hover {
	background: #57A55A;
	box-shadow: 0 6px 12px rgba(87,165,90,0.5);
}

/* -------------------- [출석자(참가자) 영역] -------------------- */
.dm_ajax_member_list {
	display: grid;
	gap: 10px;
}
.dm_ml_tit {
	margin-bottom: 10px;
	font-size:16px;
}
.dm_attendance-card {
	background: #E6F4EA;
	border-radius: 12px;
	padding: 8px 4px;
	font-size: 14px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 5px;
	color: #2E604A;
	transition: transform 0.2s ease;
}
.dm_nickname {
	font-weight: bold;
	color: #2E604A;
	font-size: 14px;
	text-align: left;
	width: 6ch;
}
.dm_registration-info {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	align-items: center;
}
.dm_reg-date {
	color: #666;
}
.dm_streak {
	color: #2e604a;
	font-weight:bold;
}
.dm_ml_info {
	text-align: center;
	font-size: 14px;
	color: #666;
	margin-top: 10px;
	padding: 10px;
	background-color: #f8f9fa;
	border-radius: 8px;
	font-weight: bold;
}

/* -------------------- [랭킹 아이템 (추가)] -------------------- */

.dm_rank_tabs {
	display: flex;
	margin-bottom: 10px;
}
.dm_rank_tabs button {flex:1;}
.dm_tab_btn {
	background: #f0f0f0;
	border: 1px solid #ddd;
	padding: 8px 16px;
	cursor: pointer;
}
.dm_tab_btn.active {
	background: #fff;
	border-top: 2px solid #6abf69;
	border-bottom:0;
	font-weight: bold;
}

.dm_rank_container {
	display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-around;
    max-width: 350px;
	justify-content: space-between;
}
.dm_rank_item_info {
	background: #f8f8f8;
	padding: 3px 0px;
	border-radius: 6px;
	box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
	font-size: 10px;
	white-space: nowrap;
	margin: 10px 0px;
}
.dm_rank_num {
	color: #333;
	font-size: 12px;
}
.dm_rank_point {
	color: #ff6600;
	font-weight: bold;
	font-size: 12px;
}

.dm_ajax_member_list {
	grid-template-columns: repeat(4, 1fr);
}



/*
pc 컨텐츠 영역이 800px 보다 작으면 강제로 모바일로 보이게 추가 수정 
responsive-mode 클래스는 index.php 스크립트에서 적용됩니다.
*/
.dm_calendar_box.responsive-mode {
	background-color: #f0f0f0;
	padding: 0;
}
.dm_calendar_box.responsive-mode .dm_mission,
.dm_calendar_box.responsive-mode .dm_rank {
	width: 100%;
	margin-bottom: 20px;
}
.dm_calendar_box.responsive-mode .dm_calendar_container {
	width: 100%;
}
.dm_calendar_box.responsive-mode .dm_card {
	box-shadow: 0;
	border-radius: 0px;
	width: 100% !important;
	max-width: none !important;
}


/* -------------------- [반응형 스타일] -------------------- */

/* 대형 화면 (1200px 이하) */
@media (max-width: 1200px) {
	.dm_rank_item_info {
		padding: 0;
	}
}

@media (max-width: 1024px) {
	.dm_calendar_box {
		background-color: #f0f0f0;
		padding: 0;
	}
	.dm_mission,
	.dm_rank {
		width: 100%;
		margin-bottom: 20px;
	}
	.dm_calendar_container {
		width: 100%;
	}
	.dm_card {
		box-shadow: 0;
		border-radius: 0px;
		width: 100% !important;
		max-width: none !important;
	}
}

/* 소형 화면 (768px 이하) */
@media (max-width: 768px) {
	.dm_calendar_box {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.dm_mission,
	.dm_rank {
		width: 100%;
	}
	.dm_rank {
		max-width: 100%;
		min-width: 100%;
	}
	.dm_rank_container {
		width: 100%;
		max-width: 100%;
		padding: 10px;
	}
	.dm_rank_item_info {
		padding: 5px;
		font-size: 14px;
	}
	.dm_ajax_member_list {
		grid-template-columns: repeat(3, 1fr);
	}
	.dm_rank_inner {
		width: 100%;
		min-height: 100%;
	}
	.dm_rank_num {
		font-size: 14px;
	}
	.dm_rank_point {
		font-size: 14px;
	}
	.m_br {
		display: block;
	}
}

/* 초소형 화면 (480px 이하) */
@media (max-width: 480px) {
	.dm_rank_container {
		padding: 2px;
	}
	.dm_rank_item_info {
		padding: 5px;
	}
	.dm_attendance-rewards {
		flex-wrap: wrap;
		justify-content: center;
	}
	.dm_reward-card {
		flex: 1 1 30%;
		min-width: 55px;
		padding: 5px 8px;
		font-size: 10px;
	}
	.dm_days {
		font-size: 12px;
	}
	.dm_points {
		font-size: 9px;
	}
	.dm_rank_inner {
		min-height: 100%;
	}
	.dm_ajax_member_list {
		grid-template-columns: repeat(2, 1fr);
	}
}
