/**
 * GTD Frontend Dashboard Styles
 *
 * Deliberately scoped under .gtd- prefixed classes / .gtd-dashboard-*
 * containers so nothing here leaks into (or clashes with) the rest of
 * the Eventchamp design. Colours/spacing follow the same rounded,
 * card-based visual language already used across the theme.
 */

.gtd-dashboard-page {
	max-width: 980px;
	margin: 0 auto;
	width: 100%;
}

.gtd-alert {
	border-radius: 8px;
	padding: 14px 18px;
	margin: 0 0 20px;
	font-size: 0.95rem;
}

.gtd-alert p {
	margin: 0 0 4px;
}

.gtd-alert p:last-child {
	margin-bottom: 0;
}

.gtd-alert-success {
	background: #e6f6ec;
	color: #1e7e42;
	border: 1px solid #b7e4c7;
}

.gtd-alert-error {
	background: #fdeceb;
	color: #b3261e;
	border: 1px solid #f5c2c0;
}

.gtd-alert-info {
	background: #eef4fb;
	color: #1c4e80;
	border: 1px solid #c8dcf0;
}

/*======
*
* Auth Screen
*
======*/
.gtd-auth-wrapper {
	max-width: 520px;
	margin: 0 auto;
	padding: 10px 0 40px;
}

.gtd-auth-tabs {
	display: flex;
	border-bottom: 1px solid #e5e5e5;
	margin-bottom: 24px;
}

/* The parent theme applies its own default look (accent-coloured
   border box) to generic <button> elements, which is more specific/
   loads later than our single-class `.gtd-auth-tab` rule, so the
   inactive tab was rendering as a bordered orange box instead of a
   plain underline tab like the active one. `!important` forces the
   flat tab look regardless of the parent theme's generic button
   styling. */
.gtd-auth-tab {
	flex: 1;
	background: none !important;
	border: none !important;
	border-bottom: 3px solid transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 14px 10px;
	font-weight: 600;
	cursor: pointer;
	color: #888 !important;
}

.gtd-auth-tab.gtd-active {
	color: #111 !important;
	border-bottom-color: currentColor !important;
}

.gtd-auth-panel {
	display: none;
}

.gtd-auth-panel.gtd-active {
	display: block;
}

/*======
*
* Forms (shared)
*
======*/
.gtd-form .gtd-field {
	margin-bottom: 18px;
}

.gtd-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.gtd-required {
	color: #c0392b;
}

.gtd-field-optional,
.gtd-field-desc {
	display: block;
	font-weight: 400;
	font-size: 0.82rem;
	color: #888;
	margin-top: 4px;
}

.gtd-form input[type="text"],
.gtd-form input[type="email"],
.gtd-form input[type="url"],
.gtd-form input[type="password"],
.gtd-form input[type="number"],
.gtd-form input[type="file"],
.gtd-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #dcdcdc;
	border-radius: 6px;
	font-size: 1rem;
	box-sizing: border-box;
	background: #fff;
}

.gtd-form input:focus,
.gtd-form textarea:focus {
	outline: none;
	border-color: #6c8ef5;
	box-shadow: 0 0 0 3px rgba(108, 142, 245, 0.15);
}

.gtd-checkbox-field label {
	font-weight: 400;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.gtd-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
}

.gtd-checkbox-option {
	font-weight: 400 !important;
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
}

.gtd-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 30px;
	padding: 13px 30px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.gtd-button:hover,
.gtd-button:focus {
	opacity: 0.85;
	color: inherit;
}

.gtd-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* The parent theme styles bare `a:link` / `a:visited` links with a dark
   text colour that is more specific (element + pseudo-class) than a
   single `.gtd-button-primary` class, so an <a class="gtd-button
   gtd-button-primary"> ends up with near-invisible dark-on-dark text
   (button `<button>` elements aren't affected by that link colour, only
   `<a>` "buttons" are). `!important` here guarantees our button colours
   always win regardless of the parent theme's link specificity or CSS
   load order. */
.gtd-button-primary {
	background: #111 !important;
	color: #fff !important;
}

.gtd-button-secondary {
	background: #eef1f7 !important;
	color: #111 !important;
}

.gtd-button-outline {
	background: transparent !important;
	border: 1px solid #ccc;
	color: #111 !important;
}

.gtd-button-small {
	padding: 8px 18px;
	font-size: 0.85rem;
}

.gtd-field-note {
	font-size: 0.9rem;
}

/*======
*
* Dashboard Shell
*
======*/
.gtd-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
}

.gtd-logout-link {
	font-weight: 600;
}

.gtd-dashboard-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 30px;
	border-bottom: 1px solid #eee;
	padding-bottom: 16px;
}

.gtd-dashboard-nav a {
	padding: 9px 16px;
	border-radius: 30px;
	background: #f4f5f7;
	color: #333;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.gtd-dashboard-nav a.gtd-active {
	background: #111;
	color: #fff;
}

.gtd-dashboard-nav a.gtd-nav-add {
	background: transparent;
	border: 1px dashed #ccc;
}

/* `.gtd-active` and `.gtd-nav-add` alone have equal CSS specificity, so
   when a "+ Add X" link is also the active view, whichever rule is
   declared last would otherwise silently win on `background` while the
   other still wins on `color` — producing invisible white-on-white/
   transparent text. This combined, higher-specificity selector removes
   that ambiguity so the active "+ Add X" button always renders with a
   solid, readable background regardless of source order. */
.gtd-dashboard-nav a.gtd-nav-add.gtd-active {
	background: #111;
	border-color: #111;
	color: #fff;
}

.gtd-panel-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.gtd-back-link {
	font-weight: 600;
	text-decoration: none;
}

/*======
*
* Overview
*
======*/
.gtd-stat-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 30px;
}

.gtd-stat-card {
	background: #f8f9fb;
	border-radius: 10px;
	padding: 20px;
	text-align: center;
}

.gtd-stat-number {
	display: block;
	font-size: 1.8rem;
	font-weight: 700;
}

.gtd-stat-label {
	display: block;
	font-size: 0.85rem;
	color: #777;
	margin-top: 4px;
}

.gtd-quick-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 30px;
}

.gtd-empty-state {
	color: #888;
	padding: 30px 0;
	text-align: center;
}

/*======
*
* Tables / Cards
*
======*/
.gtd-table {
	width: 100%;
	border-collapse: collapse;
}

.gtd-table th,
.gtd-table td {
	text-align: left;
	padding: 12px 10px;
	border-bottom: 1px solid #eee;
	font-size: 0.9rem;
}

.gtd-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.gtd-badge-published {
	background: #e6f6ec;
	color: #1e7e42;
}

.gtd-badge-pending {
	background: #fff6e0;
	color: #96720b;
}

.gtd-badge-draft {
	background: #eef0f2;
	color: #555;
}

.gtd-badge-rejected {
	background: #fdeceb;
	color: #b3261e;
}

.gtd-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

.gtd-card {
	border: 1px solid #eee;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.gtd-card-thumb img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
}

.gtd-card-thumb-placeholder {
	width: 100%;
	height: 150px;
	background: #f1f2f4;
}

.gtd-card-body {
	padding: 16px;
}

.gtd-card-body h3 {
	margin: 0 0 8px;
	font-size: 1rem;
}

.gtd-card-updated {
	font-size: 0.8rem;
	color: #888;
	margin: 8px 0 12px;
}

.gtd-card-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/*======
*
* Image / Gallery Previews
*
======*/
.gtd-current-image,
.gtd-current-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 10px;
}

.gtd-current-image img {
	width: 90px;
	height: 90px;
	object-fit: cover;
	border-radius: 8px;
}

.gtd-gallery-thumb {
	text-align: center;
	font-size: 0.75rem;
}

.gtd-gallery-thumb img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
	margin-bottom: 4px;
}

.gtd-social-extra {
	border: none;
	padding: 0;
	margin: 0 0 18px;
}

.gtd-inline-error {
	display: block;
	color: #b3261e;
	font-size: 0.82rem;
	margin-top: 4px;
}

.gtd-field-desc-warning {
	color: #b3261e;
}

.gtd-social-extra legend {
	font-weight: 600;
	margin-bottom: 10px;
	padding: 0;
}

/*======
*
* Responsive
*
======*/
@media (max-width: 767px) {

	.gtd-stat-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.gtd-dashboard-nav {
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.gtd-dashboard-nav a {
		white-space: nowrap;
	}

	.gtd-table {
		display: block;
		overflow-x: auto;
	}

	.gtd-panel-heading {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 480px) {

	.gtd-stat-cards {
		grid-template-columns: 1fr 1fr;
	}

	.gtd-card-grid {
		grid-template-columns: 1fr;
	}
}
