﻿/* ===== CRIAR EVENTO — WIZARD ===== */

/* ---------- TOPBAR ---------- */

.ce-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.ce-topbar-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
}

.ce-topbar-logo span { color: var(--green); }

.ce-topbar-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-sec);
  border-left: 1.5px solid var(--border);
  padding-left: 1rem;
  margin-left: .25rem;
}

.ce-topbar-back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  color: var(--text-sec);
  text-decoration: none;
  transition: color .15s;
}

.ce-topbar-back:hover { color: var(--green); }

/* ---------- PROGRESS STEPS ---------- */

.ce-steps-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}

.ce-steps {
  display: flex;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}

.ce-step {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 0;
  flex: 1;
  position: relative;
}

.ce-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 140px);
  height: 2px;
  background: var(--border);
  left: 150px;
}

.ce-step.done::after { background: var(--green); }

.ce-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface2);
  color: var(--text-sec);
  font-size: .8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .3s;
  position: relative;
  z-index: 1;
}

.ce-step.active .ce-step-num {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.ce-step.done .ce-step-num {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.ce-step-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-sec);
  white-space: nowrap;
}

.ce-step.active .ce-step-label { color: var(--green); }
.ce-step.done .ce-step-label { color: var(--text); }

/* ---------- CONTAINER PRINCIPAL ---------- */

.ce-container {
  max-width: 820px;
  margin: 2rem auto 6rem;
  padding: 0 1.5rem;
}

/* ---------- PAINEL DE STEP ---------- */

.ce-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.ce-panel-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: .25rem;
}

.ce-panel-sub {
  font-size: .85rem;
  color: var(--text-sec);
  margin-bottom: 1.75rem;
}

/* ---------- CAMPOS ---------- */

.ce-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ce-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.ce-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.ce-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.ce-field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
}

.ce-field .ce-req {
  color: var(--green);
  margin-left: .15rem;
}

.ce-field input,
.ce-field select,
.ce-field textarea {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: .75rem 1rem;
  font-size: .88rem;
  font-family: inherit;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}

.ce-field input:focus,
.ce-field select:focus,
.ce-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.08);
}

.ce-field textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.ce-field input::placeholder,
.ce-field textarea::placeholder { color: var(--text-sec); opacity: .5; }

.ce-field-hint {
  font-size: .74rem;
  color: var(--text-sec);
  margin-top: -.15rem;
}

/* ---------- IMAGE UPLOAD / PREVIEW ---------- */

/* Área clicável de drop */
.ce-img-drop {
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  transition: opacity .2s;
}
.ce-img-drop:hover { opacity: .88; }

.ce-img-preview {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  background: var(--surface2);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .5rem;
  color: var(--text-sec);
  font-size: .84rem;
  background-size: cover;
  background-position: center;
  transition: border-color .2s, box-shadow .2s;
  overflow: hidden;
  position: relative;
  text-align: center;
  padding: 1.5rem;
}
.ce-img-preview:hover { border-color: var(--green); }

.ce-img-preview.has-img {
  border-color: var(--green);
  border-style: solid;
  padding: 0;
}

.ce-img-preview.has-img .ce-img-placeholder { display: none; }

.ce-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  pointer-events: none;
}

.ce-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.55) 100%);
  display: flex;
  align-items: flex-end;
  padding: .75rem;
  opacity: 0;
  transition: opacity .2s;
}

.ce-img-preview.has-img:hover .ce-img-overlay { opacity: 1; }

/* ---------- INGRESSOS ---------- */

.ce-tickets-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1rem;
}

.ce-ticket-item {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color .2s;
  position: relative;
}

.ce-ticket-item:hover { border-color: rgba(22,163,74,.3); }

.ce-ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ce-ticket-header strong {
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.ce-ticket-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ce-remove-ticket {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: .3rem .5rem;
  color: var(--text-sec);
  cursor: pointer;
  font-size: .78rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: all .15s;
}

.ce-remove-ticket:hover {
  color: #e53935;
  border-color: rgba(229,57,53,.3);
  background: rgba(229,57,53,.06);
}

.ce-meia-toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .25rem;
  cursor: pointer;
  user-select: none;
}

.ce-meia-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
}

.ce-meia-toggle span {
  font-size: .83rem;
  color: var(--text-sec);
}

.ce-add-ticket-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .8rem;
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: 10px;
  color: var(--text-sec);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.ce-add-ticket-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-bg);
}

/* ---------- PREVIEW DO EVENTO ---------- */

.ce-preview-card {
  background: var(--surface);
  border: 1.5px solid var(--green);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(22,163,74,0.1);
}

.ce-preview-img {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface2);
  position: relative;
}

.ce-preview-tag {
  position: absolute;
  top: .75rem;
  left: .75rem;
  background: var(--green);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ce-preview-body {
  padding: 1.25rem;
}

.ce-preview-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: .5rem;
  color: var(--text);
}

.ce-preview-meta {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .82rem;
  color: var(--text-sec);
  margin-bottom: 1rem;
}

.ce-preview-meta span {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.ce-preview-tickets {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.ce-preview-tickets h4 {
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ce-preview-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .87rem;
}

.ce-preview-ticket-row:last-child { border-bottom: none; }

.ce-preview-ticket-price {
  font-weight: 700;
  color: var(--green);
}

/* ---------- NAVEGAÇÃO DO WIZARD ---------- */

.ce-wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.ce-btn-prev {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.25rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-sec);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}

.ce-btn-prev:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.ce-btn-prev:disabled { opacity: .35; cursor: not-allowed; }

.ce-btn-next {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.5rem;
  background: linear-gradient(135deg, #22c55e, #34d399);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s, transform .1s, box-shadow .15s;
}

.ce-btn-next:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(22,163,74,.4); }

.ce-btn-publish {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.75rem;
  background: linear-gradient(135deg, #22c55e, #34d399);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(22,163,74,.35);
}

.ce-btn-publish:hover { opacity: .88; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(22,163,74,.55); }

.ce-step-indicator {
  font-size: .82rem;
  color: var(--text-sec);
  font-weight: 600;
}

/* ---------- RESPONSIVO ---------- */

@media (max-width: 640px) {
  .ce-row, .ce-row-3 { grid-template-columns: 1fr; }
  .ce-steps { gap: 0; }
  .ce-step-label { display: none; }
  .ce-step::after { display: none; }
  .ce-steps-wrap { padding: 0 .75rem; }
  .ce-step { padding: .75rem 0; }
  .ce-container { padding: 0 .75rem; margin-top: 1.25rem; margin-bottom: 5rem; }
  .ce-panel { padding: 1.25rem 1rem; }
  .ce-panel-sub { margin-bottom: 1.25rem; }
}

@media (max-width: 480px) {
  /* Topbar: esconde título no mobile (fica apertado) */
  .ce-topbar { padding: 0 1rem; gap: .75rem; height: 56px; }
  .ce-topbar-title { display: none; }
  .ce-topbar-logo { font-size: 1.05rem; }
  .ce-topbar-back { font-size: .8rem; gap: .25rem; }

  /* Steps menores */
  .ce-step-num { width: 26px; height: 26px; font-size: .72rem; }

  /* Wizard nav: botões tomam espaço completo */
  .ce-wizard-nav {
    padding: .85rem .75rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--surface);
    box-shadow: 0 -2px 16px rgba(0,0,0,.08);
  }
  .ce-btn-prev { padding: .65rem .9rem; font-size: .85rem; }
  .ce-btn-next { padding: .65rem 1.1rem; font-size: .85rem; }
  .ce-btn-publish { padding: .65rem 1.1rem; font-size: .85rem; }
  .ce-step-indicator { font-size: .74rem; }

  /* Image preview menor */
  .ce-img-preview { height: 140px; }

  /* Ingresso compacto */
  .ce-ticket-item { padding: 1rem .85rem; }

  /* Evita zoom iOS */
  .ce-field input,
  .ce-field select,
  .ce-field textarea { font-size: 16px !important; padding: .8rem .9rem; }
}
