/* ==========================================================================
   TRAINER-PROFILE.CSS — CARD DO TREINADOR (sidebar) + PÁGINA DE PERFIL
   Modo Carreira. Criado em 27/07/2026.
   ========================================================================== */

/* ---- Foto no card da sidebar (auto-ajuste independente de tamanho/tipo) ---- */
.trainer-photo {
  overflow: hidden; position: relative;
  background: var(--pitch); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.trainer-photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trainer-photo-ph { font-size: 18px; }
.trainer-eye {
  background: none; border: none; cursor: pointer; font-size: 15px;
  opacity: 0.7; margin-left: 8px; padding: 0;
}
.trainer-eye:hover { opacity: 1; }

/* ---- Página de perfil ---- */
.tp-page { max-width: 900px; }
.tp-header { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.tp-photo {
  width: 92px; height: 92px; border-radius: 50%; overflow: hidden;
  position: relative; cursor: pointer; flex-shrink: 0;
  background: var(--bg-3); display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--pitch);
}
.tp-photo img { width: 100%; height: 100%; object-fit: cover; }
.tp-photo-ph { font-size: 40px; }
.tp-photo-edit {
  position: absolute; bottom: 0; right: 0; background: var(--pitch); color: #fff;
  width: 26px; height: 26px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 13px;
}
.tp-head-info h2 { margin: 0 0 2px; font-size: 22px; }
.tp-head-info p { margin: 0 0 8px; color: var(--text-2); font-size: 13px; }
.tp-style { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tp-style select {
  padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--white); font-size: 13px;
}

/* ---- Cartel V/E/D ---- */
.tp-record { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.tp-rec-item {
  flex: 1; min-width: 90px; text-align: center; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.tp-rec-item b { display: block; font-size: 26px; line-height: 1; }
.tp-rec-item span { font-size: 11px; color: var(--text-2); }
.tp-rec-w b { color: #16a34a; }
.tp-rec-d b { color: var(--gold); }
.tp-rec-l b { color: #dc2626; }

/* ---- Colunas de clubes/títulos ---- */
.tp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
@media (max-width: 700px) { .tp-cols { grid-template-columns: 1fr; } }
.tp-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; background: var(--white);
}
.tp-card-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.tp-list-item { font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.tp-empty { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

/* ---- Biografia (Hall da Fama) ---- */
.tp-bio { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--white); }
.tp-bio-sub { font-size: 12.5px; color: var(--text-2); margin: 2px 0 14px; }
.tp-bio-sec { margin-bottom: 14px; }
.tp-bio-head { font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.tp-bio-text {
  width: 100%; min-height: 64px; resize: vertical; box-sizing: border-box;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  font-family: inherit; font-size: 13px; background: var(--bg-1, #fff);
}
.tp-bio-text:focus { outline: none; border-color: var(--pitch); }

/* ---- Histórico por competição (05/10/2026) ---- */
.tp-comp { margin-bottom: 20px; }
.tp-comp-scroll { overflow-x: auto; }
.tp-comp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tp-comp-table th, .tp-comp-table td {
  padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tp-comp-table th { font-size: 11px; color: var(--text-2); font-weight: 600; text-transform: uppercase; }
.tp-comp-table th:first-child, .tp-comp-table .tp-comp-name { text-align: left; }
.tp-comp-table .tp-comp-name { font-weight: 600; }
.tp-comp-table .tp-c-w { color: #16a34a; }
.tp-comp-table .tp-c-d { color: var(--gold); }
.tp-comp-table .tp-c-l { color: #dc2626; }
.tp-comp-legacy td { color: var(--text-2); font-style: italic; }
.tp-comp-total td { font-weight: 700; border-bottom: none; border-top: 2px solid var(--line); }

/* ===== Perfil do treinador: visual profissional (cartão de jogador, abas inclinadas, cartões escuros) ===== */
.tp-page{max-width:820px}
.tp-header{position:relative;overflow:hidden;gap:22px;padding:22px 26px;margin-bottom:18px;border-radius:14px;color:#fff;background:radial-gradient(circle at 90% -20%,rgba(255,210,63,.35),transparent 45%),linear-gradient(120deg,#08261f 0%,#0f4a3b 55%,#13795b 100%);box-shadow:0 14px 30px rgba(8,38,31,.35)}
.tp-header:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(115deg,rgba(255,255,255,.05) 0 2px,transparent 2px 38px);pointer-events:none}
.tp-header:after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background:linear-gradient(90deg,#ffd23f,#fff3a6,transparent)}
.tp-photo{width:116px;height:116px;border:4px solid #ffd23f;background:linear-gradient(160deg,#1b5c4b,#0a2d25);box-shadow:0 0 0 4px rgba(255,210,63,.25),0 12px 24px rgba(0,0,0,.45);z-index:1}
.tp-photo-ph{font-size:52px;opacity:.9}
.tp-photo-edit{background:#ffd23f;color:#0a2d25;width:30px;height:30px;font-size:14px}
.tp-head-info{position:relative;z-index:1;min-width:0}
.tp-kicker{display:block;font-size:10px;font-weight:800;letter-spacing:.3em;text-transform:uppercase;color:#ffd23f;margin-bottom:4px}
.tp-head-info h2{font-size:34px;line-height:1.05;font-style:italic;font-weight:900;text-transform:uppercase;color:#fff;margin:0 0 6px;text-shadow:0 3px 14px rgba(0,0,0,.45);overflow-wrap:anywhere}
.tp-head-info p{color:#cfe9df;font-size:13px;margin:0 0 10px}.tp-head-info p b{color:#fff}
.tp-style{color:#cfe9df}.tp-style label{font-weight:700;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
.tp-style select{background:rgba(255,255,255,.95);border:0;border-radius:4px;font-weight:700;color:#0a2d25;padding:6px 10px}
.tp-record{gap:12px}
.tp-rec-item{position:relative;border:0;border-radius:10px;background:linear-gradient(160deg,#fff,#f1f6f3);box-shadow:0 6px 16px rgba(10,45,37,.12);padding:16px 10px;overflow:hidden}
.tp-rec-item:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:#0f3d34}
.tp-rec-w:before{background:#16a34a}.tp-rec-d:before{background:#e9a826}.tp-rec-l:before{background:#dc2626}
.tp-rec-item b{font-size:32px;font-style:italic;font-weight:900}
.tp-rec-item span{font-size:10.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.tp-card,.tp-bio,.tp-comp{border:0!important;border-radius:12px!important;box-shadow:0 6px 18px rgba(10,45,37,.1);background:#fff}
.tp-card-title{font-style:italic;font-weight:900;text-transform:uppercase;letter-spacing:.08em;font-size:13px;color:#0f3d34;padding-bottom:8px;margin-bottom:10px;border-bottom:3px solid #ffd23f;display:inline-block}
.tp-comp-table th{background:#0f3d34;color:#fff;letter-spacing:.1em;padding:9px 8px}
.tp-comp-table tbody tr:nth-child(even){background:#f4f8f5}
.tp-comp-table tbody tr:hover{background:#e3f1ea}
.tp-bio{padding:18px}
.tp-bio-head{font-weight:800;letter-spacing:.06em;text-transform:uppercase;font-size:12px;color:#0f3d34}
.tp-bio-text{border-radius:8px;border:1px solid #cfdcd4;background:#fbfdfb}.tp-bio-text:focus{border-color:#13795b;box-shadow:0 0 0 3px rgba(19,121,91,.15)}
@media(max-width:600px){.tp-header{flex-direction:column;text-align:center;padding:18px}.tp-head-info h2{font-size:26px}}
.tp-head-info .tp-style{margin-top:8px}

/* VIP na foto da Biografia: moldura dourada + selo do plano */
.tp-photo.tp-vip{border-radius:0;border:0;background:transparent;overflow:visible;box-shadow:none;width:128px;height:128px}
.tp-photo.tp-vip>img:not(.tp-moldura):not(.tp-selo),.tp-photo.tp-vip .tp-photo-ph{position:absolute;inset:11%;width:78%;height:78%;border-radius:5px;object-fit:cover;background:#fff;display:flex;align-items:center;justify-content:center}
.tp-photo.tp-vip .tp-moldura{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;filter:drop-shadow(0 6px 8px rgba(0,0,0,.55))}
.tp-photo.tp-vip .tp-selo{position:absolute;right:-18px;bottom:-14px;width:60px;height:60px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 6px 6px rgba(0,0,0,.65))}
.tp-photo.tp-vip[data-vip=prata] .tp-moldura{filter:grayscale(1) brightness(1.25) drop-shadow(0 6px 8px rgba(0,0,0,.55))}
.tp-photo.tp-vip[data-vip=bronze] .tp-moldura{filter:sepia(1) hue-rotate(-12deg) saturate(1.6) brightness(.85) drop-shadow(0 6px 8px rgba(0,0,0,.55))}
.tp-photo.tp-vip .tp-photo-edit{bottom:6px;right:auto;left:6px;z-index:2}
/* Câmera de trocar foto: só o ícone, sem fundo */
.tp-photo .tp-photo-edit,.tp-photo.tp-vip .tp-photo-edit{background:transparent!important;box-shadow:none!important;border-radius:0;width:auto;height:auto;font-size:20px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.8));z-index:3}

/* enquanto o plano VIP não chegou: nada de borda/foto antiga piscando */
.tp-photo.tp-aguarda{border-color:transparent!important;background:transparent!important;box-shadow:none!important}
.tp-photo.tp-aguarda>*{visibility:hidden}
