/**
 * Modal Fullscreen: Preview da Camiseta com Nome
 * 
 * Componente isolado para preview da camiseta personalizada
 * CSS mínimo - o restante está inline no PHP
 * 
 * @package BlackRun_Registration
 */

/* =========================================
   FULLSCREEN SHIRT PREVIEW MODAL - Container
   ========================================= */

.blackrun-fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  z-index: 999999;
  background: radial-gradient(900px 600px at 20% 10%, rgba(36,235,132,.14), transparent 60%),
              radial-gradient(800px 650px at 80% 30%, rgba(59,156,76,.12), transparent 55%),
              linear-gradient(180deg, #070c16, #0b1220);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fullscreenFadeIn 0.3s ease;
}

@keyframes fullscreenFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fullscreen-modal-content {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
    :root{
      --bg1:#070c16;
      --bg2:#0b1220;
      --line:rgba(255,255,255,.10);
      --muted:rgba(255,255,255,.70);

      /* ✅ AJUSTADO PARA A SUA IMAGEM (2048x2048, costas retas) */
      --print-left: 50%;
      --print-top: 37%;
      --print-width: 35%;
      --print-height: 10%;

      /* sem inclinação */
      --print-rotate: 0deg;
      --print-skew-x: 0deg;
      --print-scale-x: 1;

      /* cor da tinta */
      --ink: rgba(15,15,15,.88);
    }

    *{box-sizing:border-box}

    /* Tudo em 1 tela */
    .app{
      height: 100dvh;
      height: 100svh;
      padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
      display:flex;
      flex-direction:column;
      gap:10px;
    }

    .bar{
      border:1px solid var(--line);
      background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
      border-radius:16px;
      padding:12px;
    }

    .title{
      margin:0 0 8px;
      font-size:13px;
      font-weight:850;
      letter-spacing:.2px;
    }

    .row{
      display:grid;
      grid-template-columns: 1fr auto auto;
      gap:10px;
      align-items:center;
    }

    #nameInput{
      width:100%;
      padding:14px 14px;
      border-radius:14px;
      border:1px solid rgba(255,255,255,.14);
      background: rgba(255,255,255,.06);
      color:#fff;
      outline:none;
      font-size:14px;
      font-weight:800;
      letter-spacing:.3px;
    }
    #nameInput::placeholder{ color: rgba(255,255,255,.40); }

    #clearBtn, #guideBtn{
      border:1px solid rgba(255,255,255,.14);
      background: rgba(255,255,255,.08);
      color:#fff;
      padding:12px 12px;
      border-radius:14px;
      cursor:pointer;
      font-weight:850;
      font-size:13px;
      white-space:nowrap;
    }
    #clearBtn:active, #guideBtn:active{ transform: scale(.98); }

    .hint{
      margin:8px 0 0;
      font-size:11.5px;
      color:var(--muted);
      line-height:1.25;
    }

    .preview{
      flex:1;
      min-height:0;
      border:1px solid var(--line);
      background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.14));
      border-radius:16px;
      display:flex;
      align-items:center;
      justify-content:center;
      padding:10px;
      overflow:hidden;
    }

    .mock{
      position:relative;
      height:100%;
      max-height:100%;
      width:min(92vw, 430px);
      aspect-ratio: 1 / 1;
      display:flex;
      align-items:center;
      justify-content:center;
    }

    .mock img{
      width:100%;
      height:100%;
      object-fit:contain;
      display:block;
      user-select:none;
      -webkit-user-drag:none;
      pointer-events:none;
      border-radius:10px;
    }

    /* Área de estampa */
    .print-box{
      position:absolute;
      left: var(--print-left);
      top: var(--print-top);
      width: var(--print-width);
      height: var(--print-height);
      transform:
        translate(-50%, -50%)
        rotate(var(--print-rotate))
        skewX(var(--print-skew-x))
        scaleX(var(--print-scale-x));
      transform-origin:center;
      display:flex;
      align-items:center;
      justify-content:center;
      padding: 2px 4px;
      overflow:hidden;
      pointer-events:none;

      /* guia (toggle) */
      outline: 1px dashed rgba(255,255,255,.0);
      border-radius:10px;
    }

    .print-text{
      width:100%;
      text-align:center;
      white-space:nowrap;
      line-height:1;
      font-weight: 950;
      text-transform: uppercase;
      color: var(--ink);

      /* fica mais "impresso" na camisa branca */
      mix-blend-mode: multiply;
      opacity: .95;

      text-shadow: 0 1px 0 rgba(255,255,255,.10);
      user-select:none;
      letter-spacing: .35px;
    }

    .guide-on .print-box{
      outline: 1px dashed rgba(255,255,255,.30);
      background: rgba(0,0,0,.05);
    }

    /* Botões de ação */
    .modal-actions{
      display: flex;
      gap: 10px;
      flex-shrink: 0;
    }
    
    .modal-actions .btn{
      flex: 1;
      padding: 14px 20px;
      border-radius: 14px;
      font-weight: 700;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .modal-actions .btn-skip{
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.14);
      color: #fff;
    }
    
    .modal-actions .btn-confirm{
      background: var(--blackrun-accent, #42f02b);
      border: 1px solid var(--blackrun-accent, #42f02b);
      color: #000;
    }

    @media (max-width: 360px){
      #nameInput{ padding:13px 12px; }
      #clearBtn, #guideBtn{ padding:11px 11px; }
      .title{ font-size:12.5px; }
      .row{ grid-template-columns: 1fr auto; }
      #guideBtn{ display:none; }
      .modal-actions{ flex-direction: column; }
    }