@tailwind base;
@tailwind components;
@tailwind utilities;

@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

body {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100dvh;
	position: relative;
	overflow: hidden;
	overflow-y: auto;
	transition: 0.3s;
	/* background: url(../assets/bg.avif); */
	background: #fafbff;
	color: #2c3e50;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.logo {
	margin-bottom: 2rem;
}

#bgVideo {
	position: fixed;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -1000;
	transition: 0.3s;
}

header,
main {
	position: relative;
	z-index: 1;
	flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
input,
textarea {
	font-family: "Poppins" !important;
	transition: 0.3s;
	color: inherit;
}

h1 {
	font-size: 1.4rem;
	font-weight: 800;
	line-height: 1.2;
}

h2 {
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1.2;
}

h3 {
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.2;
}

h4 {
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
}

h5 {
	font-size: 0.8rem;
	font-weight: 500;
}

h6 {
	font-size: 0.6rem;
	font-weight: 500;
	line-height: 1.2;
}

a {
	color: #2c64d3;
	text-decoration: none;
}

button > a {
	color: white;
}

main {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100dvh;
	padding: 1rem;
	margin-left: 200px; /* Match the sidebar width */
	transition: all 0.3s ease;
}

h1 {
	font-size: 1.6rem;
}

.tagline {
	font-size: 1rem;
	text-align: center;
	margin-top: -1rem;
	margin-bottom: 1.8rem;
	transition: 0.3s;
}

.upload-container {
	width: 100%;
	max-width: 800px;
	display: flex;
	flex-direction: column;
	border-radius: 24px;
	overflow: hidden;
	justify-content: center;
	align-items: center;
	margin: 0 auto;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	border: 2px dashed rgba(0, 123, 255, 0.2);
	min-height: 120px;
	position: relative;
	will-change: transform, opacity, border-color, background-color;
	background: rgba(255, 255, 255, 0.5);
	backdrop-filter: blur(10px);
}

.upload-container.drag-over {
	border-color: #007bff;
	background: rgba(0, 123, 255, 0.05);
	transform: scale(1.02);
	box-shadow: 0 8px 30px rgba(0, 123, 255, 0.1);
}

.dropzone-content {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	text-align: center;
	gap: 2rem;
	width: 100%;
}

.files-row {
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 1rem;
	margin-top: 1rem;
	padding: 0 1.5rem 0.5rem;
}

.selected-files::-webkit-scrollbar {
	height: 6px;
}

.selected-files::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 3px;
}

.selected-files::-webkit-scrollbar-thumb {
	background: rgba(147, 197, 253, 0.3);
	border-radius: 3px;
	transition: background 0.2s ease;
}

.selected-files::-webkit-scrollbar-thumb:hover {
	background: rgba(147, 197, 253, 0.5);
}

.file-counter {
	opacity: 0;
	display: flex;
	transition: all 0.3s ease;
	color: #2B79F1;
	font-size: 0.8rem;
	font-weight: 500;
	text-align: center;
	justify-content: center;
	align-items: center;
}

.selected-files {
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
	width: 100%;
	transition: all 0.3s ease;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(147, 197, 253, 0.5) transparent;
}

.upload-icon-container {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #EFF6FF;
	border-radius: 12px;
	margin-bottom: 0;
	flex-shrink: 0;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-icon-svg {
	width: 28px;
	height: 28px;
	color: #2B79F1;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.drag-over .upload-icon-container {
	background: #EFF6FF;
	transform: scale(1.1);
}

.drag-over .upload-icon-svg {
	color: #2B79F1;
}

.dropzone-text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-align: left;
	flex: 1;
}

.primary-text {
	font-size: 1rem;
	font-weight: 500;
	color: #2c3e50;
}

.secondary-text {
	font-size: 0.875rem;
	color: #64748b;
}

.file-types {
	font-size: 0.8rem;
	color: #94a3b8;
	margin-top: 0.5rem;
}

.file-count-max {
	color: #2c7df7;
	font-weight: 500;
}

.selected-file {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.75rem;
	background: #EFF6FF;
	border: 1px solid #93C5FD;
	border-radius: 7px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
	max-width: fit-content;
	gap: 0.5rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: default;
	will-change: transform, opacity;
}

.selected-file:hover {
	background: #DBEAFE;
	transform: translateY(-1px);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.file-info {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.file-name {
	font-size: 0.85rem;
	color: #037BFC;
	font-weight: 500;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.file-size {
	font-size: 0.75rem;
	color: #037BFC;
	margin-left: 0.25rem;
}

.remove-file {
	width: 16px;
	height: 16px;
	padding: 2px;
	border-radius: 50%;
	color: #007bff;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	opacity: 0.6;
	will-change: transform, opacity;
}

.remove-file:hover {
	opacity: 1;
	transform: scale(1.2) rotate(90deg);
}

#speed-tag {
	position: relative;
	background-color: #f0f0f0;
	font-size: 0.6rem;
	color: #64748b;
	border-radius: 5px;
	padding: 0.2rem 0.3rem;
	margin-left: 0.3rem;
	top: -10px;
}

#language-code-tag {
	position: absolute;
	background-color: #f0f0f0;
	font-size: 0.6rem;
	color: #64748b;
	border-radius: 5px;
	padding: 0.2rem 0.3rem;
	margin-left: 0.3rem;
	top: -0.7rem;
	left: -1.8rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#language-tag, #translated-to-tag {
    position: relative;
    background-color: #f0f0f0;
    font-size: 0.7rem;
    color: #64748b;
    border-radius: 5px;
    padding: 0.2rem 0.5rem;
    margin: 0.2rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    top: -1rem;
    cursor: default;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#language-tag:hover, #translated-to-tag:hover {
    transform: translateY(-2px) scale(1.05);
    background-color: #e8e8e8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

#audio-upload {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	opacity: 0;
	cursor: pointer;
}

.file-input-label {
	display: flex;
	justify-content: space-between;
	cursor: pointer;
	width: 100%;
	padding: 0.4rem;
	font-size: 0.9rem;
	align-items: center;
	transition: 0.3s;
}

.file-name-display {
	padding: 0.3rem 1rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: 0.3s;
}

.audio-icon {
	width: 24px;
	height: 24px;
	margin-right: 10px;
	margin-bottom: -6px;
	color: #666;
	transition: 0.3s;
}

.file-warning, #warning {
	color: #d9534f;
	font-size: 0.85rem;
	margin-top: 1rem;
	text-align: center !important;
	justify-content: center;
	transition: 0.3s;
}

.xhidden {
	transform: translateY(-5px);
	opacity: 0;
	display: none !important;
	transition: 0.3s;
}

#file-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: 0.3s;
}

.upload-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 2px;
	margin-right: 1rem;
	transition: 0.3s;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.record {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 1rem;
	padding: 13px 30px;
	gap: 8px;
	max-height: 40px;
	font-weight: 450;
	background-color: #007bff;
	/* Or any color you prefer */
	color: white;
	border: none;
	border-radius: 25px;
	cursor: pointer;
	transition: 0.3s;
}

.record > svg {
	width: 20px;
	height: 20px;
	color: white;
}

.record:hover {
	background-color: #0061c8;
	/* Darker shade for hover effect */
}

.recording {
	background-color: #c80000;
}

.recording:hover {
	background-color: #a70202;
}

.submit {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 1.5rem auto 0;
	padding: 0.875rem 2rem;
	font-size: 0.95rem;
	font-weight: 500;
	background: linear-gradient(135deg, #2C7DF7 0%, #2C64D3 100%);
	color: white;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(44, 125, 247, 0.2);
}

.submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(44, 125, 247, 0.3);
}

.submit:active {
	transform: translateY(0);
}

#upload-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#upload-content.bottom-left {
	position: fixed;
	bottom: 20px;
	left: 220px; /* Account for sidebar width */
	width: auto;
	margin: 0;
	z-index: 50;
	transition: left 0.3s ease;
}

body.sidebar-collapsed #upload-content.bottom-left {
	left: 80px; /* Account for collapsed sidebar width */
}

@media (max-width: 768px) {
	#upload-content.bottom-left {
		left: 20px; /* Adjust for mobile view */
	}
}

#upload-content .buttons {
	width: 100%;
	display: flex;
	justify-content: center;
}

#upload-content.bottom-left .buttons {
	width: auto;
	justify-content: flex-start;
	gap: 1rem;
}

.onelive-control-section {
	display: flex;
	flex-direction: row;
	align-items: center;
	margin-left: 4rem;
	transition: 0.3s;
	margin-bottom: -0.5rem;
}

.onelive-control-buttons {
	display: flex;
	gap: 1rem;
	margin: 1rem 0;
	justify-content: center;
}

.playback,
.download-playback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: white;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(44, 125, 247, 0.1);
}

.playback:hover,
.download-playback:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(44, 125, 247, 0.2);
}

.playback:active,
.download-playback:active {
	transform: translateY(0);
}

.format-live-panel-button,
.format-live-svg {
	align-items: center;
	justify-content: center;
	margin-top: 1rem;
	gap: 10px;
	padding: 10px;
	max-height: 40px;
	max-width: 40px;
	font-size: 1rem;
	background-color: white;
	box-shadow: 2px 2px 80px rgba(200, 23, 55, 0.2);
	/* Or any color you prefer */
	border: none;
	border-radius: 25px;
	cursor: pointer;
	transition: 0.3s !important;
}

.format-live-panel-button:hover,
.format-live-svg:hover {
	transform: scale(0.9) !important;
	color: #007bff;
}

.record {
	animation: record-pulse 2s infinite;
}

.record.disabled::before,
.playback.disabled::before,
.download-playback.disabled::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0);
	filter: grayscale(100%);
	pointer-events: none;
	transition: all 0.3s;
	/* Ensures that the overlay doesn't block interaction */
}

.record.disabled:hover,
.playback.disabled:hover,
.download-playback.disabled:hover {
	pointer-events: none;
	transform: scale(1);
	/* Ensures that the overlay doesn't block interaction */
}

.playback:hover,
.download-playback:hover {
	transform: scale(0.9) !important;
}

#canvas {
	box-shadow: 0 0 200px -15px rgba(0, 123, 255, 1);
	border-radius: 20px;
	margin-top: 2.5rem;
}

@keyframes fadeInWord {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes record-pulse {
	0% {
		transform: scale(0.98);
		box-shadow: 2px 2px 20px rgba(23, 88, 200, 0.17);
	}

	70% {
		transform: scale(1);
		box-shadow: 2px 2px 20px rgba(15, 101, 249, 0.17);
	}

	100% {
		transform: scale(0.98);
		box-shadow: 2px 2px 20px rgba(23, 88, 200, 0.17);
	}
}

.buttons {
	display: flex;
	gap: 15px;
	transition: all 0.3s;
	justify-content: center;
}

.disabled {
	background-color: gray;
	cursor: auto;
}

.disabled-without-background {
	background-color: transparent;
	cursor: auto;
}

.submit:hover {
	background-color: #0056b3;
	/* Darker shade for hover effect */
}

.arrow-icon {
	margin-left: 8px;
	width: 18px;
	height: 18px;
	opacity: 0.7;
	/* Makes the arrow subtle */
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.submit:hover .arrow-icon {
	opacity: 1;
	transform: translateX(3px);
	transition: 0.3s;
	/* Slight movement on hover */
}

.upload-icon svg {
	width: 24px;
	height: 24px;
	transition: 0.3s;
}

#transcription {
	position: relative;
	width: 100%;
	max-width: 100%;
	border-radius: 1.5rem;
	background: #fafbff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
	font-weight: 400;
	padding: 0.1rem;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	backdrop-filter: blur(20px);
}

#conversation-analysis {
	position: relative;
	border-radius: 1.5rem;
	background: #fafbff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
	font-weight: 400;
	padding: 0.1rem;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	backdrop-filter: blur(20px);
}

.transcription-header {
	position: relative;
	display: flex;
	justify-content: flex-end;
	width: 100%;
	padding: 0.5rem 0;
}

#transcription-options {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background-color: white;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

#transcription-options:hover {
	transform: scale(0.95);
	box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

#close-transcription-options {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background-color: white;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

#close-transcription-options:hover {
	transform: scale(0.95);
	box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}

#transcription-options img {
	width: 20px;
	height: 20px;
}

#close-transcription-options img {
	width: 16px;
	height: 16px;
}

#transcription-options-panel {
	display: none;
	opacity: 0;
	position: absolute;
	transition: all 0.3s;
	transform: translateY(10%);
	flex-direction: column;
	top: 0.2rem;
	right: 0.2rem;
	z-index: 9999 !important;
}

#transcription-options-panel.active {
	opacity: 1;
	transform: translateY(0);
}


#transcription-text {
    display: block;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    transition: all 0.3s ease;
    white-space: pre-line;
    max-height: 90dvh;
    width: 100%;
    background: #fff;
    color: #2c3e50;
    border-radius: 1.3rem;
    padding: 0 2rem;
    overflow: hidden;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#onelive-text {
	display: block;
	flex-direction: column;
	justify-content: center;
	align-self: center;
	transition: all 0.3s ease;
	white-space: pre-line;
	max-height: 75dvh;
	width: 100%;
	background: #fff;
	color: #2c3e50;
	border-radius: 1.3rem;
	padding: 2rem;
	overflow: hidden;
	overflow-y: auto;
	font-size: 0.95rem;
	line-height: 1.6;
	box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

#transcription-text.editable, #onelive-text.editable {
    border: 2px solid #87aef0;
    padding: 2rem;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
    transform-origin: center top;
    animation: expand-edit 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure content-real-content has no border in edit mode */
.content-real-content[contenteditable="true"] {
    border: none;
    outline: none;
}

#transcription-text.exit-edit, #onelive-text.exit-edit {
    animation: collapse-edit 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes expand-edit {
    0% {
        transform: scaleY(0.97);
        opacity: 0.8;
    }
    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes collapse-edit {
    0% {
        transform: scaleY(1);
        opacity: 1;
    }
    100% {
        transform: scaleY(0.97);
        opacity: 0.8;
    }
}

.partial-transcript {
	color: #4a5568;
	opacity: 0.8;
	transition: all 0.3s ease;
}

.final-transcript {
	color: #2c3e50;
	transition: all 0.3s ease;
	font-size: 0.92rem;
	margin-bottom: 1.8rem !important;
	display: block;
	line-height: 1.6;
}

.timestamp {
	font-size: 0.7rem;
	font-family: "Montserrat", monospace !important;
	display: block;
	margin-bottom: 0.3rem;
	letter-spacing: 0.05rem;
	color: #0b61e1;
	font-weight: 500;
}

.word-span {
	opacity: 0;
	transition: opacity 0.3s;
	-webkit-transition: opacity 0.3s;
	-moz-transition: opacity 0.3s;
}

#transcription-actions {
	width: 100%;
	display: flex;
	gap: 1rem;
	padding: 0.5rem;
	/* transition: 0.3s; */
}

.action-icon {
	cursor: pointer;
	color: black;
	transition: 0.3s;
	width: 1.2rem;
	height: 1.2rem;
	transition: 0.3s;
	/* Or any color you prefer */
}

.action-icon:hover {
	color: #007bff;
	cursor: pointer;
	/* Darker shade for hover effect */
}


#transcription-text.editable:focus, #onelive-text.editable:focus {
	outline: none;
	transition: 0.3s;
}

.summary {
	position: relative;
}

#edit-speakers-icon {
	margin-right: -3px;
}

#edit-speakers-icon:hover {
	color: #007bff;
	cursor: pointer !important;
}

#summary-icon {
	margin: 0;
}

.clear-summary {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 20px;
	font-size: 0.8rem;
	font-weight: 500;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 25px;
	cursor: pointer;
	transition: background-color 0.3s ease;
	position: absolute;
	right: 0;
	top: 1.4rem;
}

footer {
	text-align: center;
	display: flex;
	justify-content: center;
	font-size: 0.8rem;
	padding: 0 20px;
	align-items: center;
	align-content: center;
	margin: 0 auto;
	width: 100%;
}

.fault-link {
	color: rgb(187, 34, 34);
}

#notice {
	font-size: 0.7rem;
	margin-top: 1.3rem;
	justify-content: center;
	text-align: center;
}

/* 
#media-type {
    padding: 0.6rem 2rem;
    margin-top: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 400;
    font-family: Poppins;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position-x: 95%;
    background-position-y: 48%;
    transition: 0.3s;
}

#media-type:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
} */

.title {
	color: #2e65d3;
	margin-bottom: 2rem;
	text-align: center;
	font-size: 1.3rem;
	font-weight: 600;
}

/* Base speaker styles */
span.speaker {
  font-weight: 600;
  color: #2c64d3 !important;
  margin-bottom: 0rem;
  position: relative;
  transition: all 0.3s;
}

/* View page specific speaker styles */
.view-page span.speaker:hover {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 5px;
}

/* Disable speaker hover and editing when in edit mode */
.transcription-text.editable span.speaker,
#transcription-text.editable span.speaker,
#onelive-text.editable span.speaker {
  cursor: default;
  color: #888;
  text-decoration: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  opacity: 0.7;
  background-color: rgba(240, 240, 240, 0.5);
  border-radius: 4px;
  padding: 2px 4px;
}

.transcription-text.editable span.speaker:hover,
#transcription-text.editable span.speaker:hover,
#onelive-text.editable span.speaker:hover {
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

.transcription-text.editable span.speaker:hover::before,
#transcription-text.editable span.speaker:hover::before,
#onelive-text.editable span.speaker:hover::before {
  display: none;
  content: none;
  animation: none;
}

.view-page span.speaker:hover::before {
  content: '✎';
  position: absolute;
  left: -1em;
  top: -0.8em;
  font-size: 1.3em;
  color: #2c64d3;
  opacity: 0;
  transform: translate(10px, 10px);
  animation: pencilAppear 0.3s ease forwards, pencilPulse 2s ease-in-out infinite;
}

@keyframes pencilAppear {
	to {
		opacity: 1;
		transform: translate(0, 0);
	}
}

@keyframes pencilPulse {
	0% {
		filter: drop-shadow(0 0 2px rgba(44, 100, 211, 0.3));
	}
	50% {
		filter: drop-shadow(0 0 4px rgba(44, 100, 211, 0.5));
	}
	100% {
		filter: drop-shadow(0 0 2px rgba(44, 100, 211, 0.3));
	}
}

.utterances {
	display: flex;
	flex-direction: column;
}

.text {
	margin-bottom: 1.2rem;
}

#feature-list > li {
	transition: all 0.3s;
}

#feature-list > li:hover {
	scale: 1.05;
	cursor: pointer;
}

.modal {
    flex-direction: column;
    position: fixed;
    z-index: 99999;
    left: 200px; /* Account for sidebar width */
    top: 0;
    width: calc(100% - 200px); /* Adjust width for sidebar */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    opacity: 1;
    display: none;
}

/* Adjust modal position for collapsed sidebar */
body.sidebar-collapsed .modal {
    left: 60px;
    width: calc(100% - 60px);
}

.modal.xhidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    margin: 0 auto;
    width: 100%;
    max-height: 70dvh;
    z-index: 99999999 !important;
    border-radius: 14px;
    text-align: center;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: scale(1);
    overflow-y: auto;
}

.modal.xhidden .modal-content {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .modal {
        left: 0 !important;
        width: 100% !important;
        padding: 0;
    }
    
    .modal-content {
        max-width: 95% !important;
        max-height: 80dvh;
        width: 95% !important;
        margin: 0 auto;
    }
}

#modal-button {
	transition: 0.4s;
	gap: 5px;
	display: flex;
	justify-content: center;
	align-content: center;
}

#saveTranscription, #cancelTranscription {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    color: white;
    margin-top: 15px;
    padding: 10px 30px;
    margin-bottom: 1rem;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#saveTranscription {
    background: #2c7df7 !important;
    animation: chat-pulse 2s infinite;
}

#saveTranscription:hover:not(:disabled) {
    background: #1d64d8;
    transform: scale(0.98);
}

#saveTranscription.disabled {
    background: #94a3b8;
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
    transform: none;
}

#cancelTranscription {
    background: #dc2626;
}

#cancelTranscription:hover {
    background: #b91c1c;
    transform: scale(0.98);
}

#saveTranscription.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
    transform: none;
    background: #94a3b8 !important;
}

#saveTranscription:disabled:hover {
    transform: none;
    background: #94a3b8 !important;
}


button:hover,
#saveTranscription:hover {
	cursor: pointer !important;
}

.modal-buttons button {
	padding: 13px 40px;
	margin: 0 5px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	transition: all 0.4s;
}

#confirmYes {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 30px;
	font-size: 0.8rem;
	font-weight: 500;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 25px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#confirmYes:hover {
	background-color: #0056b3;
}

#confirmNo {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 25px;
	font-size: 0.8rem;
	font-weight: 500;
	background-color: #303030;
	color: white;
	border: none;
	border-radius: 25px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#confirmNo:hover {
	background-color: #101010;
}

.popup {
	position: absolute;
	left: 0;
	right: 0;
	margin: 0 auto;
	transform: translate(-50%, -50%) scale(0);
	background: #f0f0f0;
	padding: 15px;
	border-radius: 20px;
	box-shadow: 0 0 30px rgba(42, 99, 210, 0.4);
	z-index: 1000;
	transition: transform 0.3s ease-in-out;
	width: 45dvh;
	max-height: 40dvh;
	height: 100%;
	-webkit-overflow-scrolling: touch;
	justify-content: center;
	align-content: center;
}

.popup form {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	max-width: 100%;
	max-height: 35dvh;
	margin: 0 auto;
	border-radius: 15px;
	padding: 1rem;
	justify-content: center;
	align-content: center;
}

#edit-speakers-form {
	display: flex;
	flex-direction: column;
	max-height: 50dvh;
	width: 80%;
	margin: 2rem auto;
	padding-bottom: 1rem;
	max-width: 100%;
	overflow-y: auto;
}

.edit-speaker-icon {
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0;
	transition: opacity 0.3s, transform 0.3s;
	cursor: pointer;
	margin-left: 5px;
}

.popup label,
.modal-content label,
.popup button,
.modal-content button {
	margin: 15px 0;
	font-weight: 500;
	text-align: center;
}

.popup input,
.modal-content input {
	padding: 13px;
	border-radius: 13px;
	outline: none;
	border: none;
	background: #dfdfdf;
	font-size: 1rem;
	font-weight: 500;
	margin: 10px;
}

#popup-button,
#popup-submit,
#modal-submit,
#modal-button {
	background: none;
	border: none;
	font-size: 0.9rem;
	cursor: pointer;
	background: #007bff;
	border-radius: 50px;
	color: white;
	margin: 0 auto;
	margin-top: 10px;
	text-align: center;
	width: 10rem;
	padding: 10px 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.popup-form {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: white;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
}

.popup-form input {
	width: 100%;
	padding: 10px;
	margin-bottom: 10px;
}

.popup-form button {
	padding: 10px 20px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.next-icon {
	width: 18px;
	height: 18px;
	opacity: 0.7;
	margin-bottom: -3.5px;
	margin-left: 3px;
	margin-top: 1.5px;
	/* Makes the arrow subtle */
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-button:hover .next-icon {
	opacity: 1;
	transform: translateX(3px);
	transition: 0.3s;
	/* Slight movement on hover */
}

#copyright {
	max-width: 50%;
}

#chatToggle {
	position: fixed;
	bottom: 20px;
	right: 20px;
	border: none;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all 0.3s ease;
	z-index: 9999 !important;
	background: linear-gradient(to right, #2563eb, #1d4ed8);
	color: white;
	padding: 8px 16px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 500;
}

#chatToggle svg {
	width: 24px;
	height: 24px;
	stroke-linecap: round;
	stroke-linejoin: round;
	display: block;
}

#chatToggleButton {
	color: white;
	background: none;
	border: none;
	border-radius: 100px;
	outline: none;
	font-size: 14px;
}

#closeChatBubble {
	position: absolute;
	top: -5px;
	right: -5px;
	background: #2c7df7;
	color: white;
	border: 1.5px solid white;
	border-radius: 100%;
	height: 20px;
	width: 20px;
	font-size: 16px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.close-modal {
	position: absolute;
	top: -25px;
	right: -10px;
	background: #2c7df7;
	color: white;
	border: 1.5px solid white;
	border-radius: 100%;
	height: 25px;
	width: 25px;
	font-size: 16px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.close-upgrade {
	position: absolute;
	top: -10px;
	right: -10px;
	background: #2c7df7;
	color: white;
	border: 1.5px solid white;
	border-radius: 100%;
	height: 25px;
	width: 25px;
	font-size: 16px;
	display: flex;
	justify-content: center;
	align-items: center;
}

#chatToggle:hover,
#closeChatBubble:hover {
	cursor: pointer !important;
	transform: scale(0.95);
}

#chatBubble {
	position: fixed;
	width: 90vw;
	max-width: 30rem;
	height: 85%;
	max-height: 85vh;
	bottom: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(20px);
	border-radius: 24px;
	box-shadow: 0 10px 40px rgba(44, 125, 247, 0.15);
	flex-direction: column;
	transition: all 0.3s ease;
	z-index: 9999 !important;
	border: 1px solid rgba(44, 125, 247, 0.1);
	display: flex;
}

.typed-word {
	opacity: 0;
	animation: fadeInWord 0.3s ease-out forwards;
}

.messages::-webkit-scrollbar-track {
	background: transparent !important;
	/* color of the tracking area */
}

.messages::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.2) !important;
	/* color of the scroll thumb */
	border-radius: 20px !important;
	/* roundness of the scroll thumb */
	border: 2px solid transparent !important;
	/* creates padding around scroll thumb */
}

.message {
	max-width: 80%;
	margin-bottom: 10px;
	border-radius: 18px;
	line-height: 1.4;
	word-wrap: break-word;
	opacity: 0;
	animation: fadeIn 0.5s ease-out forwards;
	position: relative;
	padding: 8px;
	margin: 5px 0;
}

.user-message {
	align-self: flex-end !important;
	background: linear-gradient(135deg, #2C7DF7 0%, #2C64D3 100%) !important;
	color: white;
	box-shadow: 0 4px 15px rgba(44, 125, 247, 0.2);
	border-radius: 18px 18px 18px 18px;
	padding: 12px 16px;
	font-size: 14px;
	font-family: "Poppins" !important;
	max-width: 90%;
	white-space: pre-wrap;
	word-wrap: break-word;
	transition: 0.3s;
	margin-bottom: 12px;
}

.ai-message {
	align-self: flex-start !important;
	background: #FFFFFF;
	color: #1A1A1A;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	max-width: 90%;
	font-size: 14px;
	padding: 12px 16px;
	font-family: "Poppins" !important;
	white-space: pre-wrap;
	word-wrap: break-word;
	transition: 0.3s;
	border-radius: 18px 18px 18px 18px;
	margin-bottom: 12px;
	border: 1px solid rgba(44, 125, 247, 0.1);
}

.message-timestamp {
	font-size: 0.7rem;
	margin-top: 4px;
	opacity: 0.7;
	font-family: "Montserrat", sans-serif !important;
}

.user-message .message-timestamp {
	text-align: right;
	color: rgba(255, 255, 255, 0.8);
}

.ai-message .message-timestamp {
	text-align: right;
	color: rgba(26, 26, 26, 0.6);
}

.message-content {
	line-height: 1.5;
	letter-spacing: 0.01em;
}

.chatArea {
	display: flex;
	margin: 20px !important;
	min-height: 50px;
	max-height: 20%;
	gap: 12px;
	overflow: hidden;
}

.chatArea textarea {
	width: 100%;
	min-height: 50px !important;
	height: 50px !important;
	padding: 15px 20px;
	border: 1px solid rgba(44, 125, 247, 0.1);
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.4;
	background: rgba(255, 255, 255, 0.9);
	resize: none;
	overflow-y: auto;
	word-wrap: break-word;
	box-sizing: border-box;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(44, 125, 247, 0.05);
}

.chatArea textarea:focus {
	outline: none;
	border-color: #2C7DF7;
	box-shadow: 0 4px 20px rgba(44, 125, 247, 0.1);
}

#send-chat {
	display: flex;
	align-self: center;
	background: linear-gradient(135deg, #2C7DF7 0%, #2C64D3 100%);
	padding: 12px;
	border: none;
	border-radius: 14px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(44, 125, 247, 0.2);
}

#send-chat:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(44, 125, 247, 0.3);
}

#send-chat img {
	filter: brightness(0) invert(1);
	transition: all 0.3s ease;
}

.chat-warning {
	font-size: 11px;
	color: #999;
	padding: 5px 0;
	margin-top: 0px;
	text-align: center;
}

/* Scrollbar styling for webkit browsers */
.messages::-webkit-scrollbar {
	width: 6px;
}

.messages::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.messages::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb:hover {
	background: #555;
}

.action-group {
	display: flex;
	align-items: center;
	cursor: pointer;
	border-radius: 6px;
	transition: all 0s ease !important;
}

.action-group:hover {
	/* background-color: #f0f0f0; */
	color: #007bff;
}

.action-group:hover .action-icon {
	color: #007bff !important;
}

.action-group .action-text {
	margin-left: 8px;
}

.messages {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	margin: 0 0;
	border-radius: 0;
	max-width: 100%;
	width: 100%;
	min-height: 100%;
	height: 100%;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
	-ms-overflow-style: -ms-autohiding-scrollbar !important;
	transition: all 0.3s ease !important;
	padding: 0;
}

.messages-container {
	position: relative;
	flex-grow: 1;
	overflow-y: auto;
	padding: 0 0;
	margin: 0 20px 0 20px;
	border-radius: 20px;
	/* background: rgba(255, 255, 255, 0.5); */
	overflow-x: hidden;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
	-ms-overflow-style: -ms-autohiding-scrollbar !important;
	transition: all 0.3s ease !important;
	backdrop-filter: blur(10px);
}

#clear-chat-history-btn {
	position: absolute;
    top: 10px; /* Position arrow at the bottom */
	left: 10px;
}

#chatTitle {
	color: #2C64D3;
	font-size: 0.9rem;
	font-weight: 650;
	text-align: center;
	padding: 0 20px;
}

.chat-header {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 40px;
	margin: 0 auto;
	width: 100%;
}

.quick-actions-container {
	position: absolute;
	bottom: 80px;
	left: 0;
	right: 0;
	display: flex;
	/*border-radius: 20px;*/
	margin: 0 auto;
	/*background: #E6F3FF;*/
	justify-content: center;
	align-items: center;
	transition: all 0.3s ease;
}

.quick-actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	opacity: 1;
	border-radius: 10px;
	padding: 10px 0 0 10px;
	transition: all 0.3s ease;
	max-width: calc(100% - 80px);
}

.quick-actions.collapsed {
	flex-wrap: nowrap;
	overflow-x: auto;
	white-space: nowrap;
	margin: 0 0 -11px 0;
	padding: 10px 10px 0 0px;
	max-width: calc(100% - 40px);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	/* Firefox */
	-ms-overflow-style: none;
	/* IE and Edge */
	max-height: 60px;
}

.quick-actions.collapsed .quick-action-btn {
	opacity: 0.85;
}

.quick-actions.collapsed .quick-action-btn:hover {
	opacity: 1;
}

.quick-actions.collapsed::-webkit-scrollbar {
	display: none;
	/* Chrome, Safari, Opera */
}

.quick-action-btn {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(44, 125, 247, 0.2);
	color: #2C7DF7;
	padding: 8px 18px;
	margin-bottom: 10px;
	margin-right: 10px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 500;
	transition: all 0.2s ease;
	white-space: nowrap;
	box-shadow: 0 4px 15px rgba(44, 125, 247, 0.1);
	flex: 1 1 auto;
	min-width: max-content;
	backdrop-filter: blur(10px);
}

.quick-action-btn:hover {
	background: linear-gradient(135deg, #2C7DF7 0%, #2C64D3 100%);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(44, 125, 247, 0.2);
}

/* Add active state for touch feedback */
.quick-action-btn:active {
    background: linear-gradient(135deg, #2C7DF7 0%, #2C64D3 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 125, 247, 0.2);
}

/* Add responsive handling */
@media screen and (max-width: 768px) {
	.quick-actions {
		padding: 0 5px;
		gap: 6px;
	}

	.quick-action-btn {
		padding: 6px 12px;
		font-size: 12px;
	}
}

/* Tablet devices */
@media (max-width: 1060px) {
	#copyright {
		max-width: 60%;
	}

	#transcription {
		width: 100%;
	}

	.modal-content {
		width: 80%;
		max-width: 60%;
	}
}

/* Mobile devices */
@media (max-width: 768px) {
	#copyright {
		max-width: 70%;
	}

	#file-name {
		font-size: 0.8rem;
	}

	main {
		margin-left: 0; /* Remove margin on mobile */
		padding: 0.5rem;
	}

	#transcription {
		max-width: 100%;
		border-radius: 1.2rem;
	}

	#transcription-text {
		padding: 0 1rem;
		font-size: 0.9rem;
		border-radius: 1rem;
	}

				
	#onelive-text {
		padding: 2rem 1rem;
		font-size: 0.9rem;
		border-radius: 1rem;
	}

	.title {
		color: #2e65d3;
		margin-bottom: 2rem;
		text-align: center;
		font-size: 1.1rem;
		line-height: 1.4rem;
		font-weight: 600;
	}

	.file-warning {
		width: 80%;
	}

	#transcription-text, #onelive-text {
		max-height: 60dvh;
	}

	/* #transcription-actions {
		height: 50px;
	} */

	.modal {
		width: 100%;
		left: 0;
	}

	.modal-content {
		transform: translateX(0);
		max-width: 90%;
	}

	.clear-summary {
		top: 1rem;
	}

	.submit {
		font-size: 0.9rem;
	}


	.chatArea {
		margin: 12px !important;
		min-height: 44px;
		gap: 8px;
	}

	.chatArea textarea {
		min-height: 44px !important;
		height: 44px !important;
		padding: 12px 16px;
		font-size: 13px;
		border-radius: 12px;
	}

	#send-chat {
		padding: 10px;
		border-radius: 12px;
	}

	#send-chat img {
		width: 20px;
		height: 20px;
	}

	.messages-container {
		margin: 0 12px 0 12px;
		border-radius: 16px;
	}

	.messages {
		padding: 12px;
	}

	.user-message, .ai-message {
		max-width: 95%;
		padding: 10px 14px;
		font-size: 13px;
		border-radius: 14px;
		margin-bottom: 10px;
	}

	.quick-actions-container {
		bottom: 70px; /* Adjusted from 80px */
	}

	.quick-actions {
		padding: 8px 0 0 8px;
		max-width: calc(100% - 24px);
	}

	.quick-actions.collapsed {
		padding: 8px 8px 0 0;
		max-width: calc(100% - 24px);
	}

	.quick-action-btn {
		padding: 6px 14px;
		margin-bottom: 8px;
		margin-right: 8px;
		border-radius: 10px;
		font-size: 12px;
	}

	#closeChatBubble {
		top: -8px;
		right: -8px;
		height: 24px;
		width: 24px;
		font-size: 14px;
	}

	.message-timestamp {
		font-size: 0.65rem;
	}

	/* Chat Toggle Button Mobile Styles */
	#chatToggle {
		padding: 16px;
		border-radius: 50%;
		width: 56px;
		height: 56px;
		bottom: 16px;
		right: 16px;
		justify-content: center;
		background: linear-gradient(135deg, #2C7DF7 0%, #2C64D3 100%);
		box-shadow: 0 4px 15px rgba(44, 125, 247, 0.2);
	}

	#chatToggle:hover {
		transform: translateY(-2px);
		box-shadow: 0 6px 20px rgba(44, 125, 247, 0.3);
	}

	#chatToggle span {
		display: none;
	}

	#chatToggle svg {
		display: block;
		width: 24px;
		height: 24px;
		stroke: white;
		stroke-width: 1.5;
		fill: none;
	}

	/* Upgrade Modal Mobile Styles */
	#upgradeModal {
		padding: 1rem;
	}

	#upgradeModal .relative {
		width: 95%;
		margin: 0 auto;
		max-width: none;
	}

	#upgradeModal .bg-black {
		border-radius: 1rem;
	}

	#upgradeModal .flex.flex-col.md\:flex-row {
		flex-direction: column;
		max-width: 100%;
	}

	#upgradeModal .w-fit.md\:w-max {
		width: 100%;
	}

	#upgradeModal .w-fit.md\:w-max img {
		width: 100%;
		height: auto;
		max-height: 200px;
		object-fit: cover;
		object-position: top;
		border-radius: 1rem 1rem 0 0;
	}

	#upgradeModal .flex.flex-col.px-8 {
		padding: 1.25rem;
	}

	#upgradeModal .font-bold.text-3xl {
		font-size: 1.75rem;
		text-align: center;
		line-height: 1.2;
		margin-bottom: 1rem;
	}

	#upgradeModal .text-white.flex.flex-col.gap-6 {
		gap: 1rem;
		text-align: center;
		font-size: 0.95rem;
	}

	#upgradeModal #upgrade-btn {
		margin: 0.5rem auto 0;
		width: 100%;
		max-width: 200px;
		padding: 0.75rem 1rem;
		font-size: 0.95rem;
	}

	#upgradeModal .close-upgrade {
		top: 0.5rem;
		right: 0.5rem;
		background: rgba(255, 255, 255, 0.1);
		width: 28px;
		height: 28px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		font-size: 1.25rem;
		z-index: 10;
	}

    .upload-container {
        flex-direction: column;
        min-height: 180px;
        max-width: 100%;
    }

    .dropzone-content {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .upload-icon-container {
        margin-bottom: 0.5rem;
    }

    .dropzone-text {
        text-align: center;
    }
}

.sidebar {
	position: fixed;
	left: 0;
	top: 0;
	height: 100dvh;
	width: 200px;
	/* background: #f6f5fc; */
	background: #F8F9FF;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	z-index: 999999999 !important;
}

.sidebar-header {
	padding: 1.5rem;
	display: flex;
	justify-content: center;
	align-items: center;
	border-bottom: 1px solid rgba(209, 209, 209, 0.234);
	background: #F8F9FF;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.08);
	height: 70px;
}

.sidebar-logo {
	height: 48px;
}

.sidebar-menu {
	padding: 1.5rem 0.75rem;
	background: #F8F9FF;
	list-style: none;
	margin: 0;
}

.sidebar-menu-bottom {
	margin-top: auto;
	padding: 1rem 0.75rem;
	border-top: 1px solid rgba(209, 209, 209, 0.234);
	background: #F8F9FF;
	backdrop-filter: blur(8px);
	border-radius: 0 0 12px 12px;
}

.sidebar-item {
	margin: 0.25rem 0;
}

.sidebar-link {
	display: flex;
	align-items: center;
	padding: 0.75rem 1rem;
	color: #64748b;
	text-decoration: none;
	transition: all 0.2s ease;
	border-radius: 8px;
	font-weight: 500;
	font-size: 0.9375rem;
}

.sidebar-link:hover {
	background: rgba(44, 125, 247, 0.04);
	color: #2c7df7;
	transform: translateY(-2px); /* Vertical movement on hover */
}

.sidebar-item.active .sidebar-link {
	background: rgba(44, 125, 247, 0.08);
	color: #2c7df7;
	font-weight: 600;
	transform: none; /* Disable transform on active items */
}

/* Keep icons centered, just highlighted when active */
.sidebar.collapsed .sidebar-item.active .sidebar-link {
	justify-content: center; /* Keep centered */
	background: rgba(44, 125, 247, 0.08);
	color: #2c7df7;
	transform: none; /* Ensure no movement */
}

/* Add these new styles to ensure icons stay centered in collapsed mode */
.sidebar.collapsed .sidebar-link {
	justify-content: center;
	padding: 0.75rem 0;
}

.sidebar.collapsed .sidebar-link:hover {
	transform: translateY(-2px); /* Keep vertical hover effect */
}

.sidebar.collapsed .sidebar-item.active .sidebar-link:hover {
	transform: none; /* No transform on active items, even on hover */
}

.sidebar-icon {
	width: 22px !important;
	height: 22px !important;
	margin-right: 12px;
	stroke: currentColor;
	stroke-width: 2;
	transition: all 0.2s ease;
	fill: none;
	flex-shrink: 0;
}

.sidebar-usage-icon {
	width: 16px !important;
	height: 16px !important;
	margin-right: 12px;
	stroke: currentColor;
	stroke-width: 2;
	transition: all 0.2s ease;
	fill: none;
	flex-shrink: 0;
}

/* Ensure the icon has no margin in collapsed mode */
.sidebar.collapsed .sidebar-icon {
	margin-right: 0;
}

/* Adjust main content */
main {
	margin-left: 200px;
	min-height: 100dvh;
	background: #f8f9ff;
	transition: margin-left 0.3s ease;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
	/* Sidebar Mobile Styles */
	.sidebar {
		transform: translateX(-100%);
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		width: 100%;
		background: #F8F9FF;
		backdrop-filter: blur(10px);
	}
	
	.sidebar.active {
		transform: translateX(0);
	}
	
	main {
		margin-left: 0;
	}

	#mobile-menu-btn {
		transition: all 0.2s ease;
	}

	#mobile-menu-btn:hover {
		background: #f8f9ff;
		color: #2c7df7;
	}

	.sidebar-menu {
		padding: 1rem;
	}

	.sidebar-link {
		padding: 1rem;
		font-size: 1rem;
	}

	.sidebar-icon {
		width: 20px;
		height: 20px;
		margin-right: 16px;
	}

	/* Chatbot Mobile Styles */
	#chatBubble {
		position: fixed;
		/* Make it full screen */
		width: 100% !important;
		height: 100% !important; /* Use 100% height to adapt to keyboard */
		top: 0;
		bottom: 0; /* Ensure bottom is defined */
		left: 0;
		margin: 0;
		border-radius: 0 !important; /* Remove border radius */
		max-width: 100vw;
		max-height: 100vh; /* Still limit max height to viewport */
		background: rgba(255, 255, 255, 0.8);
		backdrop-filter: blur(20px);
		box-shadow: 0 10px 40px rgba(44, 125, 247, 0.15);
		transition: all 0.3s ease;
		/* Ensure flex properties are applied */
		display: flex;
        flex-direction: column;
	}

	.chatArea {
		margin: 12px !important;
		min-height: 44px;
		gap: 8px;
		order: 2; /* Place at the bottom visually */
        flex-shrink: 0; /* Prevent shrinking */
	}

	.chatArea textarea {
		min-height: 44px !important;
		height: 44px !important;
		padding: 12px 16px;
		font-size: 13px;
		border-radius: 12px;
	}

	#send-chat {
		padding: 10px 12px;
		border-radius: 12px;
	}

	#send-chat img {
		width: 20px;
		height: 20px;
	}

	.messages-container {
		margin: 0px 12px 0 12px;
		border-radius: 16px;
		flex-grow: 1; /* Ensure it takes available space */
        min-height: 0; /* Allow shrinking */
        overflow-y: auto; /* Keep scroll */
	}

	.messages {
		padding: 12px;
	}

	.user-message, .ai-message {
		max-width: 95%;
		padding: 10px 14px;
		font-size: 13px;
		border-radius: 14px;
		margin-bottom: 10px;
	}

    .quick-actions-container {
        /* Remove absolute positioning */
        /* position: absolute; */
        /* bottom: 70px; */
        left: 0;
        right: 0;
        display: flex;
        margin: 0 auto;
        justify-content: center;
        align-items: center;
        transition: all 0.3s ease;
        order: 1; /* Place visually above chatArea */
        flex-shrink: 0; /* Prevent shrinking */
        padding-bottom: 5px; /* Add some space below */
    }

	.quick-actions {
		padding: 8px 0 0 8px;
		max-width: calc(100% - 24px);
	}

	.quick-actions.collapsed {
		padding: 8px 8px 0 0;
		max-width: calc(100% - 24px);
	}

	.quick-action-btn {
		padding: 6px 14px;
		margin-bottom: 8px;
		margin-right: 8px;
		border-radius: 10px;
		font-size: 12px;
	}

	#closeChatBubble {
		/* Position top-right, mirroring the clear history button */
		top: 10px; 
		right: 10px;
		height: 24px;
		width: 24px;
		font-size: 14px;
	}

	.message-timestamp {
		font-size: 0.65rem;
	}

	/* Chat Toggle Button Mobile Styles */
	#chatToggle {
		padding: 16px;
		border-radius: 50%;
		width: 56px;
		height: 56px;
		bottom: 16px;
		right: 16px;
		justify-content: center;
		background: linear-gradient(135deg, #2C7DF7 0%, #2C64D3 100%);
		box-shadow: 0 4px 15px rgba(44, 125, 247, 0.2);
	}

	#chatToggle:hover {
		transform: translateY(-2px);
		box-shadow: 0 6px 20px rgba(44, 125, 247, 0.3);
	}

	#chatToggle span {
		display: none;
	}

	#chatToggle svg {
		display: block;
		width: 24px;
		height: 24px;
		stroke: white;
		stroke-width: 1.5;
		fill: none;
	}

	/* Upgrade Modal Mobile Styles */
	#upgradeModal {
		padding: 1rem;
	}

	#upgradeModal .relative {
		width: 95%;
		margin: 0 auto;
		max-width: none;
	}

	#upgradeModal .bg-black {
		border-radius: 1rem;
	}

	#upgradeModal .flex.flex-col.md\:flex-row {
		flex-direction: column;
		max-width: 100%;
	}

	#upgradeModal .w-fit.md\:w-max {
		width: 100%;
	}

	#upgradeModal .w-fit.md\:w-max img {
		width: 100%;
		height: auto;
		max-height: 200px;
		object-fit: cover;
		object-position: top;
		border-radius: 1rem 1rem 0 0;
	}

	#upgradeModal .flex.flex-col.px-8 {
		padding: 1.25rem;
	}

	#upgradeModal .font-bold.text-3xl {
		font-size: 1.75rem;
		text-align: center;
		line-height: 1.2;
		margin-bottom: 1rem;
	}

	#upgradeModal .text-white.flex.flex-col.gap-6 {
		gap: 1rem;
		text-align: center;
		font-size: 0.95rem;
	}

	#upgradeModal #upgrade-btn {
		margin: 0.5rem auto 0;
		width: 100%;
		max-width: 200px;
		padding: 0.75rem 1rem;
		font-size: 0.95rem;
	}

	#upgradeModal .close-upgrade {
		top: 0.5rem;
		right: 0.5rem;
		background: rgba(255, 255, 255, 0.1);
		width: 28px;
		height: 28px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		font-size: 1.25rem;
		z-index: 10;
	}

    .upload-container {
        flex-direction: column;
        min-height: 180px;
        max-width: 100%;
    }

    .dropzone-content {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .upload-icon-container {
        margin-bottom: 0.5rem;
    }

    .dropzone-text {
        text-align: center;
    }
}

.sidebar-footer {
	padding: 1rem;
	text-align: center;
	font-size: 0.75rem;
	color: #64748b;
	border-top: 1px solid rgba(209, 209, 209, 0.234);
	margin-top: 0;
}

.sidebar-footer #copyright {
	max-width: 100%;
	margin: 0;
}

.sidebar-footer a {
	color: #2c7df7;
	text-decoration: none;
}

.sidebar-footer .fault-link {
	color: rgb(187, 34, 34);
}

@media (max-width: 768px) {
	.sidebar-footer {
		padding: 1.5rem 1rem;
		font-size: 0.7rem;
	}
}

.sidebar-menu-bottom .sidebar-link {
	color: #4a5568;
	font-weight: 500;
	padding: 0.85rem 1rem;
	margin: 0.2rem 0;
	transition: all 0.2s ease;
}

.sidebar-menu-bottom .sidebar-link:hover {
	background: rgba(44, 125, 247, 0.08);
	color: #2c7df7;
	transform: translateX(4px);
}

.sidebar-menu-bottom .sidebar-icon {
	width: 17px;
	height: 17px;
	opacity: 0.9;
}

.sidebar-menu-bottom .sidebar-item:last-child .sidebar-link {
	color: #e53e3e;
}

.sidebar-menu-bottom .sidebar-item:last-child .sidebar-link:hover {
	background: rgba(229, 62, 62, 0.08);
	color: #e53e3e;
}

@media (max-width: 768px) {
	.sidebar-menu-bottom {
		background: linear-gradient(to bottom, rgba(248, 249, 255, 0.8), rgba(255, 255, 255, 0.9));
		padding: 1.25rem 1rem;
	}
	
	.sidebar-menu-bottom .sidebar-link {
		padding: 1rem;
	}
}

.sidebar-menu .sidebar-link {
	color: #4a5568;
	font-weight: 500;
	padding: 0.85rem 1rem;
	margin: 0.2rem 0;
	transition: all 0.2s ease;
}

.sidebar-menu .sidebar-link:hover {
	background: rgba(44, 125, 247, 0.08);
	color: #2c7df7;
	transform: translateX(4px);
}

.sidebar-menu .sidebar-icon {
	width: 17px;
	height: 17px;
	opacity: 0.9;
}

/* Keep existing active state but enhance it */
.sidebar-item.active .sidebar-link {
	background: rgba(44, 125, 247, 0.08);
	color: #2c7df7;
	font-weight: 600;
	transform: translateX(4px);
}

/* Update responsive styles for transcription */
@media (max-width: 1200px) {
	#transcription {
		max-width: 100%;
	}
}

/* Enhance scrollbar styling for transcription text */
#transcription-text::-webkit-scrollbar, #onelive-text::-webkit-scrollbar, #analysis-text::-webkit-scrollbar {
	width: 8px;
}

#transcription-text::-webkit-scrollbar-track, #onelive-text::-webkit-scrollbar-track, #analysis-text::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 10px;
}

#transcription-text::-webkit-scrollbar-thumb, #onelive-text::-webkit-scrollbar-thumb, #analysis-text::-webkit-scrollbar-thumb {
	background: rgba(44, 125, 247, 0.2);
	border-radius: 10px;
	border: 2px solid transparent;
	background-clip: padding-box;
}

#transcription-text::-webkit-scrollbar-thumb:hover, #onelive-text::-webkit-scrollbar-thumb:hover, #analysis-text::-webkit-scrollbar-thumb:hover {
	background: rgba(44, 125, 247, 0.3);
	border: 2px solid transparent;
	background-clip: padding-box;
}

@keyframes pulse {
	0% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
	100% {
		opacity: 1;
	}
}

.record-btn {
	position: relative;
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	will-change: transform, opacity;
}

.record-btn.bounce-out {
	animation: bounceOut 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.record-btn.bounce-in {
	animation: bounceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounceOut {
	0% {
		transform: scale(1) translate(0, 0);
		opacity: 1;
	}
	25% {
		transform: scale(0.95) translate(0, 0);
		opacity: 0.9;
	}
	50% {
		transform: scale(0.5) translate(0, 20px);
		opacity: 0.5;
	}
	100% {
		transform: scale(0) translate(0, 40px);
		opacity: 0;
	}
}

@keyframes bounceIn {
	0% {
		transform: scale(0) translateY(30px);
	}
	70% {
		transform: scale(1.1);
	}
	100% {
		transform: scale(1);
	}
}

.record-btn.bottom-left {
	position: fixed;
	bottom: 20px;
	left: 220px; /* Account for sidebar width */
	margin: 0;
	z-index: 50;
	transition: left 0.3s ease;
}

body.sidebar-collapsed .record-btn.bottom-left {
	left: 80px; /* Account for collapsed sidebar width */
}

@media (max-width: 768px) {
	.record-btn.bottom-left {
		left: 20px; /* Adjust for mobile view */
	}
}

.record-btn-content {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	transition: opacity 0.3s ease;
}

.loading-spinner:not(.hidden) + .record-btn-content svg {
	opacity: 0;
}

.loading-spinner {
	width: 18px;
	height: 18px;
	margin: 0 auto;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top: 2px solid #fff;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	display: inline-block;
	vertical-align: middle;
	line-height: normal;
}

.record-loading-container {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: none;
	align-items: center;
	border-radius: 50%;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.record-loading-container:not(.hidden) {
	display: flex;
	opacity: 1;
}

.record-loading-container:not(.hidden) + .record-btn-content svg {
	opacity: 0;
}

.record-btn.loading .record-loading-container {
	display: flex;
}

.spinner {
	width: 28px;
	height: 28px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top: 2px solid #fff;
	animation: spin 1s ease-in-out infinite;
	display: inline-block;
}

.black {
	border: 3px solid rgba(0, 0, 0, 0.1);
	border-top: 2px solid #000;
}

/* Black spinner specifically for Format & Save button */
#format-live-panel-button .spinner {
	border: 3px solid rgba(0, 0, 0, 0.1);
	border-top: 2px solid #000;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

#save-format-btn,
#format-live-panel-button {
	transition: all 0.3s ease;
}

#save-format-btn > div,
#format-live-panel-button > div {
	transition: opacity 0.3s ease;
}

#save-format-btn:disabled,
#format-live-panel-button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.record-btn.loading svg {
	opacity: 0;
}

.record-btn.loading .loading-spinner {
	display: flex;
}

.record-btn.recording {
	animation: recording-pulse 1.5s infinite;
	background: linear-gradient(45deg, #ef4444, #dc2626);
}

.record-btn.recording svg {
	background: white;
	border-radius: 4px;
	padding: 1px;
	width: 20px;
	height: 20px;
}

@keyframes recording-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
	}
}

.submit.show {
	opacity: 1;
	transform: scale(1);
	display: flex;
}

#onelive-footer {
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 5;
}

#onelive-footer.bottom-left {
	position: fixed;
	bottom: -50px;
	left: 220px; /* Account for sidebar width */
	margin: 0;
	z-index: 5;
}

#onelive-footer .buttons {
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
}

#onelive-footer .flex.items-center.gap-4 {
	width: auto;
	margin: 0;
}

@keyframes bounceOut {
	0% {
		transform: scale(1) translate(0, 0);
		opacity: 1;
	}
	25% {
		transform: scale(0.95) translate(0, 0);
		opacity: 0.9;
	}
	50% {
		transform: scale(0.5) translate(0, 20px);
		opacity: 0.5;
	}
	100% {
		transform: scale(0) translate(0, 40px);
		opacity: 0;
	}
}

@keyframes bounceIn {
	0% {
		transform: scale(0) translateY(30px);
	}
	70% {
		transform: scale(1.1);
	}
	100% {
		transform: scale(1);
	}
}

#onelive-footer .buttons {
	display: flex;
	align-items: center;
	gap: 15px;
	transition: all 0.3s;
}

@media (max-width: 768px) {
	.onelive-control-section {
		margin-left: 4rem;
	}
	
	.onelive-control-buttons {
		gap: 8px;
	}
}

@keyframes chat-pulse {
	0% {
		transform: scale(0.98);
		box-shadow: 0 0 0 0 rgba(44, 125, 247, 0.3);
	}
	70% {
		transform: scale(1);
		box-shadow: 0 0 0 10px rgba(44, 125, 247, 0);
	}
	100% {
		transform: scale(0.98);
		box-shadow: 0 0 0 0 rgba(44, 125, 247, 0);
	}
}

/* Notification Styles */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(100%);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes slideOut {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(100%);
	}
}

.notification {
	position: fixed;
	font-size: 14px;
	top: 20px;
	right: 20px;
	z-index: 50;
	padding: 16px 20px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transform-origin: right;
	opacity: 0;
	transform: translateX(100%);
}

.notification.show {
	animation: slideIn 0.3s ease-out forwards;
}

.notification.hide {
	animation: slideOut 0.3s ease-in forwards;
}

.notification.hidden {
	display: none;
}

.notification.success {
	background-color: #2e7d32 !important;
	color: white !important;
}

.notification.error {
	background-color: #c62828;
	color: white;
}

.notification::before {
	content: "";
	width: 20px;
	height: 20px;
	background-size: contain;
	background-repeat: no-repeat;
}

.notification.success::before {
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>');
}

.notification.error::before {
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>');
	fill: white !important;
}

/* Loading States */
.loading-skeleton {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: loading 1.5s infinite !important;
}

.loading-placeholder {
	animation: loadingPulse 1.5s ease-in-out infinite;
	background-color: #f3f4f6;
	border-radius: 0.375rem;
	border: none !important;
	box-shadow: none !important;
}

.loaded {
	animation: none;
}

/* Loading Sequence Styles */
.loading-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 2rem;
	width: 100%;
	height: 100%;
}

.progress-bar-container {
	width: 80%;
	max-width: 300px;
	height: 4px;
	background-color: #e0e0e0;
	border-radius: 2px;
	overflow: hidden;
}

.progress-bar {
	width: 0%;
	height: 100%;
	background: linear-gradient(90deg, #007bff, #e605ff);
	background-size: 200% 100%;
	border-radius: 2px;
	animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
	0% {
		width: 0%;
		margin-left: 0;
		background-position: 0% 50%;
	}
	50% {
		width: 70%;
		background-position: 50% 50%;
	}
	100% {
		width: 0%;
		margin-left: 100%;
		background-position: 0% 50%;
	}
}

.loading-text {
	font-size: 14px;
	color: #007bff;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
}

.loading-text.fade-in {
	opacity: 1;
}

.loading-text.fade-out {
	opacity: 0;
}

.error-container {
	text-align: center;
	color: #d9534f;
	font-size: 14px;
}

/* Hide content while loading */
.content-hidden {
	display: none;
	opacity: 0;
}

.content-visible {
	display: flex !important;
	flex-direction: column;
	opacity: 0;
	animation: fadeInContent 0.8s ease-out forwards;
}

@keyframes fadeInContent {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.onescribe-format-icon {
	align-items: center;
	justify-content: center;
	margin-top: 1rem;
	gap: 10px;
	padding: 10px;
	max-height: 40px;
	max-width: 40px;
	font-size: 1rem;
	background-color: white;
	box-shadow: 2px 2px 80px rgba(200, 23, 55, 0.2);
	border: none;
	border-radius: 25px;
	cursor: pointer;
	transition: all 0.3s ease !important;
}

.onescribe-format-icon svg {
	width: 20px;
	height: 20px;
	stroke: #007bff;
	stroke-width: 2;
	transition: all 0.3s ease;
}

.onescribe-format-icon:hover {
	transform: scale(0.9) !important;
	color: #007bff;
	background-color: #fff;
}

.onescribe-format-icon:hover svg {
	stroke: white;
}

/* Style for the format icon in the panel */
#onescribe-format-icon.action-group:hover svg {
	stroke: #007bff;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading .loading-content {
    display: block;
}

.loading .real-content {
    display: none;
}

.loading-content {
    display: none;
}

.real-content {
    display: block;
}

.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    width: 100%;
}

.loading-line {
    height: 20px;
    width: 100%;
    margin-bottom: 10px;
}

.loading-line:nth-child(odd) {
    width: 100%;
}

.loading-line:nth-child(even) {
    width: 92%;
}

.loading-date {
    width: 120px;
    height: 16px;
}

.loading-title {
    width: 400px;
    height: 16px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .loading-title {
        width: 80%;
    }
}

/* Transcript Action Buttons - High Specificity */
body #transcription #saveTranscription {
    background: #2c7df7;
    animation: chat-pulse 2s infinite;
}

body #transcription #saveTranscription:hover:not(:disabled) {
    background: #1d64d8;
    transform: scale(0.98);
}

body #transcription #saveTranscription:disabled {
    background: #94a3b8;
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
    transform: none;
}

body #transcription #cancelTranscription {
    background: #dc2626;
}

body #transcription #cancelTranscription:hover {
    background: #b91c1c;
    transform: scale(0.98);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 600px;
    margin: 4px 0;
    max-height: calc(1.4rem * 2 + 6px);
    user-select: none;
    pointer-events: auto;
    margin-top: 0 !important;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
	margin-bottom: 5px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.4;
    white-space: nowrap;
    cursor: default;
    pointer-events: auto;
    user-select: none;
}

.tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .tags-container {
        max-width: 100%;
        gap: 4px;
    }
    
    .tag {
        font-size: 12px;
        padding: 3px 15px;
    }
    
    #transcriptTitle {
        max-width: 60%;
    }
}

.view-transcript-container {
    gap: 0;
}

.speaker + br {
    display: initial;
}

.copy-button-blue {
    background-color: #2563eb;
    color: white;
    transition: all 0.2s ease;
}

.copy-button-blue:hover {
    background-color: #1d4ed8;
}

.copy-button-green {
    background-color: #16a34a;
    color: white;
    transition: all 0.2s ease;
}

.copy-button-green:hover {
    background-color: #15803d;
}

/* Analysis Options Styles */
.analysis-option-label {
    cursor: pointer;
    user-select: none;
}

.analysis-option-card {
    width: 220px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(0, 123, 255, 0.1);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.analysis-option-label:hover .analysis-option-card {
    border-color: rgba(0, 123, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.analysis-option-label input:checked + .analysis-option-card {
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
}

.check-mark {
    position: absolute;
    bottom: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.check-mark svg {
    color: white;
    stroke-width: 3;
}

.analysis-option-label input:checked + .analysis-option-card .check-mark {
    opacity: 1;
    transform: scale(1);
}

/* Tooltip Styles */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    right: 0;
    bottom: calc(100% + 5px); /* Position above the container */
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    width: 200px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: -4px; /* Position arrow at the bottom */
    right: 8px;
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(45deg); /* Keep rotation for diamond shape, positioning handles direction */
}

.tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.tooltip-container svg {
    background-color: #f3f4f6;
    border-radius: 50%;
    padding: 4px;
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.tooltip-container svg:hover {
    background-color: #e5e7eb;
    transform: scale(1.1);
}

.speaker-edit-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%; /* Default to viewport center */
    transform: translate(-50%, -50%) scale(0.95);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(44, 100, 211, 0.15);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Adjust position based on sidebar state (Desktop ONLY) */
@media (min-width: 769px) {
    body:not(.sidebar-collapsed) .speaker-edit-popup {
        left: calc(50% + 100px); /* 200px / 2 */
    }

    body.sidebar-collapsed .speaker-edit-popup {
        left: calc(50% + 30px); /* 60px / 2 */
    }
}

@media (max-width: 768px) {
    .speaker-edit-popup {
        /* left: 50%; <-- Remove this, it's the default */
		left: 50% !important;
        max-width: 320px;
        width: 85%;
        padding: 1.5rem;
    }
    
    .speaker-edit-popup h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    .speaker-edit-popup p {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }
    
    .speaker-edit-popup input {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }
    
    .speaker-edit-popup .buttons {
        gap: 0.8rem;
    }
    
    .speaker-edit-popup button {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .speaker-edit-popup {
        max-width: 280px;
        width: 90%;
        padding: 1.25rem;
    }
    
    .speaker-edit-popup h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .speaker-edit-popup p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .speaker-edit-popup input {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        margin-bottom: 0.7rem;
    }
    
    .speaker-edit-popup .buttons {
        gap: 0.6rem;
    }
    
    .speaker-edit-popup button {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

.speaker-edit-popup.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: popupFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.speaker-edit-popup.closing {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    animation: popupFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes popupFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

.speaker-edit-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.speaker-edit-overlay.active {
    display: block;
    opacity: 1;
}

/* Styling for primary and translated content display */
.paragraph-pair {
  margin-bottom: 0;
}

.primary-content {
  color: #888888;
  font-size: 14px;
  margin-bottom: 0;
  padding-bottom: 0;
  opacity: 0.95;
  user-select: text;
  cursor: text;
  -webkit-user-select: text;
  display: block;
}

.translated-content {
  color: #333333;
  font-size: 15px;
  margin-top: 0;
  padding-top: 0;
  display: block;
}

/* Preserve speaker span styling within both content types */
.primary-content span.speaker {
  font-weight: 600;
  color: inherit;
  pointer-events: none;
}

.translated-content span.speaker {
  font-weight: 600;
  color: #2c64d3;
  pointer-events: all;
}


/* Ensure that non-editable primary content is still selectable */
[contenteditable="false"] {
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

/* Toggle switch for show/hide original content */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 0;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.toggle-container .toggle-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-container .toggle-label svg {
  width: 16px;
  height: 16px;
  stroke: #2563eb;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e0e0e0;
  transition: .4s;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #2563eb;
}

input:focus + .toggle-slider {
  box-shadow: 0 0 1px #2563eb;
}

input:checked + .toggle-slider:before {
  transform: translateX(16px);
}

/* When original content is hidden */
.hide-primary-content .primary-content {
  display: none;
}

.hide-primary-content .paragraph-pair {
  margin: 0;
  padding: 0;
}

/* Animate the transition */
.primary-content {
  transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease;
}

/* Language Selection Dropdown Styles */
.language-selection-container {
    transition: all 0.3s ease;
    width: 100%; /* Ensure it takes full width for centering */
    max-width: 220px; /* Match analysis card width */
    margin: 1rem auto 0; /* Center the container, add top margin */
}

#translate-label span {
    z-index: -999 !important;
}

.translate-trigger {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0; /* Keep padding */
    display: flex; /* Use flex */
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    width: 100%; /* Make trigger take full width of its container */
    border-bottom: 1px solid transparent; /* Prepare for hover underline */
	gap: 0.5rem;
}

.translate-trigger:hover {
    /* background-color: rgba(59, 130, 246, 0.05); Optional background hover */
    border-bottom-color: rgba(59, 130, 246, 0.3); /* Subtle underline on hover */
}

.translate-trigger:hover svg:first-of-type { /* Target globe icon */
    transform: scale(1.1); /* Simple scale hover for icon */
}

.translate-trigger.active #translate-arrow {
    transform: rotate(180deg);
}

.language-dropdown-wrapper {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.25s ease-out, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), max-height 0.3s ease-out;
    will-change: opacity, transform, max-height;
    width: 100%; /* Take full width of parent */
    max-height: 0;
    overflow: hidden;
    transform-origin: top center; /* Set origin for scale */
}

.language-dropdown-wrapper:not(.xhidden) {
    opacity: 1;
    transform: translateY(0) scale(1); /* Target state */
    max-height: 200px; /* Allow space for dropdown */
}

.language-dropdown {
    /* ... existing styles ... */
    text-align: center; /* Center text in dropdown */
}



/* Custom styling for markdown content within AI chat messages */
.message.ai-message .message-content ul,
.message.ai-message .message-content ol {
  list-style: revert; /* Use browser default list style (disc/decimal) */
  padding-left: 1.5em;  /* Indentation for bullets/numbers */
  margin-top: -1.5rem;  /* Minimal space before list */
  margin-bottom: -1.5rem;/* Minimal space after list */
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.2;
}

.message.ai-message .message-content li {
  margin-top: -0.3rem;    /* Remove space between list items */
  margin-bottom: -0.3rem;
  padding-left: 0.2em; /* Small padding for marker */
  line-height: 1.4;
}

/* Apply minimal margin to paragraphs INSIDE list items */
.message.ai-message .message-content li p {
  margin-top: 0;
  margin-bottom: 0;
}

/* Apply minimal margin to paragraphs OUTSIDE list items */
.message.ai-message .message-content > p { /* Target direct children paragraphs */
  margin-top: 0;
  margin-bottom: 0;
}

/* Remove extra margin potentially added below the last element in a list item */
.message.ai-message .message-content li > *:last-child {
    margin-bottom: 0;
}

/* Remove extra margin potentially added above the first element in a list item */
.message.ai-message .message-content li > *:first-child {
    margin-top: 0;
}

/* Tighter spacing for nested lists */
.message.ai-message .message-content ul ul,
.message.ai-message .message-content ol ol,
.message.ai-message .message-content ul ol,
.message.ai-message .message-content ol ul {
  margin-top: 0em;
  margin-bottom: 0em;
  padding-left: 1.2em; /* Slightly less padding for nested */
}

/* ... existing code ... */

/* New Footer Container */
.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px 4px 8px; /* Add some padding */
    margin-top: 4px; /* Optional space above footer */
}

/* AI Timestamp Styles - reset most things */
.ai-message .message-timestamp {
    color: rgba(26, 26, 26, 0.6);
    font-size: 0.7rem;
    /* Remove any alignment/positioning here */
}

/* User Timestamp Styles - keep right aligned */
.user-message .message-timestamp {
    text-align: right; /* Keep this for user messages */
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
}

/* Ensure Copy Icon is simple */
.copy-icon {
    display: inline-flex; 
    align-items: center; 
    width: 16px; 
    height: 16px; 
    cursor: pointer;
    opacity: 0.5; 
    transition: opacity 0.2s ease, transform 0.2s ease;
    /* No margin needed */
}

.copy-icon:hover {
    opacity: 1;
    transform: scale(1.1); 
}

/* Remove .copied rule as feedback is now icon change */
/* .copy-icon.copied {
	 Style for feedback after copying 
	opacity: 1;
	filter: invert(59%) sepia(78%) saturate(4191%) hue-rotate(91deg) brightness(98%) contrast(106%);  Green tint 
    transform: scale(1.1);
	 animation: copiedAnimation 0.3s ease-out forwards; Remove animation if not defined 
} */

/* ... rest of the styles ... */

.speaker-edit-popup h3 {
    color: #2c64d3;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.speaker-edit-popup p {
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.speaker-edit-popup input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid rgba(44, 100, 211, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.speaker-edit-popup input:focus {
    outline: none;
    border-color: #2c64d3;
    box-shadow: 0 0 0 4px rgba(44, 100, 211, 0.1);
}

.speaker-edit-popup .buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.speaker-edit-popup button {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.speaker-edit-popup .save-btn {
    background: #2c64d3;
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(44, 100, 211, 0.15); /* Subtle shadow */
}

.speaker-edit-popup .save-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(44, 100, 211, 0.2);
}

.speaker-edit-popup .cancel-btn {
    background: #f1f5f9;
    color: #64748b;
    border: none;
}

.speaker-edit-popup .cancel-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.speaker-edit-popup .save-btn.loading {
    position: relative;
    color: transparent;
}

.speaker-edit-popup .save-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Special handling for mobile device detection (not just screen size) */
.speaker-edit-popup.mobile {
    /* More space for virtual keyboard */
    top: 40%;
    max-width: 300px; /* Slightly smaller max-width */
    background: rgba(255, 255, 255, 0.98);
}

.speaker-edit-popup.mobile h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.speaker-edit-popup.mobile p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.speaker-edit-popup.mobile input {
    /* Larger touch target for mobile keyboards */
    font-size: 16px; /* Prevents iOS zoom */
    padding: 0.75rem 0.9rem;
    border-width: 1px; /* Thinner border for sleeker look */
    margin-bottom: 0.9rem;
}

.speaker-edit-popup.mobile .buttons {
    gap: 0.7rem; /* Slight adjustment to button spacing */
}

.speaker-edit-popup.mobile button {
    /* More sleek appearance while maintaining touch-friendliness */
    min-width: 80px; /* Further reduced for sleeker look */
    min-height: 38px; /* Still touch-friendly */
    padding: 0.6rem 1.1rem; /* Slightly reduced padding */
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01rem;
}

.speaker-edit-popup.mobile.active {
    /* Custom animation timing for mobile */
    animation-duration: 0.25s;
}

/* Styles for small portrait phones */
@media (max-height: 568px) {
    .speaker-edit-popup, 
    .speaker-edit-popup.mobile {
        top: 35%;
        padding: 1rem;
    }
    
    .speaker-edit-popup h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .speaker-edit-popup p {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
}

/* Original styling continues below */

/* ... existing code ... */

/* Delete Modal specific styling to ensure proper positioning */
#delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#delete-modal.flex {
    display: flex;
    opacity: 1;
}

#delete-modal .bg-white {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Ensure modal is centered properly and takes appropriate width */
@media (min-width: 768px) {
    #delete-modal .max-w-md {
        width: 100%;
        max-width: 28rem;
    }
}

@media (max-width: 768px) {
    #delete-modal .max-w-md {
        width: 90%;
        margin: 0 auto;
    }
}

/* ... existing code ... */
