/* ================================================
   Nagradne igre – MARS | SIVO Agency | v1.3.0
   ================================================ */

:root {
  --bg-top:       #e7ac44;
  --bg-bottom:    #e40523;
  --panel-bg:     #ffffff;
  --panel-text:   #e40523;
  --card-bg:      #e7ac44;
  --accent:       #e40523;
  --accent-hover: #c9031b;
  --progress:     #e7ac44;
  --text-light:   #ffffff;
  --radius-xl:    24px;
  --radius-lg:    16px;
  --shadow-main:  0 10px 30px rgba(0,0,0,0.22);
  --shadow-card:  0 4px 14px rgba(0,0,0,0.15);
  --max-width:    980px;
  --hero-height:  540px;
}

.ni-wrap, .ni-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ni-frontend-wrap {
  width: 100%;
  font-family: 'Roboto', sans-serif;
}

.ni-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================================================
   HERO – fiksna visina, ne skuplja se
   Dimenzije slike: 1920 × 540 px
   ================================================ */
.ni-hero-section {
  position: relative;
  width: 100%;
  height: var(--hero-height) !important;
  min-height: var(--hero-height) !important;
  max-height: var(--hero-height) !important;
  background-color: var(--bg-top);
  overflow: hidden;
  flex-shrink: 0 !important;
}

.ni-logo-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.ni-brand-logo {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
}

.ni-hero-images {
  width: 100%;
  height: 100%;
  display: flex;
}

.ni-hero-images .ni-hero-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.ni-hero-images .ni-hero-half {
  width: 50%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ================================================
   PANEL – raste koliko treba ispod heroa
   ================================================ */
.ni-panel-section {
  flex: 1;
  background: var(--bg-bottom);
  padding: 40px 20px 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.ni-container {
  background: var(--panel-bg);
  color: var(--panel-text);
  padding: 32px 30px;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: var(--max-width);
  box-shadow: var(--shadow-main);
  text-align: center;
}

.ni-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.ni-inputs,
.ni-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Input – override Brizy */
.ni-inputs input[type="number"],
.ni-inputs input {
  padding: 12px 18px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  border: 2px solid var(--accent) !important;
  font-family: 'Roboto', sans-serif !important;
  width: 220px !important;
  max-width: 100% !important;
  background: #fff !important;
  color: #333 !important;
  box-shadow: none !important;
  outline: none !important;
  height: auto !important;
  line-height: normal !important;
  display: inline-block !important;
}

.ni-inputs input:focus {
  border-color: var(--bg-top) !important;
}

/* Dugmici – override Brizy */
.ni-buttons button {
  padding: 12px 22px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: 'Roboto', sans-serif !important;
  border: 2px solid var(--accent) !important;
  background: var(--accent) !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.2s ease !important;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  line-height: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.ni-buttons button:hover:not(:disabled) {
  background: var(--accent-hover) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}

.ni-buttons button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* Sakrivanje dugmadi – koristimo klasu umesto inline style
   da Brizy ne može da override-uje display:none */
.ni-buttons button.ni-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
  position: absolute !important;
}

/* Kartice */
.ni-output {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

.ni-column {
  background: var(--card-bg);
  color: #fff !important;
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  width: calc(50% - 10px);
  min-width: 240px;
  box-shadow: var(--shadow-card);
  font-weight: 700;
  white-space: pre-line;
  transition: transform 0.25s ease;
  text-align: center;
}

.ni-column:hover { transform: translateY(-4px); }

.ni-column h3 {
  margin-bottom: 14px;
  font-size: 1.1rem;
  line-height: 1.3;
  color: #fff !important;
}

.ni-column p {
  min-height: 28px;
  word-break: break-word;
  color: #fff !important;
  font-size: 1rem;
}

.ni-footer-note {
  margin-top: 20px;
  font-size: 13px;
  opacity: 0.65;
  color: var(--panel-text);
}

/* Popup */
.ni-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  padding: 20px;
  z-index: 99999;
}

.ni-popup-card {
  background: #fff;
  color: var(--panel-text);
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  width: min(100%, 420px);
  box-shadow: var(--shadow-main);
  text-align: center;
}

.ni-popup-card h2 {
  margin-bottom: 18px;
  font-size: 1.3rem;
  color: var(--panel-text);
}

.ni-loader {
  width: 100%;
  background: #e0e0e0;
  border-radius: 999px;
  overflow: hidden;
}

.ni-progress {
  height: 22px;
  width: 0%;
  background: var(--progress);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  transition: width 0.08s linear;
  border-radius: 999px;
}

/* Login */
.ni-login-notice {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 20px 24px;
  font-family: sans-serif;
  font-size: 15px;
  color: #333;
  margin: 20px 0;
}
.ni-login-notice a { color: #0073aa; font-weight: 700; }
.ni-error { color: #c00; font-family: monospace; font-size: 14px; }

@media (max-width: 768px) {
  :root { --hero-height: 280px; }
  .ni-container { padding: 20px 16px; }
  .ni-column { width: 100%; }
  .ni-hero-images .ni-hero-half { width: 100%; }
  .ni-inputs input[type="number"],
  .ni-inputs input { width: 100% !important; }
}
