/* ==========================================
   GAME DATA MANAGER - SHORTCODE STYLES
   Modern, Premium Accordion & Timeline UI
========================================== */

.gdm-accordion-container,
.gdm-timeline-container {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 30px 0;
	color: #333;
	line-height: 1.6;
}

/* ==========================================
   ACCORDION STYLES (Readme, Rules, News, Announcements, Map Descriptions)
========================================== */
.gdm-accordion-container {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.gdm-accordion-item {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gdm-accordion-item:hover {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	border-color: #cbd5e1;
}

.gdm-accordion-item[open] {
	border-color: #3b82f6;
	box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.15), 0 8px 10px -6px rgba(59, 130, 246, 0.1);
}

.gdm-accordion-summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 24px;
	cursor: pointer;
	list-style: none; /* Hide default triangle */
	user-select: none;
	background: linear-gradient(to right, #ffffff, #f8fafc);
	transition: background 0.3s ease;
}

/* Hide default disclosure triangle for webkit */
.gdm-accordion-summary::-webkit-details-marker {
	display: none;
}

.gdm-accordion-item[open] .gdm-accordion-summary {
	background: #f0fdfa; /* Subtle tint when open */
	border-bottom: 1px solid #e2e8f0;
}

.gdm-accordion-title {
	font-size: 1.15rem;
	font-weight: 600;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 12px;
}

.gdm-section-badge {
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	color: #ffffff;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 700;
	box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.gdm-accordion-date {
	font-size: 0.9rem;
	color: #64748b;
	font-style: italic;
	margin-right: 15px;
	margin-left: auto;
}

.gdm-accordion-icon {
	color: #64748b;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-size: 20px;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gdm-accordion-item[open] .gdm-accordion-icon {
	transform: rotate(180deg);
	color: #3b82f6;
}

.gdm-accordion-content {
	padding: 24px;
	color: #334155;
	background: #ffffff;
	animation: gdmAccordionSlideDown 0.4s ease-out forwards;
}

/* Custom styles for specific types */
.gdm-news .gdm-accordion-item[open] { border-color: #f59e0b; }
.gdm-news .gdm-accordion-item[open] .gdm-accordion-summary { background: #fffbeb; }
.gdm-news .gdm-accordion-item[open] .gdm-accordion-icon { color: #f59e0b; }

.gdm-rules .gdm-accordion-item[open] { border-color: #ef4444; }
.gdm-rules .gdm-accordion-item[open] .gdm-accordion-summary { background: #fef2f2; }
.gdm-rules .gdm-accordion-item[open] .gdm-accordion-icon { color: #ef4444; }
.gdm-rules .gdm-section-badge { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2); }

.gdm-announcements .gdm-accordion-item[open] { border-color: #8b5cf6; }
.gdm-announcements .gdm-accordion-item[open] .gdm-accordion-summary { background: #f5f3ff; }
.gdm-announcements .gdm-accordion-item[open] .gdm-accordion-icon { color: #8b5cf6; }

/* Markdown Content Styling within Accordion */
.gdm-accordion-content h1, .gdm-accordion-content h2, .gdm-accordion-content h3 {
	color: #0f172a;
	margin-top: 1.5em;
	margin-bottom: 0.75em;
	font-weight: 700;
}
.gdm-accordion-content h1 { font-size: 1.8rem; }
.gdm-accordion-content h2 { font-size: 1.5rem; }
.gdm-accordion-content h3 { font-size: 1.25rem; }

.gdm-accordion-content p { margin-bottom: 1.25em; }

.gdm-accordion-content ul, .gdm-accordion-content ol {
	padding-left: 20px;
	margin-bottom: 1.25em;
}

.gdm-accordion-content li { margin-bottom: 0.5em; }

.gdm-accordion-content pre {
	background: #1e293b;
	color: #f8fafc;
	padding: 16px;
	border-radius: 8px;
	overflow-x: auto;
	margin-bottom: 1.25em;
	font-size: 0.9rem;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.gdm-accordion-content code {
	background: #f1f5f9;
	color: #ec4899;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.gdm-accordion-content pre code {
	background: transparent;
	color: inherit;
	padding: 0;
}

.gdm-accordion-content blockquote {
	border-left: 4px solid #cbd5e1;
	padding-left: 16px;
	color: #64748b;
	font-style: italic;
	margin-left: 0;
	margin-bottom: 1.25em;
}

/* ==========================================
   CHANGELOG TIMELINE
========================================== */
.gdm-timeline {
	list-style: none;
	padding: 0;
	margin: 0;
	position: relative;
}
.gdm-timeline::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 24px;
	width: 2px;
	background: #e2e8f0;
}
.gdm-timeline-item {
	position: relative;
	margin-bottom: 40px;
	padding-left: 60px;
}
.gdm-timeline-item:last-child {
	margin-bottom: 0;
}
.gdm-timeline-marker {
	position: absolute;
	left: 17px;
	top: 6px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #3b82f6;
	border: 3px solid #ffffff;
	box-shadow: 0 0 0 4px #e0f2fe;
	z-index: 1;
	transition: all 0.3s ease;
}
.gdm-timeline-item:hover .gdm-timeline-marker {
	background: #2563eb;
	box-shadow: 0 0 0 4px #bfdbfe;
	transform: scale(1.1);
}
.gdm-timeline-content {
	background: #ffffff;
	padding: 24px;
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
	border: 1px solid #e2e8f0;
	position: relative;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gdm-timeline-content:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}
.gdm-timeline-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #f1f5f9;
	padding-bottom: 12px;
	margin-bottom: 16px;
}
.gdm-timeline-version {
	margin: 0;
	font-size: 1.4rem;
	color: #1e293b;
	font-weight: 700;
}
.gdm-timeline-date {
	color: #64748b;
	font-size: 0.95rem;
	font-weight: 500;
	background: #f8fafc;
	padding: 4px 12px;
	border-radius: 20px;
	border: 1px solid #e2e8f0;
}
.gdm-changelog-list {
	list-style: none;
	padding-left: 0;
	margin: 0;
}
.gdm-changelog-list li {
	margin-bottom: 8px;
	position: relative;
	padding-left: 24px;
	color: #334155;
}
.gdm-changelog-list li::before {
	content: '→';
	position: absolute;
	left: 0;
	color: #3b82f6;
	font-weight: bold;
}

/* ==========================================
   ANIMATIONS & RESPONSIVE
========================================== */
@keyframes gdmAccordionSlideDown {
	0% {
		opacity: 0;
		transform: translateY(-10px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 768px) {
	.gdm-accordion-summary {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.gdm-accordion-date {
		margin-left: 0;
	}
	.gdm-accordion-icon {
		position: absolute;
		right: 20px;
		top: 20px;
	}
	.gdm-timeline-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

.gdm-accordion-stats { font-size: 0.85em; color: #666; background: #f1f1f1; padding: 2px 8px; border-radius: 12px; margin-left: 10px; font-weight: normal; }

