/**
 * Nebula API - Shared Styles
 * Este arquivo contém estilos compartilhados entre todas as páginas
 * Baseado no landing.html
 */

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
body {
    scrollbar-width: thin;
    scrollbar-color: #1f2937 #0b1220;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
    transition-delay: var(--d, 0s);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ============================================
   CODE PANELS & BLOCKS
   ============================================ */
.code-panel pre {
    white-space: pre;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #1f2937 #0f172a;
}

.code-tab:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: -2px;
}

.code-tab-list {
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.code-tab {
    flex: 0 0 auto;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-button {
    display: none;
    background: transparent;
    border: 0;
    padding: .25rem;
    border-radius: .5rem;
    cursor: pointer;
}

.mobile-menu-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .6);
}

.mobile-menu {
    margin-top: .5rem;
    background: #0f172a;
    border: 1px solid #1f2937;
    border-radius: .75rem;
}

.mobile-menu .mobile-link {
    display: block;
    padding: .75rem 1rem;
    color: #9ca3af;
    text-decoration: none;
}

.mobile-menu .mobile-link:hover {
    color: #ffffff;
    background: #111827;
}

@media (max-width: 767px) {
    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */
.nav-links a {
    transition: color 0.15s ease, background-color 0.15s ease;
}

/* ============================================
   CONTENT CARDS (used in About, FAQ, etc.)
   ============================================ */
.content-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid #1f2937;
    border-radius: 1rem;
    padding: 2.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.content-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 165, 233, 0.3);
    flex-shrink: 0;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -15px rgba(14, 165, 233, 0.15);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.75rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: linear-gradient(to right, rgba(14, 165, 233, 0.8), #0c4a6e);
    color: white;
}

.btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn.primary.small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn.secondary {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #1f2937;
    color: #e5e7eb;
}

.btn.secondary:hover {
    border-color: rgba(14, 165, 233, 0.4);
    color: white;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.faq-question {
    width: 100%;
    padding: 1.25rem;
    background: transparent;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    color: #0ea5e9;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 1000px;
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

/* ============================================
   CLICKABLE LINKS (Global)
   ============================================ */
a.text-brand,
.faq-answer-content a,
.legal-content a,
.content-card a,
.text-content a {
    color: #0ea5e9;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a.text-brand:hover,
.faq-answer-content a:hover,
.legal-content a:hover,
.content-card a:hover,
.text-content a:hover {
    color: #38bdf8;
    text-decoration-color: #38bdf8;
}

/* ============================================
   TIP/INFO BOXES
   ============================================ */
.tip-box,
.info-box {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-box p,
.info-box p {
    color: #93c5fd;
    margin: 0;
    line-height: 1.6;
}

.tip-box a,
.info-box a {
    color: #0ea5e9;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tip-box a:hover,
.info-box a:hover {
    color: #38bdf8;
}

/* ============================================
   DOC LINKS (Documentation blocks)
   ============================================ */
.doc-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.doc-link:hover {
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.05);
    transform: translateX(4px);
}

.doc-link .icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.doc-link .content {
    flex: 1;
}

.doc-link .title {
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-link .title::after {
    content: '→';
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    color: #0ea5e9;
}

.doc-link:hover .title::after {
    opacity: 1;
    transform: translateX(0);
}

.doc-link .description {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */
.prose {
    color: #d1d5db;
    line-height: 1.7;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    color: white;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.prose h1 {
    font-size: 2rem;
}

.prose h2 {
    font-size: 1.5rem;
}

.prose h3 {
    font-size: 1.25rem;
}

.prose p {
    margin-bottom: 1em;
}

.prose ul,
.prose ol {
    margin-left: 1.5rem;
    margin-bottom: 1em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose a {
    color: #0ea5e9;
    text-decoration: underline;
}

.prose a:hover {
    color: #38bdf8;
}

.prose strong {
    color: white;
    font-weight: 600;
}

/* ============================================
   TABLE STYLES (for limits, pricing, etc.)
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #1f2937;
}

.data-table th {
    color: white;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.5);
}

.data-table tr:hover {
    background: rgba(14, 165, 233, 0.05);
}

/* ============================================
   BADGE STYLES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge.brand {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge.warning {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

/* ============================================
   GLOW EFFECTS (from header)
   ============================================ */
.glow-brand {
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.15);
}

.glow-brand-hover:hover {
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.25);
}

/* ============================================
   LEGAL CONTENT (Privacy, Terms)
   ============================================ */
.legal-content {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    padding: 2rem;
}

.legal-content h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-content ul {
    color: #9ca3af;
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content strong {
    color: #e5e7eb;
}

.last-updated {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.warning-box {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.warning-box p {
    color: #fbbf24;
    margin: 0;
}

/* ============================================
   TIMELINE (About page)
   ============================================ */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin-top: 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(to bottom, #0ea5e9, rgba(14, 165, 233, 0.3));
    border-radius: 1px;
}

.timeline-dot {
    position: absolute;
    left: -4px;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0ea5e9;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
}

/* ============================================
   TEXT CONTENT
   ============================================ */
.text-content p {
    color: #9ca3af;
    line-height: 1.8;
    font-size: 1rem;
}

.text-content p+p {
    margin-top: 1.25rem;
}

.text-content strong {
    color: white;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 3rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ============================================
   STEP NUMBERS (Quickstart)
   ============================================ */
.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #0ea5e9;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   CODE & PRE BLOCKS
   ============================================ */
pre {
    background: #0f172a;
    border: 1px solid #1f2937;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.5;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.inline-code {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ============================================
   TAB BUTTONS
   ============================================ */
.tab-button {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: #9ca3af;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    color: white;
}

.tab-button.active {
    color: white;
    border-bottom-color: #0ea5e9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   FAQ CATEGORY STYLES
   ============================================ */
.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.category-icon {
    width: 2rem;
    height: 2rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-answer-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
    color: #9ca3af;
    line-height: 1.7;
}

/* ============================================
   LIMIT TABLE (Limits page)
   ============================================ */
.limit-table {
    width: 100%;
    border-collapse: collapse;
}

.limit-table th,
.limit-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #1f2937;
}

.limit-table th {
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.limit-table td {
    color: #e5e7eb;
}

.limit-table tr:last-child td {
    border-bottom: none;
}

.limit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.limit-badge.low {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.limit-badge.medium {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.limit-badge.high {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}