/* ==========================================================================
   SQUEAK DESIGN TOKENS & WARM BROWN / WHITE THEME
   ========================================================================== */
:root {
    --squeak-primary: #5c3d2e;
    --squeak-primary-hover: #462e22;
    --squeak-cream-bg: #faf7f2;
    --squeak-accent-soft: #efe8e0;
    --squeak-card-bg: #ffffff;
    --squeak-border: #e2d8ce;
    --squeak-text-dark: #2c1d16;
    --squeak-text-muted: #7a6356;
    --squeak-like: #c0392b;
    --squeak-resqueak: #2e7d32;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--squeak-cream-bg);
    color: var(--squeak-text-dark);
    overflow-x: hidden;
}

/* ==========================================================================
   TOP MULTI-PAGE PREVIEW SWITCHER BAR
   ========================================================================== */
.preview-switcher-bar {
    background-color: #2c1d16;
    color: #faf7f2;
    border-bottom: 1px solid #462e22;
    z-index: 1050;
}

.preview-tab-btn {
    color: #d6c7bc;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.32rem 0.85rem;
    transition: all 0.18s ease;
}

.preview-tab-btn:hover {
    background-color: rgba(239, 232, 224, 0.14);
    color: #ffffff;
}

.preview-tab-btn.active {
    background-color: var(--squeak-primary);
    border-color: #8c624d;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   SHARED BRAND & COMPONENT STYLES
   ========================================================================== */
.bg-squeak-card {
    background-color: var(--squeak-card-bg) !important;
}

.bg-squeak-cream {
    background-color: var(--squeak-cream-bg) !important;
}

.bg-squeak-soft {
    background-color: var(--squeak-accent-soft) !important;
}

.border-squeak {
    border-color: var(--squeak-border) !important;
}

.text-squeak-primary {
    color: var(--squeak-primary) !important;
}

.text-squeak-muted {
    color: var(--squeak-text-muted) !important;
}

/* Primary Brown Button */
.btn-squeak {
    background-color: var(--squeak-primary);
    color: #ffffff;
    border: 1px solid var(--squeak-primary);
    border-radius: 50rem;
    font-weight: 600;
    transition: all 0.18s ease-in-out;
}

.btn-squeak:hover, .btn-squeak:focus {
    background-color: var(--squeak-primary-hover);
    border-color: var(--squeak-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(92, 61, 46, 0.22);
}

.btn-squeak:disabled {
    background-color: #cbbba9;
    border-color: #cbbba9;
    color: #ffffff;
    transform: none;
    box-shadow: none;
}

/* Outline Brown Button */
.btn-outline-squeak {
    color: var(--squeak-primary);
    border: 1.5px solid var(--squeak-primary);
    background-color: transparent;
    border-radius: 50rem;
    font-weight: 600;
    transition: all 0.18s ease;
}

.btn-outline-squeak:hover {
    background-color: var(--squeak-accent-soft);
    color: var(--squeak-primary-hover);
    border-color: var(--squeak-primary-hover);
}

/* Left Sidebar Nav Links */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.72rem 1.15rem;
    border-radius: 50rem;
    color: var(--squeak-text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.sidebar-nav-item:hover {
    background-color: var(--squeak-accent-soft);
    color: var(--squeak-primary);
}

.sidebar-nav-item.active {
    background-color: var(--squeak-accent-soft);
    color: var(--squeak-primary);
    font-weight: 700;
}

/* Feed & Profile Tabs */
.squeak-tab {
    cursor: pointer;
    padding: 0.9rem 0.5rem;
    font-weight: 600;
    color: var(--squeak-text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.15s ease;
    user-select: none;
}

.squeak-tab:hover {
    background-color: var(--squeak-accent-soft);
    color: var(--squeak-primary);
}

.squeak-tab.active {
    color: var(--squeak-primary);
    border-bottom-color: var(--squeak-primary);
    font-weight: 700;
}

/* Avatars */
.avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5c3d2e, #875d48);
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.avatar-circle-alt {
    background: linear-gradient(135deg, #efe8e0, #dccbc0);
    color: var(--squeak-primary);
    border: 1px solid var(--squeak-border);
}

/* Post Card Hover & Action Buttons */
.squeak-post-card {
    transition: background-color 0.15s ease;
}

.squeak-post-card:hover {
    background-color: #fdfbf9;
}

.post-action-btn {
    border: none;
    background: transparent;
    color: var(--squeak-text-muted);
    padding: 0.35rem 0.7rem;
    border-radius: 50rem;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    transition: all 0.15s ease;
}

.post-action-btn:hover {
    background-color: var(--squeak-accent-soft);
    color: var(--squeak-primary);
}

.post-action-btn.liked {
    color: var(--squeak-like);
    font-weight: 600;
}

.post-action-btn.liked:hover {
    background-color: rgba(192, 57, 43, 0.1);
}

.post-action-btn.resqueaked {
    color: var(--squeak-resqueak);
    font-weight: 600;
}

.post-action-btn.resqueaked:hover {
    background-color: rgba(46, 125, 50, 0.1);
}

/* Profile Cover & Overlapping Avatar */
.profile-cover-banner {
    height: 175px;
    background: linear-gradient(135deg, #5c3d2e 0%, #7d5541 48%, #462e22 100%);
    position: relative;
    overflow: hidden;
}

.profile-cover-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: radial-gradient(#ffffff 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}

.profile-avatar-lg {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5c3d2e, #8a5f49);
    color: #ffffff;
    font-size: 2.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #ffffff;
    margin-top: -54px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(44, 29, 22, 0.15);
}

/* Form Inputs */
.form-control-squeak {
    border: 1.5px solid var(--squeak-border);
    border-radius: 0.75rem;
    padding: 0.68rem 0.95rem;
    background-color: #ffffff;
    color: var(--squeak-text-dark);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-squeak:focus {
    border-color: var(--squeak-primary);
    box-shadow: 0 0 0 0.22rem rgba(92, 61, 46, 0.15);
}

.composer-textarea {
    border: none;
    resize: none;
    font-size: 1.1rem;
    color: var(--squeak-text-dark);
    background: transparent;
}

.composer-textarea:focus {
    outline: none;
    box-shadow: none;
}

/* Auth Pages Centered Card */
.auth-wrapper {
    min-height: calc(100vh - 54px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background-color: var(--squeak-card-bg);
    border: 1px solid var(--squeak-border);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px rgba(92, 61, 46, 0.08);
}

/* Sticky Sidebars on Desktop */
@media (min-width: 768px) {
    .sticky-sidebar-col {
        position: sticky;
        top: 52px;
        height: calc(100vh - 52px);
        overflow-y: auto;
    }
}

/* Mobile Bottom Padding so Mobile Nav doesn't cover content */
@media (max-width: 767.98px) {
    .app-shell-container {
        padding-bottom: 68px;
    }
}

/* ==========================================================================
   ADDITIONS FOR THE LIVE (API-BACKED) VERSION
   ========================================================================== */
/* Keep the line breaks people type into a squeak */
.squeak-content { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.48; }

/* Names, @mentions and #tags are clickable */
.squeak-link { cursor: pointer; }
.squeak-link:hover { text-decoration: underline; }

/* Full-screen loader shown while we check whether you're logged in */
.boot-loader { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
