/*
Theme Name: RPG Master Theme
Theme URI: https://seu-dominio.com/rpg-master-theme
Author: RPG Master Dev
Author URI: https://seu-dominio.com
Description: Tema WordPress para o RPG Master Toolkit. Interfaces para Mestre, Jogadores e Tela de Exibição de sessões de RPG (D&D 5e).
Version: 1.5
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: rpg-master-theme
Tags: rpg, dnd, gaming, dark-theme
*/

/* Este tema depende do plugin RPG Master Toolkit para funcionar corretamente */
/* Os estilos principais estão no plugin (frontend.css) */
/* Estilos específicos do tema abaixo */

/* =============================================
   ESTILOS GERAIS DO TEMA
   ============================================= */

/* Fonte carregada via wp_enqueue_style no functions.php */

body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
}

/* WordPress Admin Bar fix */
body.admin-bar .rmt-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .rmt-header {
        top: 46px;
    }
}

/* =============================================
   LOGIN REDIRECT STYLES
   ============================================= */
.rmt-login-required {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.rmt-login-box {
    background: rgba(15, 52, 96, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.rmt-login-box h2 {
    font-family: 'Cinzel', serif;
    color: #ffd700;
    margin-bottom: 15px;
}

.rmt-login-box p {
    color: #aaa;
    margin-bottom: 25px;
}

.rmt-login-box .rmt-btn {
    display: inline-block;
    text-decoration: none;
}


/* ══════════════════════════════════════════
   SISTEMA DE Z-INDEX
══════════════════════════════════════════ */
:root {
    --z-base:     1;
    --z-nav:    100;
    --z-sticky: 200;
    --z-modal:  500;
    --z-overlay:900;
    --z-toast: 9999;
}

/* ══════════════════════════════════════════
   BOTTOM BAR — padding para não tapar conteúdo
══════════════════════════════════════════ */
@media (max-width: 768px) {
    .rmt-wrap, .rmt-dashboard-container, .rmt-content, body > .rmt-container {
        padding-bottom: 76px !important;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVIDADE — grids e cards
══════════════════════════════════════════ */
@media (max-width: 768px) {
    .rmt-grid-3 { grid-template-columns: 1fr 1fr !important; }
    .rmt-card-grid { grid-template-columns: repeat(2, 1fr) !important; }
    #archetype-cards { grid-template-columns: 1fr !important; }
    #fighting-style-cards { grid-template-columns: 1fr !important; }
    #lu-asi-section > div:first-of-type { flex-direction: column; }
    #pb-container > div { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    .rmt-grid-3 { grid-template-columns: 1fr !important; }
    /* Cards de raça/classe mantêm 2 colunas — 1fr ficaria largo demais */
    .rmt-card-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ══════════════════════════════════════════
   ACESSIBILIDADE — focus visível
══════════════════════════════════════════ */
:focus-visible {
    outline: 2px solid #c9a84c !important;
    outline-offset: 2px !important;
}
.rmt-btn:focus-visible,
.rmt-select-card:focus-visible,
.hub-action-card:focus-visible {
    outline: 2px solid #c9a84c !important;
    outline-offset: 3px !important;
}

/* ══════════════════════════════════════════
   PREFERS-REDUCED-MOTION
══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ══════════════════════════════════════════
   ANIMAÇÕES
══════════════════════════════════════════ */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .8; transform: scale(1.05); }
}
@keyframes fadeInOut {
    0%   { opacity: 0; transform: translateY(-8px); }
    15%  { opacity: 1; transform: translateY(0); }
    75%  { opacity: 1; }
    100% { opacity: 0; }
}

/* ══════════════════════════════════════════
   CONTRASTE — textos auxiliares
══════════════════════════════════════════ */
.rmt-ability-desc, .rmt-field-hint, .rmt-card-subtitle {
    color: #999 !important;
}

/* body.modal-open — impede scroll de fundo */
body.modal-open { overflow: hidden; }
