/* Base Styles */
* {
	box-sizing: border-box;
}

::-webkit-scrollbar {
	display: none;
}

/* Navigation adjustments - removing sticky header styles */
#header {
	position: relative;
	z-index: 20;
}

#mobile-menu {
	z-index: 19;
	position: relative;
}

#main-content {
	position: relative;
	z-index: 10;
	padding-top: 0.5rem;
}

/* UI Elements */
.highlighted-section {
	outline: 2px solid #3f20fb;
	background-color: rgba(63, 32, 251, 0.1);
}

.edit-button {
	position: absolute;
	z-index: 1000;
}

/* Echo Report Specific Styles */
.preview-icon {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

/* Glowing animation for the record button */
@keyframes glow {
	0% {
		box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
	}
	50% {
		box-shadow: 0 0 20px rgba(0, 255, 0, 1);
	}
	100% {
		box-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
	}
}

.glowing {
	animation: glow 1s infinite;
}

/* Improved textarea styles */
textarea {
	resize: vertical;
	overflow-y: auto;
	min-height: 100px;
	padding: 8px;
	border: 1px solid var(--color-base-400);
	border-radius: 0.375rem;
	background-color: var(--color-base-100);
	color: var(--color-base-content);
	outline: none;
	transition: border-color 0.2s;
}

textarea:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
	caret-color: var(--color-primary);
}

/* Dark mode textarea adjustments */
.dark textarea {
	background-color: var(--color-base-700);
	color: var(--color-base-100);
	border-color: var(--color-base-600);
}

.dark textarea:focus {
	border-color: var(--color-primary-400);
	box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

/* Improved input and textarea styles for echo table */
#echoTable input[type="text"],
#echoTable textarea {
	caret-color: #3b82f6; /* Bright blue cursor for visibility */
	padding: 6px 8px;
	border: 1px solid #4b5563;
	border-radius: 4px;
	background-color: #1f2937;
	color: #f3f4f6;
	outline: none;
	transition: all 0.2s;
}

#echoTable input[type="text"]:focus,
#echoTable textarea:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Make sure selects also have visible focus states */
#echoTable select {
	caret-color: #3b82f6;
	padding: 6px 8px;
}

#echoTable select:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Custom audio player styling for review section */
.custom-audio-player {
	background: #23272e !important;
	border-radius: 0.75rem;
	border: 1px solid #374151;
	padding: 0.5rem 0.5rem 0.5rem 0.5rem;
	box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.12);
	width: 100%;
	min-height: 44px;
	color-scheme: dark;
}

.custom-audio-player::-webkit-media-controls-play-button,
.custom-audio-player::-webkit-media-controls-pause-button {
	filter: invert(60%) sepia(100%) saturate(400%) hue-rotate(180deg);
}

.custom-audio-player::-webkit-media-controls-current-time,
.custom-audio-player::-webkit-media-controls-time-remaining-display {
	color: #d1d5db;
}

.custom-audio-player:focus {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

/* For Firefox */
.custom-audio-player {
	color-scheme: dark;
}

/* Attachment item styling */
.attachment-item {
	transition: all 0.2s ease;
}

.attachment-item:hover {
	background-color: #4b5563;
}

.remove-attachment:hover {
	transform: scale(1.1);
}

/* Loading overlay styling */
#loadingOverlay {
	backdrop-filter: blur(4px);
}

/* Preview container styling */
.preview-container {
	max-height: 220px;
	overflow-y: auto;
	padding: 12px;
	background-color: rgba(55, 65, 81, 0.3);
	border-radius: 8px;
	margin: 8px 0;
}

/* Multiple image preview improvements */
.preview-container .flex {
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	max-width: 100%;
}

.preview-container .relative {
	position: relative;
	display: inline-block;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s ease;
}

.preview-container .relative:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Image preview remove button styling */
.preview-container .relative button {
	cursor: pointer;
	border: none;
	font-size: 14px;
	font-weight: bold;
	line-height: 1;
	z-index: 10;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.preview-container .relative button:hover {
	transform: scale(1.1);
}

/* Common badge styling for image previews */
.preview-badge {
	position: absolute;
	top: 6px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	color: white;
	z-index: 10;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	border: 2px solid white;
}

/* Number badge specific styling */
.preview-number-badge {
	left: 6px;
	background-color: #3b82f6;
}

/* Remove button specific styling */
.preview-remove-btn {
	right: 6px;
	background-color: #ef4444;
	border: 2px solid white;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 12px;
	line-height: 1;
	font-weight: 700;
}

.preview-remove-btn:hover {
	background-color: #dc2626;
	transform: scale(1.15);
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Responsive preview icons for multiple images */
@media (max-width: 640px) {
	.preview-icon {
		width: 80px;
		height: 80px;
	}
}

/* Upload status message styling */
#uploadStatusMessage {
	font-weight: 500;
}

#uploadStatusMessage.success {
	color: #10b981;
}

#uploadStatusMessage.error {
	color: #ef4444;
}

/* CSS Variables for Theming */
:root {
	/* Base colors */
	--color-base: #ffffff;
	--color-base-50: #f9fafb;
	--color-base-100: #f3f4f6;
	--color-base-200: #e5e7eb;
	--color-base-300: #d1d5db;
	--color-base-400: #9ca3af;
	--color-base-500: #6b7280;
	--color-base-600: #4b5563;
	--color-base-700: #374151;
	--color-base-800: #1f2937;
	--color-base-900: #111827;
	--color-base-content: #1f2937;

	/* Primary colors */
	--color-primary: #3b82f6;
	--color-primary-50: #eff6ff;
	--color-primary-100: #dbeafe;
	--color-primary-200: #bfdbfe;
	--color-primary-300: #93c5fd;
	--color-primary-400: #60a5fa;
	--color-primary-500: #3b82f6;
	--color-primary-600: #2563eb;
	--color-primary-700: #1d4ed8;
	--color-primary-800: #1e40af;
	--color-primary-900: #1e3a8a;
	--color-primary-focus: #2563eb;
	--color-primary-content: #ffffff;

	/* Secondary colors */
	--color-secondary: #8b5cf6;
	--color-secondary-50: #f5f3ff;
	--color-secondary-100: #ede9fe;
	--color-secondary-200: #ddd6fe;
	--color-secondary-300: #c4b5fd;
	--color-secondary-400: #a78bfa;
	--color-secondary-500: #8b5cf6;
	--color-secondary-600: #7c3aed;
	--color-secondary-700: #6d28d9;
	--color-secondary-800: #5b21b6;
	--color-secondary-900: #4c1d95;
	--color-secondary-focus: #7c3aed;
	--color-secondary-content: #ffffff;

	/* Accent colors */
	--color-accent: #f472b6;
	--color-accent-50: #fdf2f8;
	--color-accent-100: #fce7f3;
	--color-accent-200: #fbcfe8;
	--color-accent-300: #f9a8d4;
	--color-accent-400: #f472b6;
	--color-accent-500: #ec4899;
	--color-accent-600: #db2777;
	--color-accent-700: #be185d;
	--color-accent-800: #9d174d;
	--color-accent-900: #831843;
	--color-accent-focus: #db2777;
	--color-accent-content: #ffffff;

	/* Neutral colors */
	--color-neutral: #6b7280;
	--color-neutral-50: #f9fafb;
	--color-neutral-100: #f3f4f6;
	--color-neutral-200: #e5e7eb;
	--color-neutral-300: #d1d5db;
	--color-neutral-400: #9ca3af;
	--color-neutral-500: #6b7280;
	--color-neutral-600: #4b5563;
	--color-neutral-700: #374151;
	--color-neutral-800: #1f2937;
	--color-neutral-900: #111827;
	--color-neutral-focus: #4b5563;
	--color-neutral-content: #ffffff;
}

/* Dark theme */
.dark {
	--color-base: #1f2937;
	--color-base-50: #111827;
	--color-base-100: #1f2937;
	--color-base-200: #374151;
	--color-base-300: #4b5563;
	--color-base-400: #6b7280;
	--color-base-500: #9ca3af;
	--color-base-600: #d1d5db;
	--color-base-700: #e5e7eb;
	--color-base-800: #f3f4f6;
	--color-base-900: #f9fafb;
	--color-base-content: #f9fafb;

	--color-primary: #60a5fa;
	--color-primary-50: #1e3a8a;
	--color-primary-100: #1e40af;
	--color-primary-200: #1d4ed8;
	--color-primary-300: #2563eb;
	--color-primary-400: #3b82f6;
	--color-primary-500: #60a5fa;
	--color-primary-600: #93c5fd;
	--color-primary-700: #bfdbfe;
	--color-primary-800: #dbeafe;
	--color-primary-900: #eff6ff;
	--color-primary-focus: #3b82f6;
	--color-primary-content: #1f2937;

	/* Secondary colors can be similarly overridden */
}

/* confirmation dialog */
/* Custom Modal Dialog */
.modal-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
}

.modal-overlay.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-container {
	background-color: #1f2937;
	padding: 1.5rem;
	border-radius: 0.5rem;
	width: 90%;
	max-width: 500px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-header {
	margin-bottom: 1rem;
}

.modal-body {
	margin-bottom: 1.5rem;
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
}

.modal-button {
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	font-weight: 500;
	transition: background-color 0.2s;
}

.modal-button-cancel {
	background-color: #4b5563;
	color: #f3f4f6;
}

.modal-button-cancel:hover {
	background-color: #374151;
}

.modal-button-confirm {
	background-color: #dc2626;
	color: #f3f4f6;
}

.modal-button-confirm:hover {
	background-color: #b91c1c;
}
