/**
 * Frontend Stylesheet for WP Visual Feedback Tool
 */

/* Root Container Reset */
#ds-feedback-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
	box-sizing: border-box;
}

#ds-feedback-root *,
#ds-feedback-root *::before,
#ds-feedback-root *::after {
	box-sizing: inherit;
}

/* Floating Action Button & Bar Container */
.ds-fb-widget-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	pointer-events: auto;
}

/* Primary FAB Button */
.ds-fb-fab-button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: #0f172a;
	color: #ffffff;
	border: none;
	border-radius: 30px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ds-fb-fab-button:hover {
	background: #1e293b;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.4);
}

.ds-fb-fab-button.active {
	background: #dc2626;
	color: #ffffff;
}

.ds-fb-fab-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Toolbar / Filter Bar */
.ds-fb-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	padding: 8px 16px;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
	border: 1px solid #e2e8f0;
}

.ds-fb-toolbar label {
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	user-select: none;
}

.ds-fb-toolbar select {
	padding: 6px 12px;
	border-radius: 6px;
	border: 1px solid #cbd5e1;
	background: #f8fafc;
	font-size: 12px;
	color: #1e293b;
	outline: none;
	cursor: pointer;
}

.ds-fb-toolbar select:focus {
	border-color: #2563eb;
}

/* Inspector Overlay State */
body.ds-fb-inspector-active {
	cursor: crosshair !important;
}

body.ds-fb-inspector-active * {
	cursor: crosshair !important;
}

/* Hover Highlight Border */
.ds-fb-highlight-box {
	position: absolute;
	pointer-events: none;
	border: 2px dashed #2563eb;
	background-color: rgba(37, 99, 235, 0.08);
	z-index: 999990;
	transition: all 0.05s ease-out;
	border-radius: 4px;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Pin Overlay Badges */
.ds-fb-pin-badge {
	position: absolute;
	z-index: 999980;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
	transform: translate(-50%, -50%) scale(1);
	transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ds-fb-pin-badge:hover {
	transform: translate(-50%, -50%) scale(1.2);
	z-index: 999985;
}

.ds-fb-pin-badge svg {
	width: 16px;
	height: 16px;
	fill: #ffffff;
}

/* Pin Status Colors */
.ds-fb-pin-open {
	background: #2563eb; /* Blue */
	border: 2px solid #ffffff;
}

.ds-fb-pin-discuss {
	background: #ea580c; /* Orange */
	border: 2px solid #ffffff;
}

.ds-fb-pin-resolved {
	background: #16a34a; /* Green */
	border: 2px solid #ffffff;
}

/* Modals & Dialogs Backdrop */
.ds-fb-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(4px);
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.ds-fb-modal-backdrop.active {
	opacity: 1;
	pointer-events: auto;
}

/* Modal Content Card */
.ds-fb-modal-content {
	background: #ffffff;
	border-radius: 16px;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	transform: translateY(20px);
	transition: transform 0.25s ease;
}

.ds-fb-modal-backdrop.active .ds-fb-modal-content {
	transform: translateY(0);
}

.ds-fb-modal-header {
	padding: 16px 24px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ds-fb-modal-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
}

.ds-fb-modal-close {
	background: none;
	border: none;
	color: #94a3b8;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	transition: background 0.15s;
}

.ds-fb-modal-close:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.ds-fb-modal-body {
	padding: 24px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Modal Forms & Inputs */
.ds-fb-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ds-fb-form-group label {
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ds-fb-form-group input[type="text"],
.ds-fb-form-group textarea,
.ds-fb-form-group select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	color: #0f172a;
	background: #ffffff;
	transition: border-color 0.15s;
}

.ds-fb-form-group input[type="text"]:focus,
.ds-fb-form-group textarea:focus,
.ds-fb-form-group select:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ds-fb-form-group textarea {
	resize: vertical;
	min-height: 90px;
}

/* Screenshot Preview Container */
.ds-fb-screenshot-preview {
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	max-height: 180px;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ds-fb-screenshot-preview img {
	width: 100%;
	height: auto;
	max-height: 180px;
	object-fit: contain;
}

/* Modal Footer Buttons */
.ds-fb-modal-footer {
	padding: 16px 24px;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.ds-fb-btn {
	padding: 8px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.15s;
}

.ds-fb-btn-secondary {
	background: #e2e8f0;
	color: #475569;
}

.ds-fb-btn-secondary:hover {
	background: #cbd5e1;
	color: #0f172a;
}

.ds-fb-btn-primary {
	background: #2563eb;
	color: #ffffff;
}

.ds-fb-btn-primary:hover {
	background: #1d4ed8;
}

.ds-fb-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Comments List */
.ds-fb-comments-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 220px;
	overflow-y: auto;
	padding-right: 4px;
}

.ds-fb-comment-item {
	background: #f8fafc;
	border-radius: 8px;
	padding: 10px 14px;
	border: 1px solid #f1f5f9;
}

.ds-fb-comment-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	margin-bottom: 4px;
}

.ds-fb-comment-author {
	font-weight: 700;
	color: #1e293b;
}

.ds-fb-comment-date {
	color: #94a3b8;
}

.ds-fb-comment-content {
	font-size: 13px;
	color: #334155;
	white-space: pre-wrap;
}

/* Responsive adjustments */
@media (max-width: 640px) {
	.ds-fb-widget-container {
		bottom: 16px;
		right: 16px;
	}

	.ds-fb-fab-button {
		padding: 10px 16px;
		font-size: 13px;
	}

	.ds-fb-modal-content {
		max-width: 100%;
		border-radius: 12px;
	}
}

