/**
 * [M45T3R5W4G3R] Wizarding Medals & Honors Showcase System CSS
 * Dark Academia Palette & Interactive Pin Rack
 */

/* ==========================================================================
   1. Mini-Profile Pinned Pin Rack (Post View)
   ========================================================================== */
.m4_pinned_medals_li {
	list-style: none !important;
	padding: 0 !important;
	margin: 6px 0 !important;
	text-align: center;
}

.m4_medals_mini_rack {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	padding: 5px 8px;
	background: rgba(15, 23, 42, 0.55);
	border: 1px solid rgba(212, 175, 55, 0.22);
	border-radius: 20px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(4px);
	max-width: 100%;
}

.m4_medal_pin {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
	border: 1.5px solid var(--medal-accent, #d4af37);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 0 6px rgba(212, 175, 55, 0.15);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	text-decoration: none;
	cursor: pointer;
}

.m4_medal_pin:hover {
	transform: translateY(-3px) scale(1.15);
	border-color: #ffd700;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 14px rgba(212, 175, 55, 0.55);
	z-index: 5;
}

.m4_medal_icon {
	font-size: 15px;
	line-height: 1;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}

/* ==========================================================================
   2. Admin CP & Category Badges
   ========================================================================== */
.m4_medal_category_badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.m4_medal_category_badge.cat_academic {
	background: rgba(59, 130, 246, 0.15);
	color: #93c5fd;
	border: 1px solid rgba(59, 130, 246, 0.3);
}

.m4_medal_category_badge.cat_dueling {
	background: rgba(239, 68, 68, 0.15);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.m4_medal_category_badge.cat_writing {
	background: rgba(139, 92, 246, 0.15);
	color: #c4b5fd;
	border: 1px solid rgba(139, 92, 246, 0.3);
}

.m4_medal_category_badge.cat_special {
	background: rgba(212, 175, 55, 0.15);
	color: #fde047;
	border: 1px solid rgba(212, 175, 55, 0.3);
}

.m4_medal_category_badge.cat_lore {
	background: rgba(245, 158, 11, 0.15);
	color: #fcd34d;
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.m4_medal_category_badge.cat_general {
	background: rgba(148, 163, 184, 0.15);
	color: #cbd5e1;
	border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ==========================================================================
   3. Member Profile Honors Gallery
   ========================================================================== */
.m4_medals_profile_container {
	padding: 16px;
}

.m4_medals_gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: 16px;
	margin-top: 14px;
}

.m4_medal_card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: linear-gradient(145deg, rgba(20, 27, 45, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
	border: 1px solid rgba(212, 175, 55, 0.18);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.m4_medal_card:hover {
	transform: translateY(-2px);
	border-color: rgba(212, 175, 55, 0.45);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 15px rgba(212, 175, 55, 0.15);
}

.m4_medal_card.is_pinned {
	border-color: rgba(212, 175, 55, 0.55);
	background: linear-gradient(145deg, rgba(28, 38, 60, 0.9) 0%, rgba(15, 23, 42, 0.98) 100%);
}

.m4_medal_card_ribbon {
	height: 4px;
	width: 100%;
}

.m4_medal_card_body {
	display: flex;
	padding: 16px;
	gap: 14px;
	align-items: flex-start;
}

.m4_medal_card_icon_wrap {
	position: relative;
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
	border: 2px solid var(--card-accent, #d4af37);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.m4_medal_card_icon {
	font-size: 26px;
}

.m4_pin_indicator {
	position: absolute;
	top: -4px;
	right: -4px;
	width: 18px;
	height: 18px;
	background: #d4af37;
	color: #0f172a;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.m4_medal_card_content {
	flex: 1;
	min-width: 0;
}

.m4_medal_card_title {
	margin: 0 0 4px 0;
	font-size: 15px;
	font-weight: 700;
	color: #f1f5f9;
	letter-spacing: 0.2px;
}

.m4_medal_card_desc {
	margin: 0 0 8px 0;
	font-size: 12.5px;
	color: #94a3b8;
	line-height: 1.4;
}

.m4_medal_card_reason {
	margin: 6px 0;
	padding: 6px 10px;
	background: rgba(0, 0, 0, 0.3);
	border-left: 2px solid var(--card-accent, #d4af37);
	font-size: 12px;
	font-style: italic;
	color: #cbd5e1;
	border-radius: 0 4px 4px 0;
}

.m4_medal_card_meta {
	display: flex;
	gap: 12px;
	font-size: 11px;
	color: #64748b;
	margin-top: 6px;
}

.m4_medal_card_pin_toggle {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.m4_pin_checkbox_label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #94a3b8;
	cursor: pointer;
}

.m4_pin_checkbox {
	cursor: pointer;
	width: 16px;
	height: 16px;
	accent-color: #d4af37;
}

/* ==========================================================================
   4. Admin CP Modern Grid & Settings
   ========================================================================== */
.m4_admin_header_card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 24px;
	margin-bottom: 16px;
	background: linear-gradient(135deg, rgba(20, 27, 45, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
	border: 1px solid rgba(212, 175, 55, 0.25);
	border-radius: 10px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.m4_admin_title {
	margin: 0 0 4px 0;
	font-family: 'Cinzel', serif;
	font-size: 18px;
	color: #f1f5f9;
	letter-spacing: 0.5px;
}

.m4_admin_desc {
	margin: 0;
	font-size: 13px;
	color: #94a3b8;
}

.m4_btn_gold {
	display: inline-flex;
	align-items: center;
	padding: 9px 18px;
	background: linear-gradient(135deg, #d4af37 0%, #aa8010 100%);
	color: #0f172a !important;
	font-weight: 700;
	font-size: 13px;
	border-radius: 6px;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
	border: 1px solid #eab308;
	cursor: pointer;
	transition: all 0.2s ease;
}

.m4_btn_gold:hover {
	background: linear-gradient(135deg, #fde047 0%, #ca8a04 100%);
	box-shadow: 0 4px 12px rgba(212, 175, 55, 0.45);
	transform: translateY(-1px);
}

.m4_admin_table_card {
	background: rgba(15, 23, 42, 0.9);
	border: 1px solid rgba(212, 175, 55, 0.2);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.m4_table_responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.m4_admin_grid {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

.m4_admin_grid th {
	background: rgba(30, 41, 59, 0.75);
	color: #f1f5f9;
	font-family: 'Cinzel', serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 12px 14px;
	border-bottom: 1.5px solid rgba(212, 175, 55, 0.3);
	white-space: nowrap;
}

.m4_admin_grid td {
	padding: 12px 14px;
	border-bottom: 1px solid rgba(148, 163, 184, 0.12);
	vertical-align: middle;
}

.m4_admin_grid tbody tr:hover {
	background: rgba(30, 41, 59, 0.35);
}

.m4_medal_icon_preview {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 2px solid #d4af37;
	font-size: 20px;
	background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.m4_medal_row_title {
	font-size: 14px;
	color: #f8fafc;
	display: block;
}

.m4_medal_row_id {
	font-size: 11px;
	color: #64748b;
}

.m4_medal_row_desc {
	font-size: 12.5px;
	color: #cbd5e1;
	line-height: 1.45;
}

.m4_holders_badge {
	display: inline-block;
	padding: 2px 10px;
	background: rgba(30, 41, 59, 0.8);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 700;
	color: #e2e8f0;
}

.m4_status_badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.m4_status_badge.active {
	background: rgba(16, 185, 129, 0.15);
	color: #6ee7b7;
	border: 1px solid rgba(16, 185, 129, 0.35);
}

.m4_status_badge.passive {
	background: rgba(239, 68, 68, 0.15);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.35);
}

.m4_action_btn_group {
	display: inline-flex;
	gap: 6px;
}

.m4_action_btn {
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 11.5px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.m4_btn_edit {
	background: rgba(59, 130, 246, 0.2);
	color: #93c5fd !important;
	border: 1px solid rgba(59, 130, 246, 0.4);
}

.m4_btn_edit:hover {
	background: rgba(59, 130, 246, 0.35);
	color: #ffffff !important;
}

.m4_btn_delete {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5 !important;
	border: 1px solid rgba(239, 68, 68, 0.4);
}

.m4_btn_delete:hover {
	background: rgba(239, 68, 68, 0.35);
	color: #ffffff !important;
}

/* Settings Form Styles */
.m4_settings_form_group {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.m4_settings_field {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.m4_settings_label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 65%;
}

.m4_settings_label strong {
	font-size: 14px;
	color: #f1f5f9;
}

.m4_settings_sub {
	font-size: 12px;
	color: #94a3b8;
}

.m4_select_dark, .m4_input_dark {
	padding: 7px 12px;
	background: rgba(15, 23, 42, 0.85);
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 6px;
	color: #f8fafc;
	font-size: 13px;
}

.m4_select_dark:focus, .m4_input_dark:focus {
	outline: none;
	border-color: #d4af37;
	box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.m4_toggle_label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.m4_toggle_check {
	width: 18px;
	height: 18px;
	accent-color: #d4af37;
	cursor: pointer;
}

.m4_toggle_text {
	font-weight: 600;
	font-size: 13.5px;
	color: #e2e8f0;
}

/* ==========================================================================
   5. Main Profile Summary Medals Showcase Card (rpg-medals-card)
   ========================================================================== */
.rpg-medals-card {
	margin-bottom: 16px;
}

.rpg-medals-count-badge {
	margin-left: auto;
	padding: 2px 10px;
	background: rgba(212, 175, 55, 0.2);
	border: 1px solid rgba(212, 175, 55, 0.4);
	color: #ffd700;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 700;
}

.rpg-medals-showcase-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rpg-medal-item {
	display: flex;
	gap: 14px;
	padding: 12px 14px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(212, 175, 55, 0.18);
	border-left: 3px solid var(--medal-accent, #d4af37);
	border-radius: 8px;
	transition: all 0.25s ease;
}

.rpg-medal-item:hover {
	background: rgba(20, 27, 45, 0.85);
	border-color: rgba(212, 175, 55, 0.45);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rpg-medal-icon-wrap {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 2px solid var(--medal-accent, #d4af37);
	background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.rpg-medal-details {
	flex: 1;
	min-width: 0;
}

.rpg-medal-header-line {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.rpg-medal-name {
	font-size: 14px;
	color: #f1f5f9;
}

.rpg-medal-desc {
	font-size: 12px;
	color: #94a3b8;
	line-height: 1.4;
	margin-bottom: 6px;
}

.rpg-medal-reason {
	font-size: 11.5px;
	font-style: italic;
	color: #cbd5e1;
	background: rgba(0, 0, 0, 0.25);
	padding: 4px 8px;
	border-radius: 4px;
	margin-bottom: 6px;
}

.rpg-medal-footer {
	display: flex;
	gap: 14px;
	font-size: 11px;
	color: #64748b;
}

.rpg-medal-date, .rpg-medal-giver {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
