/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure Tailwind styles take precedence */
@layer base, components, utilities;

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #93c5fd;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.5;
    font-size: 16px;
    color: #1f2937;
    background-color: #f9fafb;
}

/* Tailwind overrides for dialog */
dialog {
    border: none;
    max-width: 500px;
    width: 90vw;
    z-index: 1000;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Main app layout */
html,
body {
    height: 100%;
    overflow: hidden;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#main-content {
    flex: 1;
    overflow: hidden;
}

/* Conversation Page Tabs */
.conversation-tabs [data-tab-active="true"] {
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
}

.conversation-view-transition {
    transition: opacity 300ms ease-in-out;
}

/* Sticky tabs enhancements */
[data-tab-container] {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}

[data-tab-container].sticky {
    background-color: rgba(255, 255, 255, 0.95);
}

/* Status badges */
.status-planning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-coding {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-active {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-cloned {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #f3f4f6;
    color: #374151;
}

header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: none;
    color: #4b5563;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

main {
    flex: 1;
}

/* Form elements */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    background-color: white;
    color: #1f2937;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Utility classes still needed */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* Link button style */
.link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
}

.link-btn:hover {
    color: var(--primary-dark);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.divider span {
    background-color: white;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Ensure proper scrolling for commit list */
commit-list {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

[data-commits-container] {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}