/* zoom-unified.css — Unified Zoom Styles
   (Refined Layout: Wider Left Panel + Background + Max Image + 4px Arrows)
*/

/* Base Variables */
:root {
    --zoom-bg: #000;
    --zoom-panel-bg: #121212;
    --zoom-border: #2a2a2a;
    --stroon-radius-md: 14px 0 14px 0;
    --panel-radius: var(--stroon-radius-md, 14px);
    --btn-panel-radius: 14px 0 14px 0;
    --btn-small-radius: 6px 0 6px 0;

    /* Scaling Variables (~15% bigger + Full Screen) */
    --font-base: 15px;
    --font-small: 13px;
    --font-heading: 18px;
    --pad-panel: 14px;
    /* Reduced vertical padding inside panels per request ("smaller in height") */
}

#ai-zoom-unified {
    position: fixed;
    inset: 0;
    z-index: 2147483647 !important;
    background: var(--zoom-bg) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ddd;
    font-family: Inter, system-ui, sans-serif;
    overflow: hidden;
    font-size: var(--font-base);
}

/* -------------------------------------------------------------
   SURGICAL HIDING (Non-destructive)
   ------------------------------------------------------------- */
body.st-zoom-active,
html.st-zoom-active {
    overflow: hidden !important;
    height: 100vh !important;
}

body.st-zoom-active .gecko-sidebar,
body.st-zoom-active #gecko-sidebar,
body.st-zoom-active .gecko-side-right,
body.st-zoom-active .peepso-sidebar,
body.st-zoom-active #peepso-sidebar,
body.st-zoom-active .st-left,
body.st-zoom-active .st-fold,
body.st-zoom-active [class*="sidebar"]:not(#ai-zoom-unified),
body.st-zoom-active [id*="sidebar"]:not(#ai-zoom-unified) {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Remove blue selection highlights and focus rings */
body.st-zoom-active ::selection {
    background: transparent !important;
    color: inherit !important;
}

body.st-zoom-active {
    -webkit-tap-highlight-color: transparent !important;
}

body.st-zoom-active *:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* -------------------------------------------------------------
   FULL HEIGHT IMAGE
   ------------------------------------------------------------- */
#ai-zoom-unified .m-main .img {
    max-height: 100dvh !important;
    width: auto !important;
    object-fit: contain !important;
}

#ai-zoom-unified * {
    box-sizing: border-box;
}

/* -------------------------------------------------------------
   MOBILE / DEFAULT (<1400px)
   ------------------------------------------------------------- */
#ai-zoom-unified .m-wrap {
    display: flex;
    flex-direction: column;
    width: 98vw;
    height: 96vh;
    gap: 12px;
    position: relative;
}

.m-info-panel {
    order: 2;
    background: var(--zoom-panel-bg);
    border: 1px solid var(--zoom-border);
    border-radius: var(--panel-radius);
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.m-main {
    order: 1;
    flex: 1;
    min-height: 0;
    background: #050505;
    border-radius: var(--panel-radius);
    border: 1px solid var(--zoom-border);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-comments-panel {
    order: 3;
    background: var(--zoom-panel-bg);
    border: 1px solid var(--zoom-border);
    border-radius: var(--panel-radius);
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    /* CRITICAL for inner scroll */
    min-height: 0;
    /* CRITICAL for flex child scroll */
}

/* -------------------------------------------------------------
   WIDE SCREEN LAYOUT (>1400px) - CSS GRID - MAXIMIZED
   ------------------------------------------------------------- */
@media (min-width: 1400px) {
    #ai-zoom-unified .m-wrap {
        display: grid;
        width: 100vw;
        height: 100vh;
        gap: 8px;
        /* Minimal gap */
        padding: 8px;
        grid-template-columns: 420px 1fr 400px;
        /* Wider Left Panel (420px) */
        grid-template-rows: 1fr;
        grid-template-areas: "info main comments";
    }

    /* Left Panel: Info (Restored Background "Big Panel Behind") */
    .m-info-panel {
        grid-area: info;
        order: 0;
        max-height: none;
        border-radius: var(--stroon-radius-md);
        background: #111;
        /* Dark Background Restored */
        border: 1px solid #222;
        /* Border Restored */
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 12px;
        /* Inner padding for the "Big Panel" */
        gap: 12px;
    }

    /* Main Image */
    #ai-zoom-unified .m-main {
        grid-area: main;
        background: transparent;
        border: none;
        padding: 0;
        /* Remove padding to maximize image */
    }

    /* Comments Panel */
    .m-comments-panel {
        grid-area: comments;
        border-radius: var(--stroon-radius-md);
        background: #111;
        border: 1px solid #222;
    }
}

/* -------------------------------------------------------------
   PANEL COMPONENT STYLES
   ------------------------------------------------------------- */
.u-panel-box {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: var(--btn-panel-radius);
    padding: var(--pad-panel);
    margin-bottom: 0;
}

/* INFO PANEL INTERNALS */

/* Top Head (Fixed) */
.m-info-head {
    padding: 0 4px 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.m-author-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    margin-right: 12px;
    flex: 1;
}

/* Avatar / Name styling */
.m-ava {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #444;
}

.m-name {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 17px;
    max-width: 180px;
}

.m-head-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Buttons as Panels (10% Smaller Height -> 36px) */
.m-btn-nsfw,
.m-btn-share {
    background: #151515;
    border: 1px solid #333;
    border-radius: var(--btn-panel-radius);
    height: 36px;
    padding: 0 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-small);
    font-weight: 700;
    color: #ccc;
    transition: .2s;
}

.m-btn-nsfw {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.4);
}

.m-btn-nsfw:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: #e74c3c;
    color: #fff;
}

.m-btn-nsfw .lbl {
    font-size: var(--font-small);
    text-transform: uppercase;
}

.m-btn-share {
    color: #888;
    border-color: #333;
}

.m-btn-share:hover {
    border-color: #666;
    color: #fff;
    background: #222;
}

.m-btn-share i {
    font-size: 14px;
}

/* Share Popup (Panel Style) */
.m-share-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 240px;
    background: #111;
    border: 1px solid #333;
    border-radius: var(--btn-panel-radius);
    padding: var(--pad-panel);
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    gap: 10px;
}

.m-share-pop[data-open="true"] {
    display: flex;
}

.m-share-actions a,
.m-share-actions button {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

/* Body Area (Scrollable) */
.m-info-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 4px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Apply Panel Style */
.m-thoughts,
.m-prompt,
.m-details {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: var(--btn-panel-radius);
    padding: var(--pad-panel);
    /* Reduced padding */
}

.m-title-row {
    font-size: var(--font-heading);
    font-weight: 700;
    color: #eee;
    line-height: 1.3;
    margin-bottom: 8px;
}

.m-thoughts-body {
    font-size: 15px;
    line-height: 1.5;
    color: #ccc;
    font-weight: 400;
}

.m-prompt .bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    font-weight: 700;
}

.prompt-text {
    font-size: 15px;
    color: #ccc;
    line-height: 1.5;
    white-space: pre-wrap;
}

.m-prompt.is-collapsed .prompt-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prompt Buttons (RATIO RADIUS: 6px 0 6px 0) */
.p-actions button {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    font-size: 11px;
    border-radius: var(--btn-small-radius);
    cursor: pointer;
    padding: 6px 14px;
    margin-left: 8px;
    transition: .2s;
}

.p-actions button:hover {
    border-color: #555;
    color: #999;
    background: #222;
}

/* METADATA - RESTORED COLORS & HOVER LABELS (NO FLICKER) */
.m-details summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin-bottom: 16px;
}

.meta {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #aaa;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.meta li {
    background: #111;
    padding: 10px 12px;
    border-radius: var(--btn-panel-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #222;
    min-width: 0;
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
    /* Anchor for absolute label */
}

.meta li:hover {
    background: #181818;
    border-color: #333;
    z-index: 10;
}

/* Hide Label by default */
.meta li strong {
    display: none;
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    /* Overlay Style (Absolute) */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 48px;
    /* Start after icon */
    background: #111;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    z-index: 20;
}

/* Show Label on Hover */
.meta li:hover strong {
    display: block;
}

.m-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #222;
    flex-shrink: 0;
}

.m-ico svg {
    width: 18px;
    height: 18px;
}

/* Specific Colors via meta-item class names */
.meta-item.model .m-ico {
    color: #3498db !important;
    background: rgba(52, 152, 219, 0.15) !important;
}

.meta-item.seed .m-ico {
    color: #2ecc71 !important;
    background: rgba(46, 204, 113, 0.15) !important;
}

.meta-item.dims .m-ico {
    color: #f1c40f !important;
    background: rgba(241, 196, 15, 0.15) !important;
}

.meta-item.style .m-ico {
    color: #9b59b6 !important;
    background: rgba(155, 89, 182, 0.15) !important;
}

/* Actions Bar (Big Buttons) */
.m-actions-bar {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.m-actions-bar button {
    flex: 1;
    height: 48px;
    border-radius: var(--btn-panel-radius);
    border: 1px solid #333;
    background: #151515;
    color: #ccc;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: .2s;
}

.m-actions-bar button.btn-like:hover {
    background: #222;
    color: #f1c40f;
    border-color: #444;
}

.m-actions-bar button.btn-dislike:hover {
    background: #222;
    color: #e74c3c;
    border-color: #444;
}

/* Footer (Fixed Stats + Date) */
.m-info-foot {
    /* Main Panel Style */
    padding: var(--pad-panel);
    margin-right: 4px;
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: var(--btn-panel-radius);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.m-inline-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Stats Pills - HOVER LABELS (NO FLICKER) & PANEL STYLE */
.m-inline-stats .pill {
    background: #111;
    border: 1px solid #222;
    color: #888;
    border-radius: var(--btn-panel-radius);
    padding: 10px 14px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
    /* Anchor for absolute label */
}

.m-inline-stats .pill:hover {
    background: #181818;
    border-color: #333;
    color: #ccc;
    z-index: 10;
}

.m-inline-stats .pill b {
    color: #fff;
    font-weight: 600;
}

/* Hide Label by default */
.m-inline-stats .pill span {
    display: none;
    font-weight: 600;
    color: #ccc;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    /* Overlay Style (Absolute) */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 40px;
    /* Offset from icon/start */
    background: #111;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    z-index: 20;
}

/* Show Label on Hover */
.m-inline-stats .pill:hover span {
    display: block;
}

.m-inline-stats .pill-share {
    display: none !important;
}

/* Date Row */
.m-date-row {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-top: 12px;
    padding-left: 2px;
}

/* Main Image Area Components */
.img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Image: Max Size ("So big so arrows fit with 4px") */
.img-wrap .img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.m-close {
    display: none;
}

@media (max-width: 1399px) {
    .m-close {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 20;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        font-size: 18px;
    }
}

/* NAVIGATION ARROWS - BIGGER & SPLIT (4px edges) */
.quad-ctrl {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    /* 4px left and right per request */
}

.quad-btn {
    pointer-events: auto;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    width: auto;
    height: auto;
    border: none;
    font-size: 6rem;
    /* HUGE */
    cursor: pointer;
    display: block;
    transition: .2s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border-radius: 0;
}

.quad-btn:hover {
    color: #fff;
    transform: scale(1.1);
    background: transparent;
}

/* NSFW Modal (Overlay) - BIGGER */
.nsfw-modal {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: .2s;
}

.nsfw-modal[data-open="1"] {
    opacity: 1;
    pointer-events: auto;
}

.nsfw-card {
    background: #151515;
    border: 1px solid #333;
    padding: 40px;
    border-radius: var(--btn-panel-radius);
    width: 500px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Report Modal Wrapper */
.m-nsfw-modal {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: rgba(0, 0, 0, 0.55);
}

.m-nsfw-modal[data-open="1"] {
    display: flex;
}

.nsfw-card {
    position: relative;
    z-index: 1;
    width: min(520px, 92vw);
    background: #161616;
    color: #eaeaea;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

.nsfw-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #eaeaea;
}

.nsfw-card textarea {
    width: 100%;
    min-height: 110px;
    background: #1a1a1a;
    color: #eee;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 0;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.nsfw-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

.nsfw-actions .btn {
    border: 1px solid #3a3a3a;
    background: #232323;
    color: #eee;
    border-radius: 10px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
}

.nsfw-actions .btn-primary {
    background: #7a0913;
    border-color: #c21a2a;
    color: #fff;
}

/* COMMENTS STYLING */
.m-comments-head {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
    color: #ddd;
    padding: 0 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-close-panel {
    background: transparent;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    transition: .2s;
}

.m-close-panel:hover {
    color: #fff;
}

.m-c-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 6px;
    /* Removed max-height to allow full flex scrolling */
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.m-c-list::-webkit-scrollbar {
    width: 6px;
}

.m-c-list::-webkit-scrollbar-track {
    background: transparent;
}

.m-c-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.m-c-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.c-item {
    display: flex;
    gap: 14px;
}

.c-ava {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Comment Bubble: TARGETING LEGACY STRUCTURE via nth-child(2) */
/* Comment Bubble - New Structure */
.c-bubble {
    background: #252528;
    padding: 10px 14px;
    border-radius: 4px 14px 14px 14px;
    /* User requested style */
    border: 1px solid #333;
    max-width: 100%;
}

.c-item>div:nth-child(2) {
    /* Legacy override reset if mixed content exists */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.c-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    color: #fff;
    display: block;
}

.c-text,
.c-body {
    font-size: 15px;
    line-height: 1.4;
    color: #ddd;
    word-wrap: break-word;
}

.c-actions {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    margin-left: 0;
}

/* Reset margin since it's inside bubble */
.c-btn {
    background: transparent;
    border: 0;
    padding: 0;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: .2s;
}

.c-btn:hover {
    color: #ccc;
}

.c-btn.active {
    color: #f1c40f;
}

/* Composer Input */
.m-c-form {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    border-top: 1px solid #222;
    padding-top: 14px;
    position: relative;
}

/* Expanded Emoji Picker Popover */
.m-emoji-picker {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 340px;
    height: 280px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2147483647 !important;
    /* Max value to beat everything */
    display: none;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto !important;
    /* Ensure clicks register */
}

.m-emoji-picker[data-open="true"] {
    display: flex;
}

.emoji-tabs {
    display: flex;
    background: #252528;
    /* Neutral background, matching bubbles */
    border-bottom: 1px solid #333;
    overflow-x: auto;
}

.emoji-tab {
    background: #151515;
    border: 1px solid #2a2a2a;
    color: #888;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 14px 0 14px 0;
    /* User Request */
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
    transition: .2s;
}

.emoji-tab:hover {
    color: #ccc;
    background: #222;
    border-color: #444;
}

.emoji-tab.active {
    color: #fff;
    background: #252525;
    border-color: #666;
}

.emoji-grid-wrap {
    padding: 8px;
    height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    /* No Left-Right Scroll */
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #444 #1a1a1a;
}

.emoji-grid-wrap::-webkit-scrollbar {
    width: 6px;
}

.emoji-grid-wrap::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.emoji-grid-wrap::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 3px;
}

.emoji-grid {
    display: grid;
    /* Auto-fill to prevent squishing/overflow */
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 4px;
    width: 100%;
}

.emoji-btn {
    font-size: 24px;
    /* Increased size for visibility */
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .1s;
    color: #fff !important;
    /* FORCE VISIBILITY */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    /* Contrast push */
    padding: 0;
}

.emoji-btn:hover {
    background: transparent;
    /* No background on hover as requested */
    transform: scale(1.15);
}

/* Composer Input Redesign (Rich "Facebook" Style) */
.m-c-form {
    display: flex;
    flex-direction: column;
    margin-top: 14px;
    border-top: 1px solid #222;
    padding-top: 14px;
    position: relative;
    background: transparent;
    width: 100%;
}

.m-c-input-wrap {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    /* User Request: 0 14 0 14 Radius */
    border-radius: 0 14px 0 14px;
    display: flex;
    flex-direction: column;
    /* Stack Textarea + Toolbar */
    padding: 10px;
    min-height: 100px;
    transition: .2s;
    position: relative;
}

.m-c-input-wrap:focus-within {
    border-color: #555;
    background: #202020;
}

.m-c-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #eee;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.4;
    padding: 0;
    min-height: 80px;
    max-height: 200px;
    resize: none;
    overflow-y: auto;
    overflow-x: hidden;
    /* No horizontal scroll */
    margin-bottom: 8px;
    /* Space for toolbar */
}

.m-c-input:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
    border: none;
}

/* Tools Toolbar at Bottom of Wrapper (Scoped) */
#ai-zoom-unified .m-c-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Smiley Left, Send Right */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    width: 100%;
}

#ai-zoom-unified .m-c-emoji-group {
    display: flex;
    gap: 8px;
}

/* Category Buttons (Standardized & Scoped) */
#ai-zoom-unified .m-c-emoji-cat {
    color: #fff !important;
    /* Force White */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    width: 32px;
    height: 32px;
    font-size: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 6px;
    transition: .2s;
    padding: 0;
    margin: 0;
}

#ai-zoom-unified .m-c-emoji-cat:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

#ai-zoom-unified .m-c-emoji-cat.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffd700 !important;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Buttons Inside (Scoped) */
#ai-zoom-unified .m-c-emoji {
    color: #888;
    width: 32px;
    height: 32px;
    font-size: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: .2s;
    padding: 0;
    margin: 0;
    /* User: "emoji button does not need to have a panel" -> Transparent */
}

#ai-zoom-unified .m-c-emoji:hover {
    color: #f1c40f;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

#ai-zoom-unified .m-c-send {
    color: #3498db;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: .2s;
    padding: 0;
    margin: 0;
}

#ai-zoom-unified .m-c-send:hover {
    color: #5dade2;
    background: rgba(52, 152, 219, 0.1);
    transform: none;
}

/* Emoji Picker Position - Floating above input */
.m-emoji-picker {
    position: absolute;
    bottom: 100%;
    /* Sits above form */
    left: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px;
    width: 100%;
    /* Full Width match */
    display: none;
    flex-direction: column;
    z-index: 200;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.6);
    margin-bottom: 6px;
    overflow: hidden;
}

/* Custom Delete Modal (Overlay Style) */
.m-del-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 14px 0 14px 0;
    padding: 24px;
    display: none;
    flex-direction: column;
    z-index: 2147483647;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.m-del-modal h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.m-del-modal p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.m-del-modal .nsfw-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.m-del-modal .btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #252528;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: .2s;
}

.m-del-modal .btn:hover {
    background: #333;
}

.m-del-modal .del-confirm {
    background: #444;
    border-color: #555;
}

.m-del-modal .del-confirm:hover {
    background: #555;
    border-color: #666;
}

/* ------------------------------------------------------------------
   SHARE POPUP MODERNIZATION (User Request: Full Width + Branding)
   ------------------------------------------------------------------ */
.m-share-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.m-share-actions button, 
.m-share-actions a {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* Branding */
.m-share-branding {
    padding-top: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.m-brand-title {
    font-size: 17px; 
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.m-brand-tagline {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

/* Ensure thumb is clean */
.m-share-prev {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    background: #000;
}

.m-share-thumb {
    display: block;
    width: 100%;
    height: auto;
}