/* VoiceFlow - Core Styling (Standalone Tailwind-like Utilities) */

/* 1. Base Reset */
*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body {
    margin: 0;
    line-height: inherit;
    background-color: #f8fafc; /* bg-slate-50 */
    color: #0f172a; /* text-slate-900 */
    min-height: 100vh;
}

/* 2. Utility Framework */

/* Display & Flex */
.flex { display: flex; }
.btn-ghost { background: transparent !important; border: none !important; padding: 0 !important; box-shadow: none !important; outline: none !important; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.self-end { align-self: flex-end; }
.shrink-0 { flex-shrink: 0; }
.hidden { display: none; }
.block { display: block; }
.whitespace-nowrap { white-space: nowrap; }

/* Spacing (Gap, Padding, Margin) */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.p-1 { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.m-1 { margin: 0.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.m-0 { margin: 0; }

/* Sizing */
.w-full { width: 100%; }
.w-fit { width: fit-content; }
.w-3 { width: 0.75rem; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-px { width: 1px; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-64 { height: 16rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-sm { max-width: 24rem; }
.min-h-screen { min-height: 100vh; }
.resize-y { resize: vertical; }

/* Colors - Backgrounds */
.bg-white { background-color: #ffffff; }
.bg-transparent { background-color: transparent; }
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9); }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-50\/50 { background-color: rgba(248, 250, 252, 0.5); }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-900\/40 { background-color: rgba(15, 23, 42, 0.4); }
.bg-indigo-50 { background-color: #eef2ff; }
.bg-indigo-50\/50 { background-color: rgba(238, 242, 255, 0.5); }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-500 { background-color: #10b981; }
.bg-rose-50 { background-color: #fff1f2; }
.bg-green-500 { background-color: #22c55e; }
.bg-red-50 { background-color: #fef2f2; }

/* Colors - Text */
.text-white { color: #ffffff; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-500 { color: #6366f1; }
.text-emerald-400 { color: #34d399; }
.text-emerald-600 { color: #059669; }
.text-rose-500 { color: #f43f5e; }
.text-rose-600 { color: #e11d48; }
.text-red-500 { color: #ef4444; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-\[10px\] { font-size: 10px; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-medium { font-weight: 500; }
.font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.underline { text-decoration: underline; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leading-relaxed { line-height: 1.625; }

/* Borders & Radius */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-dashed { border-style: dashed; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-indigo-100 { border-color: #e0e7ff; }
.border-indigo-400 { border-color: #818cf8; }
.border-rose-100 { border-color: #ffe4e6; }
.border-emerald-200 { border-color: #a7f3d0; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-bl-2xl { border-bottom-left-radius: 1rem; }
.rounded-tr-3xl { border-top-right-radius: 1.5rem; }

/* Peer State (Custom) */
.peer:checked ~ .peer-checked\:border-indigo-600 { border-color: #4f46e5; }
.peer:checked ~ .peer-checked\:bg-indigo-50 { background-color: #eef2ff; }

/* Layout Effects */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-16 { top: 4rem; }
.bottom-4 { bottom: 1rem; }
.right-4 { right: 1rem; }
.z-50 { z-index: 50; }
.z-\[100\] { z-index: 100; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.shadow-indigo-200 { box-shadow: 0 4px 6px -1px rgba(129, 140, 248, 0.4); }

/* Transitions & Interactivity */
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }

.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:bg-indigo-50:hover { background-color: #eef2ff; }
.hover\:bg-indigo-100:hover { background-color: #e0e7ff; }
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9; }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:text-indigo-600:hover { color: #4f46e5; }
.hover\:text-slate-600:hover { color: #475569; }
.hover\:border-indigo-200:hover { border-color: #c7d2fe; }
.hover\:border-indigo-300:hover { border-color: #a5b4fc; }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }

.focus\:ring-4:focus { box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }
.focus\:ring-indigo-100:focus { --ring-color: rgba(79, 70, 229, 0.1); }
.focus\:border-indigo-500:focus { border-color: #6366f1; }
.focus\:ring-0:focus { box-shadow: none; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }

.active\:scale-\[0\.99\]:active { transform: scale(0.99); }
.active\:scale-\[0\.98\]:active { transform: scale(0.98); }
.active\:scale-95:active { transform: scale(0.95); }
.active\:bg-indigo-100:active { background-color: #e0e7ff; }
.active\:bg-indigo-800:active { background-color: #3730a3; }

.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }

.group:hover .group-hover\:opacity-100 { opacity: 1; }

/* 3. Custom Project Styles (Original Styles) */
.tab-active {
    background-color: #4f46e5 !important;
    color: white !important;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.tab-inactive {
    color: #64748b !important;
}

[contenteditable="true"] {
    transition: all 0.2s;
    border: 1px solid transparent;
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
    -webkit-user-modify: read-write-plaintext-only;
}

[contenteditable="true"]:hover {
    background-color: #f8fafc;
    cursor: text;
}

[contenteditable="true"]:focus {
    background-color: white;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    outline: none;
}

.tab-inactive:hover {
    background-color: #f1f5f9 !important;
}

.progress-bar-fill {
    height: 100%;
    background-color: #4f46e5;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.speaker-1 {
    background-color: white;
    border-left: 4px solid #4f46e5;
    padding: 1rem;
    border-radius: 0 1rem 1rem 0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.speaker-2 {
    background-color: #f8fafc;
    border-left: 4px solid #10b981;
    padding: 1rem;
    border-radius: 0 1rem 1rem 0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Animations */
@keyframes warning-pulse {
    0% { transform: scale(1.1); }
    50% { transform: scale(1.2); color: #be123c; }
    100% { transform: scale(1.1); }
}
.warning-pulse {
    animation: warning-pulse 0.6s infinite ease-in-out;
}

/* Form resets */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
    background: #e2e8f0;
    height: 0.375rem;
    border-radius: 0.5rem;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -6px;
    background-color: #4f46e5;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
}

/* Grid helper */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row; }
    .lg\:items-center { align-items: center; }
}

/* Custom Added for Footer and Modal */
.z-\[200\] { z-index: 200; }
.gap-2\.5 { gap: 0.625rem; }
.bg-slate-900\/50 { background-color: rgb(15 23 42 / 0.5); }
.bg-white\/60 { background-color: rgb(255 255 255 / 0.6); }
.text-\[10px\] { font-size: 10px; line-height: 14px; }
.scale-\[0\.98\] { transform: scale(0.98); }
.active\:scale-\[0\.98\]:active { transform: scale(0.98); }
