/**
 * BCX Scratch Modal, estilos do popup raspadinha.
 * @version 1.0
 */

.bcx-scratch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.bcx-scratch-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.bcx-scratch-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  position: relative;
  padding: 32px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  transform: scale(.9) translateY(20px);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bcx-scratch-overlay.is-open .bcx-scratch-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.bcx-scratch-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: #f1f5f9;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #64748b;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.bcx-scratch-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.bcx-scratch-header {
  text-align: center;
  margin-bottom: 18px;
}

.bcx-scratch-title {
  font-size: 22px;
  font-weight: 800;
  color: #0c63d4;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}

.bcx-scratch-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.bcx-scratch-canvas-wrap {
  position: relative;
  margin: 0 auto 18px;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(12, 99, 212, .12);
}

.bcx-scratch-prize {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 25%, #FF8A5B 0%, #EC5424 45%, #C2410C 100%);
  color: #fff;
  text-align: center;
  padding: 16px;
  user-select: none;
}

.bcx-scratch-prize-amount {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.bcx-scratch-prize-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

.bcx-scratch-prize-hint {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  opacity: .7;
}

.bcx-scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.bcx-scratch-canvas:active {
  cursor: grabbing;
}

.bcx-scratch-instruction {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin: 0 0 14px;
}

.bcx-scratch-form {
  display: none;
}

.bcx-scratch-overlay.is-revealed .bcx-scratch-form {
  display: block;
  animation: bcxFadeUp .4s ease;
}

@keyframes bcxFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bcx-scratch-overlay.is-revealed .bcx-scratch-instruction {
  display: none;
}

.bcx-scratch-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.bcx-scratch-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color .15s, background .15s;
}

.bcx-scratch-input-wrap:focus-within {
  border-color: #0c63d4;
  background: #fff;
}

.bcx-scratch-flag {
  font-size: 18px;
  margin-right: 6px;
}

.bcx-scratch-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  font-family: inherit;
}

.bcx-scratch-input::placeholder {
  font-weight: 500;
  color: #94a3b8;
}

.bcx-scratch-submit {
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #0c63d4;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
  white-space: nowrap;
}

.bcx-scratch-submit:hover:not(:disabled) {
  background: #0a4fa8;
}

.bcx-scratch-submit:active {
  transform: scale(.97);
}

.bcx-scratch-submit:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.bcx-scratch-msg {
  font-size: 12px;
  text-align: center;
  margin: 0;
  min-height: 16px;
}

.bcx-scratch-msg.is-error {
  color: #DC2626;
}

.bcx-scratch-msg.is-success {
  color: #16A34A;
}

.bcx-scratch-disclaimer {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.4;
}

/* Success state, depois de enviar */
.bcx-scratch-success {
  display: none;
  text-align: center;
  padding: 12px 0;
}

.bcx-scratch-overlay.is-sent .bcx-scratch-success {
  display: block;
  animation: bcxFadeUp .4s ease;
}

.bcx-scratch-overlay.is-sent .bcx-scratch-form,
.bcx-scratch-overlay.is-sent .bcx-scratch-canvas-wrap,
.bcx-scratch-overlay.is-sent .bcx-scratch-instruction {
  display: none;
}

.bcx-scratch-success-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  background: #DCFCE7;
  color: #16A34A;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.bcx-scratch-success-title {
  font-size: 18px;
  font-weight: 800;
  color: #16A34A;
  margin: 0 0 6px;
}

.bcx-scratch-success-text {
  font-size: 14px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .bcx-scratch-modal {
    padding: 28px 18px 20px;
  }
  .bcx-scratch-title {
    font-size: 19px;
  }
  .bcx-scratch-prize-amount {
    font-size: 36px;
  }
  .bcx-scratch-input-row {
    flex-direction: column;
  }
  .bcx-scratch-submit {
    width: 100%;
  }
}
