/* ==========================================================================
   MediaTasker Workspace Styles (Frontend)
   ========================================================================== */

/* Typography & Base */
.mediat_workspace {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #3c434a;
	max-width: 95%;
	margin: 0 auto;
	box-sizing: border-box;
}

.mediat_workspace * {
	box-sizing: inherit;
}

/* Upload Zones */
.mediat_upload-zones {
	margin-bottom: 24px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
}

@media (max-width: 768px) {
	.mediat_upload-zones {
		grid-template-columns: 1fr;
	}
}

.mediat_upload-panel {
	border-radius: 8px;
	padding: 20px;
	transition: all 0.3s ease;
	height: 100%;
}

.mediat_upload-primary {
	background-color: #e8f5e9;
	border: 2px solid #4caf50;
}

.mediat_upload-secondary {
	background-color: #e3f2fd;
	border: 2px solid #2196f3;
}

.mediat_panel-heading {
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mediat_panel-title {
	margin: 0;
	font-size: 1.5em;
	/* Original size roughly */
}

.mediat_badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	color: #fff;
	font-weight: normal;
	font-size: 14px;
}

.mediat_badge-primary {
	background-color: #4caf50;
}

.mediat_badge-secondary {
	background-color: #2196f3;
}

.mediat_drop-area {
	border: 2px dashed #999;
	border-radius: 4px;
	background-color: #fff;
	padding: 20px;
	min-height: 150px;
	height: 30vh;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
}

.mediat_upload-primary .mediat_drop-area.is-dragover {
	border-color: #4caf50;
	background-color: #e8f5e9;
}

.mediat_upload-secondary .mediat_drop-area.is-dragover {
	border-color: #2196f3;
	background-color: #e3f2fd;
}

.mediat_drop-content {
	text-align: center;
}

.mediat_drop-instruction {
	font-size: 16px;
	color: #666;
	margin: 0 0 10px 0;
}

.mediat_drop-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: #666;
}

.mediat_hidden-input {
	display: none;
}

.mediat_btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: 4px;
	color: #fff;
	font-weight: normal;
	cursor: pointer;
	border: none;
	text-decoration: none;
	transition: background-color 0.3s ease;
	font-size: 14px;
}

.mediat_btn-primary {
	background-color: #4caf50;
}

.mediat_btn-primary:hover {
	background-color: #388e3c;
}

.mediat_btn-secondary {
	background-color: #2196f3;
}

.mediat_btn-secondary:hover {
	background-color: #1976d2;
}

.mediat_btn-neutral {
	background-color: #2196f3;
	color: white;
	border: none;
}

.mediat_upload-primary .mediat_btn-neutral {
	background-color: #4caf50;
}

.mediat_upload-primary .mediat_btn-neutral:hover {
	background-color: #388e3c;
}

.mediat_btn-neutral:hover {
	background-color: #1976d2;
}

/* Progress Bars */
.mediat_progress-container {
	margin-top: 10px;
	background: transparent;
	padding: 0;
	border-radius: 0;
	box-shadow: none;
}

.mediat_progress-track {
	height: 4px;
	background-color: #eee;
	border-radius: 2px;
	overflow: hidden;
}

.mediat_progress-fill {
	height: 100%;
	width: 0;
	background-color: #2196f3;
	transition: width 0.3s ease;
}

.mediat_upload-primary .mediat_progress-fill {
	background-color: #4caf50;
}

.mediat_progress-label {
	font-size: 12px;
	color: #666;
	margin-top: 5px;
	text-align: center;
}

/* View Switcher (adapted from old design) */
.mediat_view-switcher {
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
	gap: 0;
	background: #f0f0f0;
	padding: 5px;
	border-radius: 30px;
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
}

.mediat_switch-btn {
	background: none;
	border: none;
	padding: 10px 30px;
	cursor: pointer;
	font-size: 16px;
	color: #666;
	border-radius: 25px;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.mediat_switch-btn.is-active {
	background: #fff;
	color: #0073aa;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	font-weight: normal;
}

.mediat_counter {
	background: #eee;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 14px;
	min-width: 24px;
	text-align: center;
	color: #666;
}

.mediat_switch-btn.is-active .mediat_counter {
	background: #0073aa;
	color: white;
}

/* Summary Metrics Area Styling (adapted from old design) */
.mediat_summary-metrics {
	margin-bottom: 30px;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mediat_metric-group {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.mediat_metric-total {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 5px;
}

.mediat_metric-label {
	font-size: 16px;
	color: #666;
}

.mediat_metric-value {
	font-size: 18px;
	font-weight: bold;
	color: #333;
}

.mediat_status-breakdown {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	justify-content: space-evenly;
}

.mediat_status-block {
	padding: 10px 15px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f9f9f9;
	cursor: pointer;
	transition: all 0.2s ease;
	border-left: 4px solid #c3c4c7;
	user-select: none;
}

.mediat_status-block:hover {
	background: #f0f0f0;
	transform: translateY(-1px);
}

.mediat_status-block:active {
	transform: translateY(0);
}

.mediat_status-block:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.4);
}

.mediat_status-block.status-pending {
	border-left-color: #dc3545;
}

.mediat_status-block.status-pending.is-selected {
	background-color: rgba(220, 53, 69, 0.4);
}

.mediat_status-block.status-in-progress {
	border-left-color: #ffc107;
}

.mediat_status-block.status-in-progress.is-selected {
	background-color: rgba(255, 193, 7, 0.4);
}

.mediat_status-block.status-completed {
	border-left-color: #28a745;
}

.mediat_status-block.status-completed.is-selected {
	background-color: rgba(40, 167, 69, 0.4);
}

.mediat_status-block.status-not-dl {
	border-left-color: #ef6c00;
}

.mediat_status-block.status-not-dl.is-selected {
	background-color: rgba(239, 108, 0, 0.4);
}


.mediat_status-block.status-downloaded.is-selected {
	background-color: rgba(40, 167, 69, 0.4);
}

.mediat_block-label {
	color: #666;
	font-size: 14px;
}

.mediat_block-value {
	font-weight: bold;
	color: #333;
	font-size: 16px;
	margin-left: auto;
}

.mediat_status-hint {
	width: 100%;
	text-align: center;
	color: #666;
	font-size: 13px;
	margin-top: 15px;
	font-style: italic;
	padding: 0 10px;
}

/* Asset Boards (Gallery) */
.mediat_asset-boards {
	width: 100%;
}

.mediat_state-toggles {
	display: flex;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	overflow: hidden;
}

.mediat_state-btn {
	background: #fff;
	border: none;
	border-right: 1px solid #c3c4c7;
	padding: 6px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #50575e;
	transition: background-color 0.2s;
}

.mediat_state-btn:last-child {
	border-right: none;
}

.mediat_state-btn:hover {
	background: #f0f0f1;
}

.mediat_state-btn.is-pending {
	color: #d63638;
}

.mediat_state-btn.is-in-progress {
	color: #f56e28;
}

.mediat_state-btn.is-completed {
	color: #00a32a;
}

/* Selection Mode Styles */
.mediat_workspace.selection-mode .mediat_asset-card {
	cursor: pointer;
}

.mediat_workspace.selection-mode .mediat_asset-card::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(34, 113, 177, 0);
	transition: background-color 0.2s ease;
	z-index: 20;
}

.mediat_workspace.selection-mode .mediat_asset-card:hover::after {
	background-color: rgba(34, 113, 177, 0.1);
}

.mediat_workspace.selection-mode .mediat_asset-card.is-selected::after {
	background-color: rgba(34, 113, 177, 0.05);
}

/* Ensure mediat_selector stays visible if needed, but the overlay will intercept clicks */
.mediat_workspace.selection-mode .mediat_asset-card .mediat_selector {
	z-index: 25;
}

/* Asset Cards */
.mediat_asset-card {
	background: #fff;
	border: 3px solid transparent;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	position: relative;
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.mediat_asset-card:hover {
	background-color: rgba(0, 115, 170, 0.05);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.mediat_asset-card.is-selected {
	border-color: #0073aa;
	box-shadow: 0 0 0 2px #0073aa, 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mediat_selector {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 10;
	width: 24px;
	height: 24px;
	background: #fff;
	border: 2px solid #50575e;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.1s;
}

.mediat_asset-card.is-selected .mediat_selector {
	background: #2271b1;
	border-color: #2271b1;
}

.mediat_asset-card.is-selected .mediat_selector::after {
	content: "\f147";
	/* Dashicons yes */
	font-family: dashicons;
	color: #fff;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 16px;
}

.mediat_asset-visual {
	margin: 0;
	height: 180px;
	background: #f6f7f7;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mediat_asset-visual img {
	max-width: 100%;
	height: 100%;
	object-fit: contain;
}

.mediat_no-visual {
	color: #a7aaad;
}

.mediat_no-visual .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
}

.mediat_info-trigger {
	position: absolute;
	bottom: 12px;
	right: 12px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #dcdcde;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: scale(0.9);
	transition: all 0.2s;
	color: #3c434a;
}

.mediat_asset-card:hover .mediat_info-trigger {
	opacity: 1;
	transform: scale(1);
}

.mediat_info-trigger:hover {
	background: #fff;
	color: #2271b1;
}

.mediat_asset-details {
	padding: 5px;
}

.mediat_asset-name {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	color: #1d2327;
	white-space: pre-line;
	word-wrap: break-word;
	text-overflow: ellipsis;
}

/* Status Indicators on Cards */
.mediat_asset-card.status-pending {
	border-color: #dc3545;
	background-color: rgba(220, 53, 69, 0.25);
}

.mediat_asset-card.status-pending .mediat_asset-visual,
.mediat_asset-card.status-pending .mediat_inline-discussion {
	background-color: rgba(220, 53, 69, 0.25);
}

.mediat_asset-card.status-in-progress {
	border-color: #ffc107;
	background-color: rgba(255, 193, 7, 0.25);
}

.mediat_asset-card.status-in-progress .mediat_asset-visual,
.mediat_asset-card.status-in-progress .mediat_inline-discussion {
	background-color: rgba(255, 193, 7, 0.25);
}

.mediat_asset-card.status-completed {
	border-color: #28a745;
	background-color: rgba(40, 167, 69, 0.25);
}

.mediat_asset-card.status-completed .mediat_asset-visual,
.mediat_asset-card.status-completed .mediat_inline-discussion {
	background-color: rgba(40, 167, 69, 0.25);
}

.mediat_asset-card.status-not-dl {
	border-color: #ef6c00;
	background-color: rgba(239, 108, 0, 0.15);
}

.mediat_asset-card.status-downloaded {
	border-color: #eee;
	background-color: #fff;
}

/* Inline Discussion */
.mediat_inline-discussion {
	padding: 5px;
	background: white !important;
	border-top: 1px solid #eee;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

/* Match card status color if empty (make it invisible) */
.mediat_inline-discussion:not(:has(.mediat_thread-item)) {
	background: transparent !important;
	border-top-color: transparent;
}

.mediat_thread-list {
	max-height: 200px;
	overflow-y: auto;
	margin-bottom: 10px;
	padding-right: 5px;
	flex-grow: 1;
}

/* Collapse empty thread list area */
.mediat_thread-list:not(:has(.mediat_thread-item)) {
	margin-bottom: 0;
	max-height: 0;
}

.mediat_no-comments {
	display: none;
}

.mediat_thread-list::-webkit-scrollbar {
	width: 4px;
}

.mediat_thread-list::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 2px;
}

.mediat_thread-list::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 2px;
}

.mediat_inline-thread-form {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border-radius: 5px;
	padding: 2px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mediat_inline-thread-form textarea {
	flex-grow: 1;
	padding: 8px 40px 8px 15px;
	border: none;
	background: transparent;
	resize: none;
	min-height: 66px;
	max-height: 66px;
	line-height: 20px;
	font-size: 0.9em;
	margin: 0;
	border-radius: 20px;
}

.mediat_inline-thread-form textarea:focus {
	outline: none;
	background: transparent;
}

.mediat_inline-thread-form textarea::placeholder {
	color: #bbb;
	font-style: italic;
}

.mediat_inline-thread-form button {
	position: absolute;
	right: 5px;
	top: 50%;
	transform: translateY(-50%);
	background: #0073aa;
	border: none;
	padding: 0;
	margin: 0;
	width: 32px;
	height: 32px;
	cursor: pointer;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.mediat_inline-thread-form button:hover {
	background: #005177;
	transform: translateY(-50%) scale(1.05);
}

.mediat_inline-thread-form button::before {
	content: '→';
	font-size: 18px;
	font-weight: bold;
	font-family: inherit;
}

/* Floating controls moved to mediat_floating-menu.css */

/* Base Overlays & Dialogs */
.mediat_overlay-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 9999;
	display: none;
	backdrop-filter: blur(2px);
}

.mediat_overlay-backdrop.is-active {
	display: block;
}

/* Legacy Dialog styles moved to mediat_dialog.css */

.mediat_dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

/* Legacy Media Viewer styles moved to mediat_dialog.css */

/* Discussion Thread Styling */
.mediat_thread-list {
	flex-grow: 1;
	margin-bottom: 16px;
}

.mediat_thread-item {
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
	font-size: 0.9em;
}

.mediat_thread-item:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.mediat_thread-meta {
	display: flex;
	justify-content: space-between;
	margin-bottom: 4px;
}

.mediat_thread-author {
	font-weight: 600;
	margin: 0 0 3px;
	color: #444;
	font-size: 0.9em;
}

.mediat_thread-actions {
	display: flex;
	gap: 4px;
	opacity: 0;
	transition: opacity 0.2s;
}

.mediat_thread-item:hover .mediat_thread-actions {
	opacity: 1;
}

.mediat_thread-actions button {
	background: none;
	border: none;
	color: #8c8f94;
	cursor: pointer;
	padding: 2px 4px;
	border-radius: 4px;
	transition: background-color 0.2s, color 0.2s;
}

.mediat_thread-actions button:hover {
	background: #f0f0f1;
}

.mediat_thread-actions .mediat_edit-comment:hover {
	color: #2271b1;
}

.mediat_thread-actions .mediat_delete-comment:hover {
	color: #d63638;
}

/* Edit Comment Form Styling */
.mediat_edit-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.mediat_edit-input {
	width: 100%;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 8px 12px;
	font-size: 13px;
	resize: vertical;
	box-sizing: border-box;
}

.mediat_edit-input:focus {
	border-color: #2271b1;
	outline: none;
}

.mediat_thread-text>p {
	margin: 5px 0;
}

.mediat_thread-text {
	margin: 0;
	color: #666;
	line-height: 1.4;
	font-size: inherit;
}

.mediat_thread-form {
	margin-top: auto;
}

.mediat_thread-input {
	width: 100%;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 12px;
	min-height: 80px;
	resize: vertical;
	margin-bottom: 8px;
	box-sizing: border-box;
}

.mediat_thread-submit {
	width: 100%;
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 10px;
	border-radius: 4px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
}

.mediat_thread-submit:hover {
	background: #135e96;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
	.mediat_date-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.mediat_date-actions {
		width: 100%;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.mediat_floating-controls {
		min-width: 90%;
		flex-wrap: wrap;
		justify-content: center;
		padding: 16px;
		border-radius: 20px;
	}

	.mediat_viewer-layout {
		grid-template-columns: 1fr;
		grid-template-rows: 2fr 1fr;
	}

	.mediat_viewer-main {
		height: 60vh;
	}
}

@media (max-width: 768px) {
	.mediat_upload-panel {
		padding: 16px;
	}

	.mediat_summary-metrics {
		padding: 16px;
	}

	.mediat_status-breakdown {
		flex-direction: column;
		gap: 8px;
	}

	.mediat_action-toolbar {
		flex-direction: column;
		width: 100%;
	}

	.mediat_action-btn {
		width: 100%;
		justify-content: center;
	}
}

/* Login Prompt Card */
.mediat_login-prompt-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px 20px;
}

.mediat_login-prompt-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 32px;
	text-align: center;
	max-width: 400px;
	width: 100%;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mediat_login-prompt-icon {
	width: 64px;
	height: 64px;
	background: #f0f0f1;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
	color: #646970;
}

.mediat_login-prompt-icon .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
}

.mediat_login-prompt-title {
	margin: 0 0 12px;
	font-size: 20px;
	color: #1d2327;
}

.mediat_login-prompt-text {
	margin: 0 0 24px;
	font-size: 15px;
	color: #50575e;
	line-height: 1.5;
}

.mediat_login-prompt-btn {
	display: inline-flex;
	padding: 10px 24px;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
}

/* Legacy Custom Dialog styles moved to mediat_dialog.css */

.mediat_btn-danger {
	background-color: #d63638;
	color: #fff;
	border: none;
}

.mediat_btn-danger:hover {
	background-color: #b32d2e;
}


