/* =========================================================
   Ethervael RPG Sheets — Google Sheets + Override Local
   ========================================================= */

body { --erps-flash-duration: 1.5s; }

/* Container */
.erps-sheet-wrapper {
    width: 100%; margin: 0 auto;
    background-color: #1a1a2e; border-radius: 12px; padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #fff; font-family: 'Inter','Roboto',sans-serif;
    position: relative; box-sizing: border-box; overflow: hidden;
}

/* Barra de Pesquisa */
.erps-search-bar {
    margin-bottom: 16px; text-align: left;
}
.erps-search-input {
    background-color: #27253a; color: #f3efff;
    border: 1px solid #a87fff; border-radius: 8px;
    padding: 8px 14px; font-size: 14px; width: 260px;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.erps-search-input:focus {
    border-color: #c9a3ff;
    box-shadow: 0 0 0 3px rgba(168, 127, 255, 0.25);
}
.erps-search-input::placeholder { color: #8a85a0; }

.erps-sheet-area {
    width: 100%; overflow-x: auto;
    -webkit-overflow-scrolling: touch; border-radius: 6px;
}

/* Tabela */
.erps-table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: center; }
.erps-table th, .erps-table td {
    padding: 0 15px; height: 38px; vertical-align: middle;
    border: 1px solid rgba(255,255,255,0.05); white-space: nowrap;
}
.erps-table th {
    background-color: #110d24; color: #dcb6ff;
    font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: 0.5px;
}
.erps-table td {
    color: #f3efff; font-size: 14px; font-weight: 500;
    background-color: #27253a; transition: background-color 0.2s, color 0.2s;
}
.erps-table tr:nth-child(even) td { background-color: #312e48; }
.erps-table tbody tr:hover td { background-color: rgba(168,127,255,0.1) !important; }

.erps-widget-config { display: none !important; }

/* =========================================================
   Mestre — Edição Inline
   ========================================================= */
.erps-sheet-wrapper.is-master td.erps-editable { cursor: text; transition: background 0.2s; }
.erps-sheet-wrapper.is-master td.erps-editable:hover {
    background: rgba(255,255,255,0.05); box-shadow: inset 0 -2px 0 rgba(168,127,255,0.3);
}
.erps-sheet-wrapper.is-master td.erps-editable:focus {
    outline: none; background: rgba(0,0,0,0.2); box-shadow: inset 0 -2px 0 #a87fff;
}

/* Saving spinner */
.erps-saving { opacity: 0.5; pointer-events: none; position: relative; }
.erps-saving::after {
    content: ''; position: absolute; right: 4px; top: 50%; margin-top: -6px;
    width: 12px; height: 12px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%;
    animation: erps-spin 0.6s linear infinite;
}
@keyframes erps-spin { to { transform: rotate(360deg); } }

/* Flash de atualização (a cor real vem do Widget inline) */
.erps-updated {
    position: relative; font-weight: 800 !important;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}
