/* Nayax-aligned portal — modern, clean, RTL, mobile-friendly */

:root {
  /* Nayax brand */
  --nayax-yellow: #FFCE00;
  --nayax-yellow-hover: #E6B800;
  --nayax-yellow-soft: rgba(255, 206, 0, 0.12);
  --nayax-dark: #1a1a1a;
  --nayax-navy: #203246;

  /* Surfaces */
  --bg: #f5f6f9;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-input: #fafbfc;
  --border: #e2e5eb;
  --border-focus: #FFCE00;

  /* Text */
  --text: #1a1a1a;
  --text-muted: #5c6370;
  --text-on-accent: #1a1a1a;

  /* Semantic */
  --danger: #dc3545;
  --danger-soft: rgba(220, 53, 69, 0.08);
  --success: #198754;
  --success-soft: rgba(25, 135, 84, 0.08);

  /* Layout */
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --ring: 0 0 0 3px var(--nayax-yellow-soft);
  --transition: 0.2s ease;
}

* { box-sizing: border-box; }

html {
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* Layout */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

/* Logo at top center of every page */
.portal-logo {
  display: block;
  margin: 0 auto 24px;
  max-width: 140px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Typography */
h1, h2, h3, h4 {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--nayax-dark);
  letter-spacing: -0.02em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

small {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hr {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
  border: 0;
}

/* Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--nayax-yellow), #ffdd33);
  opacity: 0.95;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .wrap { padding: 20px 16px 32px; }
  .card { padding: 20px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.35rem; }
}

/* Labels */
label {
  display: block;
  margin: 14px 0 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--nayax-dark);
  text-align: right;
}

label:first-child { margin-top: 0; }

/* Inputs */
input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-input);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  direction: rtl;
  text-align: right;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  min-height: 44px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c8cdd6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--nayax-yellow);
  box-shadow: var(--ring);
  background: var(--panel);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Buttons */
.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text-on-accent);
  background: var(--nayax-yellow);
  box-shadow: var(--shadow-sm);
  min-height: 44px;
  transition: background var(--transition), transform 0.1s ease, box-shadow var(--transition);
}

.btn:hover,
button.btn:hover {
  background: var(--nayax-yellow-hover);
  box-shadow: 0 2px 8px rgba(255, 206, 0, 0.35);
}

.btn:active,
button.btn:active {
  transform: translateY(1px);
}

.btn.block { width: 100%; }

.btn.secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.secondary:hover {
  border-color: var(--nayax-yellow);
  background: var(--nayax-yellow-soft);
  box-shadow: none;
}

/* Pills / badges */
.pill {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--panel-input);
}

/* Utility: link style if needed */
a:not(.btn) {
  color: var(--nayax-yellow-hover);
  text-decoration: none;
}

a:not(.btn):hover {
  text-decoration: underline;
}

/* Submit loading overlay – full-screen Nayax-themed */
.submitOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  background: rgba(26, 26, 26, 0.88);
  display: none;
  z-index: 99999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.submitOverlay.is-active {
  display: block !important;
}
.submitOverlay__box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--panel);
  border: 3px solid var(--nayax-yellow);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  max-width: 90vw;
}
.submitOverlay__spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border: 4px solid var(--border);
  border-top-color: var(--nayax-yellow);
  border-radius: 50%;
  animation: submitOverlaySpin 0.85s linear infinite;
}
.submitOverlay__brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--nayax-yellow);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.submitOverlay__text {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}
@keyframes submitOverlaySpin {
  to { transform: rotate(360deg); }
}

/* Small screens */
@media (max-width: 420px) {
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.2rem; }
  .pill { font-size: 0.75rem; padding: 6px 12px; }
}
