/**
 * Sistema de Eventos - Estilos CSS
 * Arquivo: /wp-content/themes/seu-tema/assets/css/evento-styles.css
 */

/* ====================================
   VARIÁVEIS CSS
   ==================================== */
:root {
    --cor-primaria: #007cba;
    --cor-secundaria: #005a87;
    --cor-sucesso: #28a745;
    --cor-aviso: #ffc107;
    --cor-perigo: #dc3545;
    --cor-info: #17a2b8;
    --cor-texto: #333;
    --cor-texto-claro: #666;
    --cor-fundo: #f8f9fa;
    --cor-borda: #dee2e6;
    --sombra-padrao: 0 2px 10px rgba(0,0,0,0.1);
    --sombra-hover: 0 5px 20px rgba(0,0,0,0.15);
    --border-radius: 10px;
    --transicao: all 0.3s ease;
}

/* ====================================
   RESET E BASE
   ==================================== */
* {
    box-sizing: border-box;
}

.evento-container {
    animation: fadeIn 0.5s ease;
}

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

/* ====================================
   TIPOGRAFIA
   ==================================== */
.titulo-principal {
    font-size: 2.5rem;
    color: var(--cor-texto);
    margin-bottom: 30px;
    font-weight: 700;
}

.titulo-secao {
    font-size: 1.8rem;
    color: var(--cor-texto);
    margin-bottom: 20px;
    font-weight: 600;
}

.texto-destaque {
    font-size: 1.2rem;
    color: var(--cor-primaria);
    font-weight: 600;
}

/* ====================================
   BOTÕES
   ==================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transicao);
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-hover);
}

.btn-primary {
    background: var(--cor-primaria);
    color: white;
}

.btn-primary:hover {
    background: var(--cor-secundaria);
}

.btn-success {
    background: var(--cor-sucesso);
    color: white;
}

.btn-danger {
    background: var(--cor-perigo);
    color: white;
}

.btn-warning {
    background: var(--cor-aviso);
    color: #333;
}

.btn-info {
    background: var(--cor-info);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--cor-primaria);
    color: var(--cor-primaria);
}

.btn-outline:hover {
    background: var(--cor-primaria);
    color: white;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====================================
   FORMULÁRIOS
   ==================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--cor-texto-claro);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--cor-borda);
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transicao);
}

.form-control:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-control:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.form-control.erro {
    border-color: var(--cor-perigo);
}

.error-message {
    color: var(--cor-perigo);
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.success-message {
    color: var(--cor-sucesso);
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ====================================
   CARDS
   ==================================== */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--sombra-padrao);
    padding: 25px;
    margin-bottom: 25px;
    transition: var(--transicao);
}

.card:hover {
    box-shadow: var(--sombra-hover);
    transform: translateY(-3px);
}

.card-header {
    border-bottom: 2px solid var(--cor-borda);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.4rem;
    color: var(--cor-texto);
    margin: 0;
}

.card-body {
    padding: 15px 0;
}

.card-footer {
    border-top: 1px solid var(--cor-borda);
    padding-top: 15px;
    margin-top: 20px;
}

/* ====================================
   BADGES
   ==================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background: #e3f2fd;
    color: var(--cor-primaria);
}

.badge-success {
    background: #e8f5e9;
    color: var(--cor-sucesso);
}

.badge-warning {
    background: #fff3e0;
    color: #f57c00;
}

.badge-danger {
    background: #ffebee;
    color: var(--cor-perigo);
}

.badge-info {
    background: #e0f7fa;
    color: var(--cor-info);
}

/* ====================================
   TABELAS
   ==================================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table thead {
    background: var(--cor-fundo);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--cor-texto-claro);
    border-bottom: 2px solid var(--cor-borda);
    white-space: nowrap;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr {
    transition: var(--transicao);
}

.table tbody tr:hover {
    background: #fafafa;
}

.table-striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* ====================================
   ALERTAS
   ==================================== */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-icon {
    font-size: 24px;
}

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

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

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

/* ====================================
   LOADING
   ==================================== */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cor-primaria);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

/* ====================================
   QR CODE
   ==================================== */
.qr-code-container {
    text-align: center;
    padding: 30px;
    background: var(--cor-fundo);
    border-radius: var(--border-radius);
}

.qr-code-image {
    max-width: 300px;
    height: auto;
    border: 10px solid white;
    box-shadow: var(--sombra-padrao);
    border-radius: 10px;
}

.qr-code-label {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cor-primaria);
    letter-spacing: 2px;
}

/* ====================================
   ESTATÍSTICAS
   ==================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--sombra-padrao);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transicao);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-hover);
}

.stat-card-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-card-info h3 {
    margin: 0 0 10px 0;
    color: var(--cor-texto-claro);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.stat-card-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--cor-texto);
}

.stat-card-detail {
    color: #999;
    font-size: 0.9rem;
}

/* ====================================
   PROGRESS BAR
   ==================================== */
.progress {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cor-primaria), var(--cor-sucesso));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: width 0.5s ease;
}

/* ====================================
   MODAL
   ==================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--cor-borda);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--cor-borda);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ====================================
   PAGINAÇÃO
   ==================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
}

.page-link {
    padding: 8px 12px;
    background: var(--cor-fundo);
    color: var(--cor-texto);
    text-decoration: none;
    border-radius: 3px;
    transition: var(--transicao);
}

.page-link:hover {
    background: var(--cor-primaria);
    color: white;
}

.page-link.active {
    background: var(--cor-primaria);
    color: white;
    pointer-events: none;
}

.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ====================================
   RESPONSIVIDADE
   ==================================== */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .titulo-principal {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .titulo-principal {
        font-size: 1.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .qr-code-image {
        max-width: 200px;
    }
}

/* ====================================
   IMPRESSÃO
   ==================================== */
@media print {
    .no-print {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .btn,
    .pagination,
    .modal {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .table {
        font-size: 10pt;
    }
}

/* ====================================
   ANIMAÇÕES EXTRAS
   ==================================== */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.bounce {
    animation: bounce 1s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}