/* ==========================================================================
   UCDREAMS TOOLS - ISSUE & BUG REPORTER STYLESHEET
   Supports 100% Dark & Light Themes with zero visual overlap & zero emoji artifacts
   ========================================================================== */

/* 1. Floating Trigger Button (FAB / Pill) */
.ucd-reporter-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 0;
	z-index: 9980;
	pointer-events: none;
}

.ucd-reporter-fab-trigger {
	position: fixed;
	bottom: 32px;
	left: 28px;
	z-index: 9980;
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid rgba(226, 232, 240, 0.9);
	color: #475569;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	outline: none;
}

.ucd-rep-pos-bottom-right .ucd-reporter-fab-trigger {
	left: auto;
	right: 28px;
	bottom: 96px;
}

.ucd-reporter-fab-trigger:hover {
	transform: translateY(-2px);
	background: #ffffff;
	border-color: #C5453E;
	color: #C5453E;
	box-shadow: 0 8px 24px rgba(197, 69, 62, 0.18);
}

.ucd-reporter-fab-trigger:active {
	transform: translateY(0);
}

.ucd-rep-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #C5453E;
	line-height: 1;
	transition: transform 0.2s ease;
}

.ucd-reporter-fab-trigger:hover .ucd-rep-icon {
	transform: rotate(-10deg) scale(1.15);
}

/* Dark Theme Floating Trigger */
html[data-theme="dark"] .ucd-reporter-fab-trigger,
html.dark .ucd-reporter-fab-trigger {
	background: #161922;
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #CBD5E1;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .ucd-rep-icon,
html.dark .ucd-rep-icon {
	color: #FF7B72;
}

html[data-theme="dark"] .ucd-reporter-fab-trigger:hover,
html.dark .ucd-reporter-fab-trigger:hover {
	background: #1C202C;
	border-color: rgba(197, 69, 62, 0.5);
	color: #FF7B72;
	box-shadow: 0 8px 26px rgba(197, 69, 62, 0.28);
}

/* 2. Modal Backdrop */
.ucd-rep-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 100000;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ucd-rep-modal-backdrop.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* 3. Modal Dialog Container */
.ucd-rep-modal-dialog {
	width: 100%;
	max-width: 540px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.05);
	transform: scale(0.94) translateY(12px);
	transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
	overflow: hidden;
	box-sizing: border-box;
}

.ucd-rep-modal-backdrop.is-active .ucd-rep-modal-dialog {
	transform: scale(1) translateY(0);
}

/* Dark Theme Modal Dialog */
html[data-theme="dark"] .ucd-rep-modal-dialog,
html.dark .ucd-rep-modal-dialog {
	background: #161922;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* 4. Modal Header */
.ucd-rep-modal-header {
	padding: 20px 24px 18px 24px;
	border-bottom: 1px solid #f1f5f9;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-shrink: 0;
}

html[data-theme="dark"] .ucd-rep-modal-header,
html.dark .ucd-rep-modal-header {
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ucd-rep-header-title-wrap {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.ucd-rep-header-icon-badge {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: rgba(197, 69, 62, 0.12);
	color: #C5453E;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

html[data-theme="dark"] .ucd-rep-header-icon-badge,
html.dark .ucd-rep-header-icon-badge {
	background: rgba(197, 69, 62, 0.22);
	color: #FF7B72;
}

.ucd-rep-modal-title {
	margin: 0 0 3px 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.25;
}

html[data-theme="dark"] .ucd-rep-modal-title,
html.dark .ucd-rep-modal-title {
	color: #ffffff;
}

.ucd-rep-modal-subtitle {
	margin: 0;
	font-size: 12.5px;
	color: #64748b;
	line-height: 1.4;
}

html[data-theme="dark"] .ucd-rep-modal-subtitle,
html.dark .ucd-rep-modal-subtitle {
	color: #94a3b8;
}

.ucd-rep-close-btn {
	background: none;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	padding: 6px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.18s ease, color 0.18s ease;
	outline: none;
}

.ucd-rep-close-btn:hover {
	background: #f1f5f9;
	color: #0f172a;
}

html[data-theme="dark"] .ucd-rep-close-btn:hover,
html.dark .ucd-rep-close-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

/* 5. Modal Body */
.ucd-rep-modal-body {
	padding: 22px 24px 24px 24px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1;
}

/* Tool Selector Row & Preview Card */
.ucd-rep-tool-selector-group {
	margin-bottom: 4px;
}

.ucd-rep-tool-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.ucd-rep-auto-tag {
	font-size: 10px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 99px;
	background: rgba(16, 185, 129, 0.12);
	color: #059669;
}

html[data-theme="dark"] .ucd-rep-auto-tag,
html.dark .ucd-rep-auto-tag {
	background: rgba(16, 185, 129, 0.2);
	color: #34d399;
}

.ucd-rep-target-preview {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	margin-top: 6px;
	font-size: 11.5px;
	color: #64748b;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	word-break: break-all;
}

html[data-theme="dark"] .ucd-rep-target-preview,
html.dark .ucd-rep-target-preview {
	background: #12151C;
	border-color: rgba(255, 255, 255, 0.08);
	color: #94a3b8;
}

.ucd-rep-target-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	line-height: 1;
	flex-shrink: 0;
}

html[data-theme="dark"] .ucd-rep-target-icon,
html.dark .ucd-rep-target-icon {
	color: #94a3b8;
}

.ucd-rep-target-url {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 6. Form Controls */
.ucd-rep-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ucd-rep-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ucd-rep-label {
	font-size: 12.5px;
	font-weight: 600;
	color: #334155;
	display: flex;
	align-items: center;
	gap: 4px;
}

html[data-theme="dark"] .ucd-rep-label,
html.dark .ucd-rep-label {
	color: #CBD5E1;
}

.ucd-rep-required {
	color: #ef4444;
	font-weight: 700;
}

.ucd-rep-optional {
	font-weight: 400;
	color: #94a3b8;
	font-size: 11.5px;
}

.ucd-rep-hint {
	font-size: 11px;
	color: #64748b;
	margin-top: 2px;
}

html[data-theme="dark"] .ucd-rep-hint,
html.dark .ucd-rep-hint {
	color: #94a3b8;
}

.ucd-rep-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.ucd-rep-input,
.ucd-rep-select,
.ucd-rep-textarea {
	width: 100%;
	padding: 10px 14px;
	border-radius: 9px;
	border: 1px solid #cbd5e1;
	background: #ffffff;
	color: #0f172a;
	font-family: inherit;
	font-size: 13.5px;
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ucd-rep-input:focus,
.ucd-rep-select:focus,
.ucd-rep-textarea:focus {
	border-color: #C5453E;
	box-shadow: 0 0 0 3px rgba(197, 69, 62, 0.15);
}

html[data-theme="dark"] .ucd-rep-input,
html[data-theme="dark"] .ucd-rep-select,
html[data-theme="dark"] .ucd-rep-textarea,
html.dark .ucd-rep-input,
html.dark .ucd-rep-select,
html.dark .ucd-rep-textarea {
	background: #12151C;
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #ffffff;
}

html[data-theme="dark"] .ucd-rep-select option,
html[data-theme="dark"] .ucd-rep-select optgroup,
html.dark .ucd-rep-select option,
html.dark .ucd-rep-select optgroup {
	background: #161922;
	color: #ffffff;
}

html[data-theme="dark"] .ucd-rep-input:focus,
html[data-theme="dark"] .ucd-rep-select:focus,
html[data-theme="dark"] .ucd-rep-textarea:focus,
html.dark .ucd-rep-input:focus,
html.dark .ucd-rep-select:focus,
html.dark .ucd-rep-textarea:focus {
	border-color: #FF7B72;
	box-shadow: 0 0 0 3px rgba(197, 69, 62, 0.28);
}

.ucd-rep-textarea {
	resize: vertical;
	min-height: 90px;
	line-height: 1.5;
}

/* 7. Collapsible Diagnostics Details */
.ucd-rep-diag-details {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 9px;
	padding: 10px 14px;
	font-size: 12px;
}

html[data-theme="dark"] .ucd-rep-diag-details,
html.dark .ucd-rep-diag-details {
	background: #12151C;
	border-color: rgba(255, 255, 255, 0.08);
}

.ucd-rep-diag-summary {
	cursor: pointer;
	font-weight: 600;
	color: #64748b;
	display: flex;
	align-items: center;
	justify-content: space-between;
	user-select: none;
	outline: none;
}

html[data-theme="dark"] .ucd-rep-diag-summary,
html.dark .ucd-rep-diag-summary {
	color: #94a3b8;
}

.ucd-rep-diag-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

.ucd-rep-diag-details[open] .ucd-rep-diag-toggle-icon {
	transform: rotate(180deg);
}

.ucd-rep-diag-content {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px dashed #e2e8f0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
	color: #475569;
}

html[data-theme="dark"] .ucd-rep-diag-content,
html.dark .ucd-rep-diag-content {
	border-top-color: rgba(255, 255, 255, 0.08);
	color: #94a3b8;
}

.ucd-rep-diag-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

/* 8. Error Banner */
.ucd-rep-error-banner {
	padding: 10px 14px;
	border-radius: 8px;
	background: #fef2f2;
	border: 1px solid #fee2e2;
	color: #dc2626;
	font-size: 13px;
	font-weight: 500;
}

html[data-theme="dark"] .ucd-rep-error-banner,
html.dark .ucd-rep-error-banner {
	background: rgba(239, 68, 68, 0.15);
	border-color: rgba(239, 68, 68, 0.3);
	color: #fca5a5;
}

/* 9. Form Actions */
.ucd-rep-form-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 4px;
}

.ucd-rep-btn-secondary {
	padding: 10px 18px;
	border-radius: 8px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s ease;
	outline: none;
}

.ucd-rep-btn-secondary:hover {
	background: #e2e8f0;
	color: #0f172a;
}

html[data-theme="dark"] .ucd-rep-btn-secondary,
html.dark .ucd-rep-btn-secondary {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.1);
	color: #CBD5E1;
}

html[data-theme="dark"] .ucd-rep-btn-secondary:hover,
html.dark .ucd-rep-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
}

.ucd-rep-btn-primary {
	padding: 10px 22px;
	border-radius: 8px;
	background: #C5453E;
	border: 1px solid #B23D37;
	color: #ffffff;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 14px rgba(197, 69, 62, 0.3);
	transition: all 0.2s ease;
	outline: none;
}

.ucd-rep-btn-primary:hover {
	background: #b93730;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(197, 69, 62, 0.4);
}

.ucd-rep-btn-primary:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

/* Spinner */
.ucd-rep-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: ucd-rep-spin 0.7s linear infinite;
}

@keyframes ucd-rep-spin {
	to { transform: rotate(360deg); }
}

/* 10. Success Alert View */
.ucd-rep-success-view {
	text-align: center;
	padding: 30px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.ucd-rep-success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
}

.ucd-rep-success-title {
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 8px 0;
}

html[data-theme="dark"] .ucd-rep-success-title,
html.dark .ucd-rep-success-title {
	color: #ffffff;
}

.ucd-rep-success-desc {
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
	margin: 0 auto;
	max-width: 420px;
}

html[data-theme="dark"] .ucd-rep-success-desc,
html.dark .ucd-rep-success-desc {
	color: #94a3b8;
}

/* 11. Mobile Responsiveness */
@media (max-width: 640px) {
	.ucd-reporter-fab-trigger {
		bottom: 20px;
		left: 16px;
		padding: 7px 14px;
		font-size: 12px;
	}
	.ucd-rep-pos-bottom-right .ucd-reporter-fab-trigger {
		left: auto;
		right: 16px;
		bottom: 84px;
	}
	.ucd-rep-modal-backdrop {
		padding: 12px;
	}
	.ucd-rep-modal-dialog {
		max-height: 95vh;
		border-radius: 14px;
	}
	.ucd-rep-modal-header {
		padding: 16px 18px 14px 18px;
	}
	.ucd-rep-modal-body {
		padding: 16px 18px 20px 18px;
	}
	.ucd-rep-grid-2 {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}
