/**
 * Estilos da Área Pública
 * WP Leis Municipais
 */

/* Formulário de Busca */
.wplm-search-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.wplm-search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.wplm-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.wplm-search-input:focus {
    outline: none;
    border-color: #2271b1;
}

.wplm-search-button {
    padding: 12px 30px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.wplm-search-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.wplm-search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.wplm-search-filter {
    display: flex;
    flex-direction: column;
}

.wplm-search-filter label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.wplm-search-filter select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Resultados de Busca */
.wplm-search-results {
    margin-top: 30px;
}

.wplm-search-result {
    background: #fff;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.wplm-search-result:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wplm-search-result h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.wplm-search-result h3 a {
    color: #2271b1;
    text-decoration: none;
    transition: color 0.3s;
}

.wplm-search-result h3 a:hover {
    color: #135e96;
}

.wplm-lei-meta {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.wplm-lei-meta-item {
    display: flex;
    align-items: center;
}

.wplm-lei-ementa {
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    margin-top: 10px;
}

/* Single Lei */
.wplm-lei-single {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wplm-lei-header {
    border-bottom: 2px solid #2271b1;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.wplm-lei-title {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #2271b1;
}

.wplm-lei-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.wplm-lei-info-item {
    display: flex;
    flex-direction: column;
}

.wplm-lei-info-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    margin-bottom: 5px;
}

.wplm-lei-info-value {
    font-size: 16px;
    color: #333;
}

.wplm-lei-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.wplm-lei-content h1,
.wplm-lei-content h2,
.wplm-lei-content h3 {
    color: #2271b1;
    margin-top: 30px;
    margin-bottom: 15px;
}

.wplm-lei-content p {
    margin-bottom: 15px;
}

/* Tabs de Visualização */
.wplm-lei-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.wplm-lei-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.wplm-lei-tab:hover {
    color: #2271b1;
}

.wplm-lei-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.wplm-lei-tab-content {
    display: none;
}

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

/* Leis Relacionadas */
.wplm-related-laws {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.wplm-related-laws h3 {
    margin-top: 0;
    color: #2271b1;
}

.wplm-related-laws-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wplm-related-laws-list li {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.wplm-related-laws-list li:last-child {
    border-bottom: none;
}

.wplm-relation-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #2271b1;
    color: #fff;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

/* Leis Recentes */
.wplm-recent-laws {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.wplm-recent-law-card {
    background: #fff;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.wplm-recent-law-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wplm-recent-law-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.wplm-recent-law-card h4 a {
    color: #2271b1;
    text-decoration: none;
}

.wplm-recent-law-card h4 a:hover {
    color: #135e96;
}

/* Categorias */
.wplm-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wplm-category-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.wplm-category-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wplm-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    color: #333;
    text-decoration: none;
}

.wplm-category-name {
    font-weight: 600;
    font-size: 16px;
}

.wplm-category-count {
    background: #2271b1;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Badges */
.wplm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wplm-badge-vigente {
    background: #28a745;
    color: #fff;
}

.wplm-badge-revogada {
    background: #dc3545;
    color: #fff;
}

.wplm-badge-alterada {
    background: #ffc107;
    color: #333;
}

.wplm-badge-suspensa {
    background: #6c757d;
    color: #fff;
}

/* Botões de Ação */
.wplm-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.wplm-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.wplm-action-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
}

.wplm-action-btn-secondary {
    background: #6c757d;
}

.wplm-action-btn-secondary:hover {
    background: #5a6268;
}

/* Paginação */
.wplm-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.wplm-pagination a,
.wplm-pagination span {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #2271b1;
    text-decoration: none;
    transition: all 0.3s;
}

.wplm-pagination a:hover {
    background: #2271b1;
    color: #fff;
}

.wplm-pagination .current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Loading */
.wplm-loading {
    text-align: center;
    padding: 40px;
}

.wplm-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: wplm-spin 1s linear infinite;
}

@keyframes wplm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensagens */
.wplm-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wplm-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wplm-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wplm-message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsivo */
@media (max-width: 768px) {
    .wplm-search-input-group {
        flex-direction: column;
    }

    .wplm-search-filters {
        grid-template-columns: 1fr;
    }

    .wplm-lei-info {
        grid-template-columns: 1fr;
    }

    .wplm-lei-tabs {
        flex-wrap: wrap;
    }

    .wplm-recent-laws {
        grid-template-columns: 1fr;
    }

    .wplm-categories-list {
        grid-template-columns: 1fr;
    }

    .wplm-actions {
        flex-direction: column;
    }
}
