/* styles/marketingPro.css */

/* --- Layout Variables --- */
:root {
    --brand-gold: #b08a48;
    --brand-gold-rgb: 176, 138, 72;
    --nav-height: 80px;
    --secondary-nav-height: 60px;
}

/* --- Main Layout Grid --- */
body[data-page="marketing-pro"] {
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Secondary Navigation (Tools) --- */
.marketing-nav-scroll {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.marketing-nav-scroll::-webkit-scrollbar {
    height: 4px;
}
.marketing-nav-scroll::-webkit-scrollbar-thumb {
    background: var(--brand-gold);
    border-radius: 4px;
}

/* --- HUB NAV (Top Row: Consistent Pro Buttons) --- */
#marketingHubNav {
    padding-bottom: 8px;
    border-bottom: 1px solid #eee; 
}

#marketingHubNav .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.24rem !important;
    padding: 0.18rem 0.48rem !important;
    margin-right: 0.50rem;
    border: 1px solid var(--brand-gold, #b08a48) !important;
    border-radius: 0.5rem !important; /* Professional rounded-rect */
    background: #fff !important;
    color: #000 !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    min-height: 30px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    transition: opacity 0.2s ease;
}

#marketingHubNav .nav-link:hover {
    background: #fff !important;
    border-color: var(--brand-gold) !important;
    opacity: 0.8;
    transform: none;
}

#marketingHubNav .nav-link:hover {
    background: #fffdf8;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#marketingHubNav .nav-link i {
    color: var(--brand-gold);
    font-size: 1rem;
}

/* Tool Buttons in Nav (Standard Link Style with Dividers) */
#marketingToolNav .nav-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 80px; 
    height: auto;    
    margin-right: 0;
    padding: 0.5rem 1rem;
    border: none;    /* Remove box border */
    background: transparent; 
    color: #495057;
    transition: color 0.2s ease;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0; 
    position: relative; /* Anchor for the custom divider */
}

/* Custom Gold Divider (Small/Short) */
/* Applied to all links EXCEPT the last one and the Project buttons */
#marketingToolNav .nav-item:not(:last-child) .nav-link:not(.project-btn)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%); /* Vertically Center */
    width: 1px;
    height: 24px; /* Small height */
    background-color: #b08a48; /* Brand Gold */
    opacity: 0.8; 
}

#marketingToolNav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--brand-gold);
}

#marketingToolNav .nav-link:hover {
    background: rgba(176, 138, 72, 0.05);
    color: #000;
    transform: none; /* No jumping */
}

/* Active State: Gold Underline */
#marketingToolNav .nav-link.active {
    background: transparent; 
    color: var(--brand-gold);
    font-weight: 600;
    box-shadow: inset 0 -3px 0 0 var(--brand-gold); 
}

#marketingToolNav .nav-link.active i {
    color: var(--brand-gold); 
}

/* --- Project Buttons (Restore Box Styling) --- */
.project-btn {
    border: 1px solid #dee2e6 !important;
    border-left: 3px solid var(--brand-gold) !important;
    background: #fffdf8 !important;
    border-radius: 8px !important;
    margin-left: 10px;
    height: 55px !important; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.project-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- Workspace Columns --- */
.marketing-col {
    height: calc(100vh - 220px); /* Adjust based on headers */
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* --- Chat Interface --- */
#chatContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    height: 100%;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fdfdfd;
}

.chat-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
}

#marketingUserInput {
    resize: none;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

#marketingUserInput:focus {
    border-color: var(--brand-gold);
    outline: none;
    box-shadow: none;
}

/* --- Document Preview --- */
#docPreviewContainer {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.doc-frame {
    flex: 1;
    width: 100%;
    border: none;
}

/* --- Brand Analyst Pro Overlay --- */
.brand-loader-spinner {
    width: 3rem;
    height: 3rem;
}

.brand-color-swatch {
    width: 35px;
    height: 35px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.geo-score-circle {
    width: 100px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-width: 4px !important;
    border-style: solid;
    border-radius: 50%;
}

/* --- Assistant Messages --- */
.assistant-reply {
    background: #fff;
    border: 1px solid #eee;
    border-left: 4px solid var(--brand-gold);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.user-message {
    background: #f0f2f5;
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    margin-bottom: 15px;
    margin-left: auto;
    max-width: 85%;
    width: fit-content;
    font-size: 0.95rem;
    color: #1c1e21;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 991px) {
    .marketing-col {
        height: auto;
        min-height: 500px;
        margin-bottom: 20px;
    }
    
    #marketingToolNav .nav-link {
        min-width: 80px;
        height: 60px;
        font-size: 0.7rem;
    }
}

/* --- AUDIT FIXER STYLES (GOLD STANDARD) --- */
.fixer-log {
    height: 200px; /* Taller */
    overflow-y: auto;
    background: #fdfdfd;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

/* User Message: Gold Rectangle, No Pill Shape */
.fixer-user-msg {
    background: var(--brand-gold);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px; /* Slight round, not a pool */
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    max-width: 85%;
}

/* AI Message: Clean White Card */
.fixer-ai-msg {
    background: #fff;
    border: 1px solid #e9ecef;
    border-left: 3px solid var(--brand-gold);
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
}

/* Code Block: Light Theme (No Dark Box) */
.fixer-code-block {
    background: #fffdf8; /* Very light gold tint */
    border: 1px solid #e0d0b8;
    color: #000;
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
}
.nav-link .fa-coins, 
.btn .fa-coins {
  filter: drop-shadow(0 0 2px rgba(176, 138, 72, 0.2));
}

/* =========================================
   BRAND ANALYST PRO - DEDICATED STYLES
   ========================================= */

/* 1. Container Polish */
#brandAnalystView {
    background-color: #fcfcfc;
    padding-bottom: 50px;
}

#brandAnalystView .card {
    border: 1px solid rgba(176, 138, 72, 0.2); /* Subtle Gold Border */
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border-radius: 8px;
}

/* 2. Form Inputs (Gold Focus) */
#brandAnalystView .form-control {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 12px;
    font-size: 0.95rem;
    border-radius: 6px;
}

#brandAnalystView .form-control:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(176, 138, 72, 0.1);
}

/* 3. The Live Report Container */
#brandAuditDocPreview {
    border: 1px solid #b08a48 !important; /* Gold Border */
    background: #fff;
    transition: all 0.3s ease;
}

/* 4. TABLET & MOBILE FIXES (The "Squash" Killer) */
/* On screens smaller than Desktop (992px), stack columns instead of squeezing them */
@media (max-width: 991px) {
    #brandAnalystView .col-lg-4, 
    #brandAnalystView .col-lg-8,
    #brandAnalystView .col-lg-5,
    #brandAnalystView .col-lg-7 {
        width: 100% !important;
        display: block !important;
        margin-bottom: 20px;
    }

    /* Remove the vertical line on mobile/tablet since items are stacked */
    #brandAnalystView .border-end {
        border-right: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}