/* GEOsize Platform Styles */

/* ========== SIDEBAR ========== */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
}
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ========== LINE CLAMP ========== */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ========== PROSE ========== */
.prose strong { font-weight: 700; }
.prose br { margin-bottom: 0.25rem; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    #sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    #sidebar.open { transform: translateX(0); }
    main { margin-left: 0 !important; }
}

/* ========== ANIMATIONS ========== */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

@keyframes pulse-brand {
    0%, 100% { box-shadow: 0 0 0 0 rgba(25,62,82,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(25,62,82,0); }
}

/* ========== BRAND CARD (dark) ========== */
.brand-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 1rem;
    color: white;
    padding: 1.5rem;
}
.brand-card .ai-rating {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}
.brand-card .rating-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== LLM SOURCE BADGES ========== */
.llm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}
.llm-badge.chatgpt { background: #193e52; }
.llm-badge.gemini { background: #193e52; }
.llm-badge.perplexity { background: #193e52; }
.llm-badge.ai_overview { background: #193e52; }

/* ========== MENTION DOT ========== */
.mention-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.mention-dot.mentioned { background-color: #037e93; }
.mention-dot.not-mentioned { background-color: #ef4444; }

/* ========== COMPETITOR INITIAL ========== */
.comp-avatar {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

/* ========== QUESTIONS TABLE ========== */
.questions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.questions-table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
}
.questions-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}
.questions-table tbody tr:hover {
    background: #f9fafb;
}
.questions-table tbody td {
    padding: 1rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

/* ========== INTENT BADGES ========== */
.intent-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.intent-badge.recommendation { background: #dbeafe; color: #1d4ed8; }
.intent-badge.opinion { background: #fef3c7; color: #92400e; }
.intent-badge.comparison { background: #ede9fe; color: #6d28d9; }
.intent-badge.specific { background: #e0f5f8; color: #193e52; }
.intent-badge.custom { background: #fce7f3; color: #9d174d; }
.intent-badge.scan { background: #e0f2fe; color: #0369a1; }
.intent-badge.intent { background: #fef2f2; color: #dc2626; }
.intent-badge.alternative { background: #f0fdf4; color: #166534; }

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transform: translateY(20px);
    transition: transform 0.2s;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* ========== MARKDOWN RESPONSE STYLES ========== */
.md-response p { margin-bottom: 8px; }
.md-response strong { font-weight: 700; color: #111827; }
.md-response a { color: #037e93; text-decoration: underline; word-break: break-all; }
.md-response a:hover { color: #0c5468; }
.md-response ul, .md-response ol { margin: 8px 0; padding-left: 20px; }
.md-response li { margin-bottom: 4px; }
.md-response h1, .md-response h2, .md-response h3 { font-weight: 700; color: #111827; margin: 12px 0 6px; }
.md-response h1 { font-size: 18px; }
.md-response h2 { font-size: 16px; }
.md-response h3 { font-size: 14px; }
.md-response blockquote { border-left: 3px solid #d1d5db; padding-left: 12px; color: #6b7280; margin: 8px 0; }
.md-response code { background: #f3f4f6; padding: 1px 4px; border-radius: 4px; font-size: 12px; }
.md-response pre { background: #f3f4f6; padding: 12px; border-radius: 8px; overflow-x: auto; margin: 8px 0; }

/* ========== PROGRESS PAGE (dark) ========== */
.progress-page {
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
    min-height: 100vh;
    color: white;
}
.progress-step {
    border: 1px solid rgba(3,126,147,0.3);
    border-radius: 0.75rem;
    padding: 1.25rem;
    background: rgba(3,126,147,0.05);
    transition: all 0.3s;
}
.progress-step.active {
    border-color: rgba(3,126,147,0.6);
    background: rgba(3,126,147,0.1);
}
.progress-step.completed {
    border-color: #037e93;
    background: rgba(3,126,147,0.15);
}
.progress-step.pending {
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
    opacity: 0.5;
}

/* ========== FILTERS BAR ========== */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

/* ========== COMPETITOR RANKING ========== */
.ranking-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.ranking-row:last-child { border-bottom: none; }
.ranking-position {
    width: 1.5rem;
    min-width: 1.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 600;
    flex-shrink: 0;
}
.ranking-bar {
    flex: 1;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    margin: 0 8px;
}
.ranking-name {
    min-width: 120px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    flex-shrink: 0;
}
.ranking-count {
    min-width: 30px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
}

/* ========== TOP BAR ========== */
.top-bar-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}
.top-bar-btn:hover { background: #f3f4f6; }
.top-bar-btn.primary {
    background: #193e52;
    color: white;
    border-color: #193e52;
}
.top-bar-btn.primary:hover { background: #0c2d3e; }

/* ========== GEOSIZE BRAND COLOR OVERRIDES ========== */
/* Override Tailwind blue utilities → brand colors */
.text-blue-600 { color: #037e93 !important; }
.text-blue-700 { color: #0c5468 !important; }
.text-blue-800 { color: #193e52 !important; }
.bg-blue-50 { background-color: #eef7f9 !important; }
.bg-blue-100 { background-color: #e0f5f8 !important; }
.bg-blue-600 { background-color: #193e52 !important; }
.hover\:bg-blue-50:hover { background-color: #eef7f9 !important; }
.hover\:bg-blue-100:hover { background-color: #e0f5f8 !important; }
.hover\:bg-blue-700:hover { background-color: #0c5468 !important; }
.hover\:text-blue-700:hover { color: #0c5468 !important; }
.focus\:ring-blue-500:focus { --tw-ring-color: #037e93 !important; }
/* Override Tailwind purple utilities → brand colors */
.text-purple-600 { color: #037e93 !important; }
.text-purple-800 { color: #193e52 !important; }
.bg-purple-100 { background-color: #e0f5f8 !important; }
/* Override Tailwind indigo utilities → brand colors */
.text-indigo-600 { color: #037e93 !important; }
.text-indigo-700 { color: #0c5468 !important; }
.text-indigo-800 { color: #193e52 !important; }
.bg-indigo-100 { background-color: #e0f5f8 !important; }
.bg-indigo-500 { background-color: #037e93 !important; }
.bg-indigo-600 { background-color: #037e93 !important; }
.bg-indigo-700 { background-color: #0c5468 !important; }
.border-indigo-100 { border-color: #e0f5f8 !important; }
.border-indigo-200 { border-color: #b0d8e0 !important; }
.border-indigo-300 { border-color: #037e93 !important; }
.ring-indigo-400 { --tw-ring-color: #037e93 !important; }
.hover\:bg-indigo-200:hover { background-color: #b0d8e0 !important; }
.hover\:bg-indigo-600:hover { background-color: #0c5468 !important; }
.hover\:bg-indigo-800:hover { background-color: #193e52 !important; }
.focus\:ring-indigo-500:focus { --tw-ring-color: #037e93 !important; }
.from-indigo-50 { --tw-gradient-from: #eef7f9 !important; }
/* Override Tailwind yellow utilities → brand colors */
.bg-yellow-100 { background-color: #e0f5f8 !important; }
.text-yellow-800 { color: #193e52 !important; }
.bg-yellow-500 { background-color: #037e93 !important; }
.hover\:bg-yellow-600:hover { background-color: #0c5468 !important; }
.text-yellow-600 { color: #037e93 !important; }
.text-yellow-500 { color: #037e93 !important; }
.hover\:text-yellow-700:hover { color: #0c5468 !important; }
