
/* inbox_ai.css - Styles for Inbox and AI Studio pages */


/* --- AI Studio Page Styles --- */


.studio-hero {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, #2c2c2c, #1C1C1C);
    color: #f0f0f0;
}


.studio-hero h1 {
    font-size: 2.8rem;
    color: #FFB531;
    margin-bottom: 1rem;
}


.studio-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: #ddd;
}


.studio-section {
    padding: 4rem 2rem;
}


.studio-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap:5px;
    max-width: 1200px;
    margin: 0 auto;
}


.studio-controls {
    background: #262626;
    padding: 2rem;
    border-radius: 12px;
}


.studio-controls h3 {
    color: #FFB531;
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.6rem;
    text-align: center;
}


.form-group {
    margin-bottom: 1.5rem;
}


.form-group label {
    display: block;
    color: #bbb;
    margin-bottom: 0.5rem;
    font-weight: bold;
}


.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid #444;
    background: #1e1e1e;
    color: #f0f0f0;
    font-size: 1rem;
}


.btn-full-width {
    width: 100%;
}


.studio-results {
    background: #262626;
    border-radius: 12px;
    /* Crucial: Reduce all padding to match button size and reduce internal gap */
    padding: 1.5rem 1.5rem 1.5rem 1.5rem; 
    /* The padding is now uniform and smaller, pulling content closer to the edge */
    
    /* Ensure the button and output card are stacked correctly */
    display: flex; 
    flex-direction: column;
    align-items: flex-start; /* Ensure elements start at the left edge of padding */
    justify-content: flex-start;
    text-align: left; /* Aligns text within elements to the left */
    color: #aaa;
}


.studio-results .placeholder-content i {
    font-size: 3rem;
    color: #FFB531;
    margin-bottom: 1.5rem;
}


.studio-results .placeholder-content h2 {
    color: #f0f0f0;
    font-size: 1.5rem;
}


/* --- Inbox Page Styles --- */


.inbox-layout {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}


.inbox-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #262626;
    padding: 1.5rem;
    border-radius: 12px;
}


.inbox-sidebar .sidebar-header {
    margin-bottom: 2rem;
}


.inbox-sidebar h2 {
    color: #f0f0f0;
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
}


.inbox-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}


.inbox-sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: #bbb;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
}


.inbox-sidebar ul li a:hover {
    background-color: #333;
    color: #fff;
}


.inbox-sidebar ul li.active a {
    background-color: #FFB531;
    color: #1C1C1C;
    font-weight: bold;
}


.inbox-sidebar .badge {
    margin-left: auto;
    background-color: #1C1C1C;
    color: #FFB531;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}


.inbox-sidebar li.active .badge {
     background-color: #1C1C1C;
     color: #fff;
}


.inbox-messages {
    flex-grow: 1;
}


.message-item {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem;
    border: 1px solid #333;
    background-color: #262626;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}


.message-item:hover {
    background-color: #2f2f2f;
    border-color: #555;
}


.message-item.unread {
    border-left: 4px solid #FFB531;
}


.sender-details {
    display: flex;
    flex-direction: column;
}


.sender-name {
    font-weight: bold;
    color: #f0f0f0;
    margin-bottom: 0.25rem;
}


.message-subject {
    color: #aaa;
    margin: 0;
}


.message-time {
    color: #888;
    font-size: 0.9rem;
    align-self: center;
}


/* Responsive adjustments */
@media (max-width: 992px) {
    .studio-layout {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .inbox-layout {
        flex-direction: column;
    }
    .inbox-sidebar {
        width: 100%;
    }
}
/* =======================================
   AI STUDIO: Output Section Enhancements (Ultimate Overwrite)
   ======================================= */

/* 1. Main Output Card */
.ai-output-card {
    background: #2e2e3a; 
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.12));
    border-radius: 16px; 
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* 2. Professional Heading */
.ai-output-headline {
    color: #35cafc !important; 
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(125, 60, 246, 0.5); 
    letter-spacing: 0.5px;
}

/* 3. Textarea Wrapper */
.textarea-wrapper {
    border: 3px solid #3d3d3d;
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* CRITICAL: White Background and Dark Text */
.ai-output-card .ai-output-textarea {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    
    /* These !important flags ensure the colors are applied */
    background-color: white !important; 
    color: #1a1a1a !important; 
    
    border: none;
    resize: none;
    font-family: Inter, system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
}

/* 4. Gradient Button for 'Copy to Scheduler' */
#copy-to-scheduler-btn.btn-accent {
    background: var(--accent-gradient, linear-gradient(135deg, #35cafc, #7D3CF6));
    color: white !important;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(125, 60, 246, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 0 !important;
    margin-top: 1.5rem !important;
}

#copy-to-scheduler-btn.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(125, 60, 246, 0.8);
}

/* 5. Gradient Switch Styles (Mode Select) */
.form-group select#inputMode,
.input-mode {
    border: 2px solid #555 !important;
    box-shadow: 0 0 10px rgba(53, 202, 252, 0.2); 
    background: #1e1e1e !important;
    color: #f0f0f0 !important;
    transition: all 0.3s ease;
}

.form-group select#inputMode:focus,
.input-mode:focus {
    border-color: #35cafc !important;
    box-shadow: 0 0 15px rgba(125, 60, 246, 0.5); 
    outline: none;
}
/* Add this to your CSS file */
.editable-results {
    width: 100%;
    min-height: 200px;
    background: #1a1a1a; /* Match your dark theme */
    color: #ffffff;
    border: 1px solid #00E5FF;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    font-family: inherit;
    resize: vertical;
}
.editable-results {
    width: 100%;
    height: 300px;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #00E5FF;
    background: #1a1a1a;
    color: white;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin-bottom: 15px;
    resize: vertical;
}

.action-bar {
    display: flex;
    gap: 10px;
}

.usage-hint {
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}
#send-to-scheduler-btn {
    background: linear-gradient(135deg, #7D3CF6, #6A11CB) !important;
    color: white;
    font-weight: bold;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(125, 60, 246, 0.4);
    transition: all 0.3s ease;
}

#send-to-scheduler-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(125, 60, 246, 0.6);
}
/* ==========================================================================
   UNIFIED INBOX PRODUCTION THREE-COLUMN LAYOUT SYSTEM
   ========================================================================== */

#unified-inbox-view {
    background-color: #1C1C1C !important;
    padding: 20px 0;
    min-height: calc(100vh - 120px);
}

.inbox-container-fluid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.inbox-layout-wrapper {
    display: grid;
    grid-template-columns: 280px 380px 1fr;
    gap: 20px;
    height: 80vh;
    background-color: #121212;
    border-radius: 12px;
    border: 1px solid #2d2d2d;
    overflow: hidden;
}

/* LEFT SIDEBAR STYLINGS */
.inbox-col-left {
    background-color: #1a1a1a;
    border-right: 1px solid #2d2d2d;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.inbox-nav-section h4 {
    color: #FFB531;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    margin-top: 5px;
}

.inbox-folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.inbox-folder-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
}

.inbox-folder-list li:hover,
.inbox-folder-list li.active {
    background-color: #262626;
    color: #fff;
}

.inbox-folder-list li.active {
    border-left: 3px solid #00E5FF;
}

.inbox-folder-list li i {
    margin-right: 10px;
    width: 18px;
}

.inbox-folder-list .badge {
    background-color: #00E5FF;
    color: #121212;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.platform-filter-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.platform-tag {
    background: #222;
    border: 1px solid #333;
    color: #bbb;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-tag:hover,
.platform-tag.active {
    background: #2b2b2b;
    border-color: #00E5FF;
    color: #fff;
}

/* CENTER COLUMN: CONVERSATION LIST SYSTEM */
.inbox-col-center {
    background-color: #161616;
    border-right: 1px solid #2d2d2d;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inbox-search-bar-container {
    padding: 15px;
    border-bottom: 1px solid #2d2d2d;
    position: relative;
    display: flex;
    align-items: center;
}

.inbox-search-bar-container input {
    width: 100%;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 15px 10px 40px;
    color: #fff;
    font-size: 0.9rem;
}

.inbox-search-bar-container input:focus {
    border-color: #00E5FF;
    outline: none;
}

.inbox-search-bar-container .search-icon {
    position: absolute;
    left: 30px;
    color: #666;
}

.conversations-scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

.conversation-preview-card {
    background-color: #1e1e1e;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.conversation-preview-card:hover {
    background-color: #252525;
}

.conversation-preview-card.active {
    background-color: #2a2a2a;
    border-color: #00E5FF;
}

.conversation-preview-card.unread-state::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #00E5FF;
    border-radius: 50%;
}

.card-header-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: #888;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.card-title-row h4 {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
}

.card-body-text {
    color: #aaa;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* RIGHT COLUMN: CHAT INTERACTION WORKSPACE */
.inbox-col-right {
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.empty-conversation-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    height: 100%;
    color: #666;
}

.empty-conversation-state i {
    font-size: 4rem;
    color: #2d2d2d;
    margin-bottom: 20px;
}

.empty-conversation-state h3 {
    color: #888;
    margin-bottom: 10px;
}

.active-thread-header {
    padding: 15px 20px;
    background-color: #161616;
    border-bottom: 1px solid #2d2d2d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thread-user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    object-fit: cover;
}

.thread-user-meta h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.platform-pill {
    font-size: 0.75rem;
    background-color: #2b2b2b;
    padding: 2px 8px;
    border-radius: 4px;
    color: #FFB531;
}

.thread-chat-history-viewport {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #131313;
}

.chat-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #fff;
    position: relative;
}

.chat-bubble.incoming-msg {
    background-color: #222;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid #2d2d2d;
}

.chat-bubble.outgoing-msg {
    background-color: #7D3CF6;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.bubble-time {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5px;
    text-align: right;
}

/* AI CONTEXT ACCORDION */
.ai-context-intelligence-bar {
    background-color: #19222a;
    border-top: 1px solid #1a3a4a;
    border-bottom: 1px solid #1a3a4a;
    padding: 12px 20px;
}

.ai-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #00E5FF;
    font-weight: bold;
    margin-bottom: 6px;
}

.ai-bar-body {
    font-size: 0.8rem;
    color: #b0c4de;
    line-height: 1.4;
}

.badge-sentiment {
    background: #00E5FF;
    color: #121212;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
}

/* COMPOSER STYLINGS */
.thread-reply-composer-container {
    padding: 15px 20px;
    background-color: #161616;
    border-top: 1px solid #2d2d2d;
}

.composer-ai-quick-utilities {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.ai-util-btn {
    background: rgba(125, 60, 246, 0.1);
    border: 1px solid rgba(125, 60, 246, 0.3);
    color: #bfa3ff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-util-btn:hover {
    background: rgba(125, 60, 246, 0.25);
    border-color: #7D3CF6;
    color: #fff;
}

.input-composer-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.input-composer-wrapper textarea {
    flex-grow: 1;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.input-composer-wrapper textarea:focus {
    border-color: #00E5FF;
    outline: none;
}

.btn-send-message-action {
    background-color: #00E5FF;
    color: #121212;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.1s, background-color 0.2s;
}

.btn-send-message-action:hover {
    background-color: #00b8cc;
    transform: scale(1.03);
}

.btn-full-width { width: 100%; }
.mb-3 { margin-bottom: 15px; }
.mt-4 { margin-top: 20px; }
.text-facebook { color: #1877f2; }
.text-instagram { color: #e1306c; }
.text-linkedin { color: #0077b5; }
.inbox-loading-placeholder { text-align: center; padding: 40px; color: #666; font-size: 0.95rem; }
/* ==========================================================================
   MOBILE TOUCH OPTIMIZATION GATEWAY
   ========================================================================== */
@media (max-width: 768px) {
    /* Prevent the layout from collapsing on narrow screens */
    .dashboard-layout {
        grid-template-columns: 1fr !important;
        padding: 12px !important;
        gap: 16px !important;
    }

    /* Expand button touch zones to meet standard accessibility guidelines (minimum 44px) */
    button, 
    .instagram-post-card,
    .nav-links a {
        min-height: 44px !important;
        padding: 12px !important;
    }

    /* Make the calendar grid easily scrollable on mobile screens */
    .calendar-grid {
        overflow-x: auto !important;
        display: block !important;
        white-space: nowrap !important;
    }
}