/* ==========================================================================
   WC Voucher Check – Frontend Styles
   Datei: assets/wvc-style.css
   ========================================================================== */

/* ── CSS Custom Properties ── */
:root {
  --wvc-primary:      #1a1a2e;
  --wvc-accent:       #e94560;
  --wvc-accent-light: #ff6b6b;
  --wvc-surface:      #ffffff;
  --wvc-border:       #e2e4ea;
  --wvc-muted:        #6b7280;
  --wvc-success:      #10b981;
  --wvc-error:        #ef4444;
  --wvc-radius:       14px;
  --wvc-shadow:       0 8px 40px rgba(26, 26, 46, .12);
  --wvc-transition:   .22s cubic-bezier(.4, 0, .2, 1);
}

/* ── Wrapper ── */
.wvc-wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ── Card ── */
.wvc-card {
  background: var(--wvc-surface);
  border: 1.5px solid var(--wvc-border);
  border-radius: var(--wvc-radius);
  box-shadow: var(--wvc-shadow);
  max-width: 480px;
  width: 100%;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* subtle top accent stripe */
.wvc-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--wvc-accent), var(--wvc-accent-light));
}

/* ── Icon ── */
.wvc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(233, 69, 96, .08);
  color: var(--wvc-accent);
  margin-bottom: 1.25rem;
}

.wvc-icon svg {
  width: 30px;
  height: 30px;
}

/* ── Typography ── */
.wvc-heading {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--wvc-primary);
  margin: 0 0 .4rem;
  line-height: 1.2;
}

.wvc-subheading {
  font-size: .9rem;
  color: var(--wvc-muted);
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

/* ── Form ── */
.wvc-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* ── Input ── */
.wvc-input-wrap {
  position: relative;
}

.wvc-input {
  width: 100%;
  padding: .85rem 3rem .85rem 1.1rem;
  border: 1.5px solid var(--wvc-border);
  border-radius: calc(var(--wvc-radius) - 2px);
  font-size: 1rem;
  letter-spacing: .06em;
  font-family: 'Courier New', monospace;
  color: var(--wvc-primary);
  background: #f8f9fc;
  outline: none;
  transition: border-color var(--wvc-transition), box-shadow var(--wvc-transition), background var(--wvc-transition);
  box-sizing: border-box;
  text-transform: uppercase;
}

.wvc-input::placeholder {
  color: #b0b6c3;
  letter-spacing: .02em;
  font-family: inherit;
  text-transform: none;
}

.wvc-input:focus {
  border-color: var(--wvc-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, .12);
}

.wvc-input.is-valid {
  border-color: var(--wvc-success);
  background: #f0fdf9;
}

.wvc-input.is-invalid {
  border-color: var(--wvc-error);
  background: #fff5f5;
  animation: wvc-shake .35s ease;
}

.wvc-input-icon {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wvc-success);
  opacity: 0;
  transition: opacity var(--wvc-transition);
  pointer-events: none;
}

.wvc-input-icon svg {
  width: 18px;
  height: 18px;
}

.wvc-input.is-valid + .wvc-input-icon {
  opacity: 1;
}

/* ── Button ── */
.wvc-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .9rem 1.5rem;
  background: linear-gradient(135deg, var(--wvc-accent), var(--wvc-accent-light));
  color: #fff;
  border: none;
  border-radius: calc(var(--wvc-radius) - 2px);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--wvc-transition), transform var(--wvc-transition), box-shadow var(--wvc-transition);
  box-shadow: 0 4px 16px rgba(233, 69, 96, .28);
  letter-spacing: .02em;
}

.wvc-btn:hover:not(:disabled) {
  opacity: .93;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(233, 69, 96, .36);
}

.wvc-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(233, 69, 96, .2);
}

.wvc-btn:disabled {
  cursor: not-allowed;
  opacity: .7;
}

/* Spinner */
.wvc-btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wvc-spin .65s linear infinite;
}

.wvc-btn.is-loading .wvc-btn-label {
  display: none;
}

.wvc-btn.is-loading .wvc-btn-spinner {
  display: inline-block;
}

/* ── Message ── */
.wvc-message {
  min-height: 1.4em;
  font-size: .88rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--wvc-transition), transform var(--wvc-transition), padding var(--wvc-transition);
}

.wvc-message.is-visible {
  opacity: 1;
  transform: translateY(0);
  padding: .65rem .9rem;
}

.wvc-message.is-success {
  background: rgba(16, 185, 129, .08);
  color: var(--wvc-success);
  border: 1px solid rgba(16, 185, 129, .2);
}

.wvc-message.is-error {
  background: rgba(239, 68, 68, .07);
  color: var(--wvc-error);
  border: 1px solid rgba(239, 68, 68, .18);
}

/* ── Animations ── */
@keyframes wvc-spin {
  to { transform: rotate(360deg); }
}

@keyframes wvc-shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .wvc-card {
    padding: 2rem 1.25rem 1.5rem;
  }
}
