/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* === PNCP PCA Integration Styles - Pixel Perfect PNCP Match === */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

:root {
    /* Paleta PNCP Oficial */
    --pncp-blue: #2563EB;
    --pncp-blue-hover: #1d4ed8;
    --pncp-blue-dark: #003366;
    --pncp-gray-bg: #F9FAFB;
    --pncp-gray-value: #F3F4F6;
    --pncp-border: #E5E7EB;
    --pncp-border-light: #E5E7EB;
    --pncp-text-main: #1F2937;
    --pncp-text-muted: #6B7280;
    --pncp-text-placeholder: #9CA3AF;
    --pncp-font: 'Raleway', 'Rawline', system-ui, -apple-system, sans-serif;
    --pncp-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    --pncp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hello-pncp-lista-wrapper,
.hello-pncp-view-wrapper {
    font-family: var(--pncp-font);
    color: var(--pncp-text-main);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* === PNCP Keyword Search (Full-width) === */
.hello-pncp-keyword-section {
    margin-bottom: 16px;
}

.hello-pncp-keyword-section label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--pncp-text-main);
    margin-bottom: 8px;
}

.hello-pncp-keyword-section input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--pncp-border);
    border-radius: 4px;
    padding: 0 16px;
    font-size: 14px;
    font-family: var(--pncp-font);
    color: var(--pncp-text-main);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hello-pncp-keyword-section input::placeholder {
    color: var(--pncp-text-placeholder);
}

.hello-pncp-keyword-section input:focus {
    outline: none;
    border-color: var(--pncp-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* === PNCP Filter Card (FILTROS) === */
.hello-pncp-filter-card {
    background: var(--pncp-gray-bg);
    border: 1px solid var(--pncp-border);
    border-radius: 4px;
    margin-bottom: 32px;
}

.hello-pncp-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--pncp-border);
}

.hello-pncp-filter-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pncp-text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hello-pncp-filter-header-title svg {
    width: 18px;
    height: 18px;
    color: var(--pncp-text-muted);
}

.hello-pncp-filter-header-info {
    width: 20px;
    height: 20px;
    background: var(--pncp-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
}

.hello-pncp-filter-body {
    padding: 24px;
}

.hello-pncp-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.hello-pncp-filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hello-pncp-filter-item label {
    font-weight: 600;
    font-size: 14px;
    color: var(--pncp-text-main);
}

.hello-pncp-filter-item select {
    height: 44px;
    border: 1px solid var(--pncp-border);
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    font-family: var(--pncp-font);
    color: var(--pncp-text-main);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.hello-pncp-filter-item select:focus {
    outline: none;
    border-color: var(--pncp-blue);
}

.hello-pncp-filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--pncp-border);
    background: #fff;
}

.hello-pncp-btn-reset {
    background: transparent;
    color: var(--pncp-blue);
    font-weight: 600;
    font-size: 14px;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-family: var(--pncp-font);
    transition: color 0.2s ease;
}

.hello-pncp-btn-reset:hover {
    color: var(--pncp-blue-hover);
    text-decoration: underline;
}

.hello-pncp-btn-submit {
    background: var(--pncp-blue);
    color: #fff;
    border-radius: 100px;
    padding: 10px 28px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    font-family: var(--pncp-font);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.hello-pncp-btn-submit:hover {
    background: var(--pncp-blue-hover);
}

.hello-pncp-btn-submit:active {
    transform: scale(0.98);
}

.hello-pncp-btn-submit svg {
    width: 16px;
    height: 16px;
}

/* === PNCP Results Section === */
.hello-pncp-results-section {
    margin-top: 32px;
}

.hello-pncp-results-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--pncp-text-main);
    margin: 0 0 16px 0;
    font-family: var(--pncp-font);
}

.hello-pncp-results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--pncp-border);
    margin-bottom: 0;
}

.hello-pncp-results-info {
    font-size: 14px;
    color: var(--pncp-text-muted);
}

.hello-pncp-results-info strong {
    color: var(--pncp-text-main);
    font-weight: 700;
}

.hello-pncp-results-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hello-pncp-sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hello-pncp-sort-group label {
    font-size: 14px;
    color: var(--pncp-text-muted);
    white-space: nowrap;
}

.hello-pncp-sort-group select {
    height: 36px;
    border: 1px solid var(--pncp-border);
    border-radius: 4px;
    padding: 0 32px 0 12px;
    font-size: 14px;
    font-family: var(--pncp-font);
    color: var(--pncp-text-main);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.hello-pncp-btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: transparent;
    color: var(--pncp-blue);
    border: 1px solid var(--pncp-blue);
    border-radius: 100px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--pncp-font);
    transition: background 0.2s ease, color 0.2s ease;
}

.hello-pncp-btn-export:hover {
    background: var(--pncp-blue);
    color: #fff;
}

/* Row-Based Card Layout (Official Match) */
.hello-pncp-pca-list-modern {
    display: flex;
    flex-direction: column;
}

.hello-pncp-pca-card {
    background: transparent;
    border-bottom: 1px solid var(--pncp-border);
    transition: background 0.15s ease;
}

.hello-pncp-pca-card:hover {
    background: #FAFBFC;
}

.hello-pncp-pca-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    padding: 20px 0;
}

.pca-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.pca-card-left {
    flex: 1;
    min-width: 0;
}

.pca-card-top-row {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--pncp-text-main);
}

.pca-card-year-group {
    font-weight: 400;
}

.pca-card-year-group strong {
    font-weight: 700;
    color: var(--pncp-text-main);
}

.pca-card-update-group {
    font-weight: 400;
    color: var(--pncp-text-muted);
}

.pca-card-update-group strong {
    font-weight: 600;
    color: var(--pncp-text-muted);
}

.pca-card-orgao {
    font-size: 14px;
    line-height: 1.5;
    color: var(--pncp-blue);
}

.pca-card-orgao strong {
    font-weight: 600;
    color: var(--pncp-text-main);
}

.pca-card-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.pca-card-value-box {
    background: var(--pncp-gray-value);
    padding: 12px 20px;
    border-radius: 4px;
    min-width: 240px;
    text-align: left;
}

.pca-card-value-label {
    font-size: 13px;
    color: var(--pncp-text-muted);
    font-weight: 400;
    display: block;
    margin-bottom: 2px;
}

.pca-card-value-box strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--pncp-text-main);
}

.pca-card-chevron {
    color: var(--pncp-blue);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.hello-pncp-pca-card:hover .pca-card-chevron {
    transform: translateX(4px);
}

.pca-card-chevron svg {
    width: 24px;
    height: 24px;
}

/* === PNCP Modern Pagination === */
.hello-pncp-pagination-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 0;
    margin-top: 8px;
    border-top: 1px solid var(--pncp-border);
}

.hello-pncp-pagination-info {
    font-size: 14px;
    color: var(--pncp-text-muted);
}

.hello-pncp-pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hello-pncp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: none;
    background: transparent;
    color: var(--pncp-blue);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--pncp-font);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
}

.hello-pncp-page-btn:hover:not(.active):not(:disabled) {
    background: rgba(37, 99, 235, 0.1);
}

.hello-pncp-page-btn.active {
    background: var(--pncp-blue-dark);
    color: #fff;
    font-weight: 600;
}

.hello-pncp-page-btn:disabled {
    color: var(--pncp-text-placeholder);
    cursor: not-allowed;
}

.hello-pncp-page-btn.nav-arrow {
    font-size: 18px;
    font-weight: 400;
}

.hello-pncp-page-dots {
    color: var(--pncp-text-muted);
    padding: 0 4px;
    font-size: 14px;
}

.hello-pncp-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hello-pncp-per-page select {
    height: 32px;
    border: 1px solid var(--pncp-border);
    border-radius: 4px;
    padding: 0 28px 0 10px;
    font-size: 14px;
    font-family: var(--pncp-font);
    color: var(--pncp-text-main);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Detail View Refinements */
.hello-pncp-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.hello-pncp-summary-card {
    background: #fff;
    padding: 24px;
    border-radius: 4px;
    border: 1px solid var(--pncp-border-light);
}

.hello-pncp-summary-card .hello-pncp-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    display: block;
    text-transform: none;
    letter-spacing: 0;
}

.hello-pncp-summary-card .hello-pncp-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--pncp-blue);
}

.hello-pncp-text-right {
    text-align: right;
}

.hello-pncp-text-center {
    text-align: center;
}

.hello-pncp-status-pill {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .pca-card-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .pca-card-right {
        width: 100%;
        justify-content: space-between;
        margin-top: 16px;
    }

    .pca-card-value-box {
        min-width: unset;
        flex: 1;
    }

    .hello-pncp-filter-grid {
        grid-template-columns: 1fr;
    }

    .hello-pncp-results-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .hello-pncp-results-actions {
        width: 100%;
        justify-content: space-between;
    }

    .hello-pncp-pagination-modern {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* Export Menu Styles */
.pncp-export-wrap {
    position: relative;
    display: inline-block;
}

.pncp-export-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid var(--pncp-border-light);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 120px;
    margin-top: 8px;
    padding: 8px 0;
}

.pncp-export-menu.active {
    display: block;
}

.pncp-export-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--pncp-text-main);
    font-size: 14px;
    font-family: var(--pncp-font);
}

.pncp-export-menu button:hover {
    background: var(--pncp-gray-bg);
    color: var(--pncp-blue);
}

/* === PCA View Table Styles (PNCP Match) === */
.hello-pncp-pca-view {
    background: #f5f7fa;
    padding: 24px;
    border-radius: 4px;
}

.hello-pncp-header {
    margin-bottom: 24px;
}

.hello-pncp-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--pncp-text-main);
    margin: 0 0 16px 0;
}

.hello-pncp-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 14px;
    color: var(--pncp-text-muted);
}

.hello-pncp-meta-top span strong {
    color: var(--pncp-text-main);
    font-weight: 600;
}

.hello-pncp-section {
    margin-top: 32px;
}

.hello-pncp-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--pncp-text-main);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pncp-blue);
}

.hello-pncp-table-responsive {
    overflow-x: auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: var(--pncp-shadow);
}

.hello-pncp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hello-pncp-table thead {
    background: linear-gradient(to bottom, #f8f9fa 0%, #f0f1f3 100%);
}

.hello-pncp-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--pncp-text-main);
    border-bottom: 1px solid var(--pncp-border-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hello-pncp-table thead th.hello-pncp-text-right {
    text-align: right;
}

.hello-pncp-table thead th.hello-pncp-text-center {
    text-align: center;
}

.hello-pncp-table tbody tr {
    border-bottom: 1px solid var(--pncp-border-light);
    transition: background-color 0.15s ease;
}

.hello-pncp-table tbody tr:hover {
    background-color: #f8faff;
}

.hello-pncp-table tbody tr:last-child {
    border-bottom: none;
}

.hello-pncp-table tbody td {
    padding: 14px 16px;
    color: var(--pncp-text-main);
    vertical-align: middle;
}

.hello-pncp-table tbody td.hello-pncp-text-right {
    text-align: right;
}

.hello-pncp-table tbody td.hello-pncp-text-center {
    text-align: center;
}

.hello-pncp-table tbody td strong {
    font-weight: 600;
    color: var(--pncp-text-main);
}

.hello-pncp-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--pncp-blue);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.hello-pncp-btn-icon:hover {
    background: rgba(19, 81, 180, 0.1);
    color: var(--pncp-blue-hover);
    transform: scale(1.05);
}

.hello-pncp-btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Empty State */
.hello-pncp-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--pncp-text-muted);
}

.hello-pncp-empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

/* Responsive Table */
@media (max-width: 768px) {
    .hello-pncp-pca-view {
        padding: 16px;
    }

    .hello-pncp-meta-top {
        flex-direction: column;
        gap: 8px;
    }

    .hello-pncp-table-responsive {
        border-radius: 4px;
    }

    .hello-pncp-table {
        font-size: 13px;
    }

    .hello-pncp-table thead th,
    .hello-pncp-table tbody td {
        padding: 10px 12px;
    }

    .hello-pncp-section-title {
        font-size: 16px;
    }
}

/* Table Footer & Pagination */
.hello-pncp-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid var(--pncp-border-light);
    margin-top: -1px;
}

.hello-pncp-pagination-info {
    font-size: 14px;
    color: var(--pncp-text-muted);
}

.hello-pncp-pagination-info .current-page,
.hello-pncp-pagination-info .total-pages {
    font-weight: 600;
    color: var(--pncp-text-main);
}

.hello-pncp-pagination-nav {
    display: flex;
    gap: 12px;
}

.hello-pncp-btn-nav {
    background: var(--pncp-blue);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--pncp-font);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hello-pncp-btn-nav:hover:not(:disabled) {
    background: var(--pncp-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(19, 81, 180, 0.3);
}

.hello-pncp-btn-nav:active:not(:disabled) {
    transform: translateY(0);
}

.hello-pncp-btn-nav:disabled {
    background: #d0d0d0;
    color: #999;
    cursor: not-allowed;
}

/* Sortable Column Indicator */
.hello-pncp-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
}

.hello-pncp-sortable::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid var(--pncp-text-muted);
    opacity: 0.5;
}

.hello-pncp-sortable.asc::after {
    border-bottom: 6px solid var(--pncp-blue);
    opacity: 1;
}

.hello-pncp-sortable.desc::after {
    border-top: 6px solid var(--pncp-blue);
    border-bottom: none;
    opacity: 1;
}

/* Responsive Pagination */
@media (max-width: 600px) {
    .hello-pncp-table-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .hello-pncp-pagination-nav {
        width: 100%;
        justify-content: center;
    }
}

/* Error State for AJAX loading failures */
.hello-pncp-error {
    color: #d32f2f;
    text-align: center;
    padding: 20px;
    font-weight: 600;
    background: #ffebee;
}

/* CSV Export Section */
.hello-pncp-csv-export {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hello-pncp-csv-export-label {
    font-size: 13px;
    color: var(--pncp-text-muted);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

@media (max-width: 600px) {
    .hello-pncp-csv-export {
        flex-direction: column;
        align-items: flex-start;
    }
}


