/**
 * components.css - Estilos para Componentes Reutilizáveis
 * Versão: 1.0
 */

/* ===== HEADER E NAVEGAÇÃO ===== */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.header img {
    height: 38px;
    width: auto;
}

.header-title {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.header-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.nav-link span {
    display: none;
}

.nav-link i {
    font-size: 16px;
    flex-shrink: 0;
}

.theme-toggle {
    margin-left: 4px;
}

/* ===== RESPONSIVIDADE HEADER ===== */
@media (min-width: 480px) {
    .nav-link span {
        display: inline;
    }

    .nav-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    .header {
        padding: 14px 20px;
    }

    .header-title {
        font-size: 18px;
    }

    .header img {
        height: 52px;
    }
}

@media (min-width: 768px) {
    .header {
        padding: 16px 24px;
    }

    .nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ===== MODAL "COMO FUNCIONA?" ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 16px;
}

.modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.modal-body {
    padding: 20px;
}

/* ===== CONTEÚDO "COMO FUNCIONA?" ===== */
.funciona-section {
    margin-bottom: 32px;
}

.funciona-step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    font-family: 'Space Mono', monospace;
}

.funciona-step h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text);
}

.funciona-step p {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}

/* ===== FAQ ===== */
.funciona-info {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

.funciona-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--text);
}

.faq-item {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent);
}

.faq-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text);
}

.faq-item p {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}

/* ===== RESPONSIVIDADE MODAL ===== */
@media (min-width: 480px) {
    .modal-header {
        padding: 24px;
    }

    .modal-body {
        padding: 24px;
    }

    .funciona-step {
        padding: 20px;
        margin-bottom: 20px;
    }

    .step-number {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 20px;
    }

    .funciona-step h3 {
        font-size: 16px;
    }

    .funciona-step p {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .modal {
        padding: 40px 20px;
    }

    .modal.show {
        padding-top: 40px;
    }

    .modal-content {
        max-width: 700px;
    }
}

/* ===== SCROLLBAR CUSTOMIZADO ===== */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}
