/* =========================================================
   FUTSYS – Modern Responsive CSS  |  max-width 1024px
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Barlow+Condensed:wght@600;700&display=swap');

:root {
  --green:        #235a0d;
  --green-dark:   #1a4309;
  --green-mid:    #2d7310;
  --green-soft:   #e8f2e3;
  --green-border: #b5d4a8;
  --red:          #c0392b;
  --text:         #1c1c1c;
  --text-mid:     #4a5241;
  --text-muted:   #8a9484;
  --bg:           #ffffff;
  --bg-alt:       #f7faf5;
  --border:       #dde8d8;
  --shadow:       0 3px 12px rgba(0,0,0,.10);
  --radius:       7px;
  --radius-lg:    12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', verdana, arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-alt);
  margin: 0;
  padding: 0;
  line-height: 1.55;
}

img { border: 0; max-width: 100%; height: auto; }

a                { color: var(--green); text-decoration: none; transition: color .15s; }
a:visited        { color: var(--green); }
a:hover          { color: var(--red); }
a.small-link         { font-size: 11px; color: var(--green-mid); }
a.small-link:visited { color: var(--green-mid); }
a.small-link:hover   { color: var(--red); }

/* ── Layout ──────────────────────────────────────────────── */
div#main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 20px 40px;
  background: var(--bg);
  min-height: 100vh;
}
div#full { max-width: 1024px; margin: 0 auto; }

/* ── Header ──────────────────────────────────────────────── */
#top {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 3px solid var(--green);
  margin-bottom: 28px;
  background: var(--bg);
}

#logo {
  float: none;
  width: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  align-self: center;
}
#logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ── Navigation ──────────────────────────────────────────── */
.tabs {
  display: flex;
  align-items: flex-end;
  flex: 1;
  min-height: 52px;
}

.line#title {
  float: none !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 14px 10px 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--green);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-items {
  display: flex;
  align-items: flex-end;
}

.active {
  float: none !important;
  border: none !important;
  height: auto !important;
  width: auto !important;
  margin-top: 0 !important;
  padding: 9px 17px !important;
  font-size: 13px;
  font-weight: 600;
  background: var(--green);
  color: white;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}
.active a, .active a:visited { color: white !important; }
.active a:hover              { color: rgba(255,255,255,.8) !important; }

.inactive {
  float: none !important;
  border: none !important;
  height: auto !important;
  width: auto !important;
  margin-top: 0 !important;
  padding: 9px 17px !important;
  font-size: 13px;
  color: var(--text-mid);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  transition: background .15s;
  cursor: pointer;
  white-space: nowrap;
}
.inactive:hover { background: var(--green-soft); }
.inactive a     { color: var(--text-mid); }

.line-short,
.line-blind,
.line:not(#title):not(#right) { display: none !important; }

.line#right {
  float: none !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
  margin-left: auto !important;
  padding: 8px 0 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Hamburger ───────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  background: none;
  border: 1.5px solid var(--green-border);
  border-radius: var(--radius);
  cursor: pointer;
  align-self: center;
  margin: 0 6px;
  flex-shrink: 0;
  transition: background .15s;
}
.nav-toggle:hover { background: var(--green-soft); }
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: transform .2s, opacity .15s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ─────────────────────────────────────────────── */
button,
input[type="submit"] {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border: 2px solid var(--green);
  background: var(--bg);
  color: var(--green);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1.4;
  white-space: nowrap;
}
button:hover,
input[type="submit"]:hover {
  background: var(--green);
  color: white;
}
button:active,
input[type="submit"]:active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: white;
}

/* ── Inputs ──────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(35,90,13,.1);
}
input[type="file"]     { font-family: 'DM Sans', sans-serif; font-size: 13px; }
input[type="checkbox"],
input[type="radio"]    { accent-color: var(--green); cursor: pointer; }

/* ── Table scroll wrapper ────────────────────────────────── */
.tbl-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
}

/* ── List table ──────────────────────────────────────────── */
.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.list-table th {
  padding: 9px 12px;
  background: var(--green);
  color: white;
  font-weight: 600;
  text-align: left;
  font-size: 12px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.list-table th a         { color: white; }
.list-table th a:visited { color: white; }
.list-table th a:hover   { color: #ffd; text-decoration: underline; }

.list-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.list-table tr:last-child td { border-bottom: none; }

/* Striedavé farby — fungujú aj bez PHP triedy {EO} */
table.list-table tbody tr:nth-child(even)       { background: var(--bg-alt); }
table.list-table tbody tr.odd                   { background: var(--bg-alt); }
table.list-table tbody tr:nth-child(odd)        { background: var(--bg); }

table.list-table tbody tr:hover:not(.passive)   { background: var(--green-soft); }
table.list-table tr.passive    { background: #f0f0ef; }
table.list-table tr.passive td { color: #aaa; }

/* Ikonky stavu (pride.gif, nepride.gif, nic.gif…) */
.list-table td img[alt],
.list-table td img { vertical-align: middle; margin-right: 3px; }

/* ── Form table ──────────────────────────────────────────── */
.form-table {
  border-collapse: collapse;
}
.form-table th {
  text-align: right;
  padding: 9px 16px 9px 0;
  font-weight: 600;
  color: var(--text-mid);
  white-space: nowrap;
  vertical-align: middle;
  font-size: 13px;
  width: 210px;
}
.form-table td {
  padding: 9px 0;
  vertical-align: middle;
}

/* ── Login ───────────────────────────────────────────────── */
.title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 50px auto 0;
  color: var(--green);
  max-width: 440px;
  width: 100%;
  text-align: center;
}

#login-form {
  width: 100%;
  max-width: 440px;
  margin: 24px auto 0;
  background: var(--bg);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  box-shadow: var(--shadow);
}

div.header {
  float: none;
  display: block;
  width: auto;
  margin: 0 0 5px;
  padding: 0;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-mid);
}
div.control {
  float: none;
  display: block;
  margin: 0 0 14px;
  padding: 0;
}
div.control input {
  border: 1.5px solid var(--border) !important;
  width: 100% !important;
  padding: 9px 12px !important;
  border-radius: var(--radius) !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: var(--bg);
}
div.control input:focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(35,90,13,.1);
  outline: none;
}
div.submit { margin: 10px 0 0; display: flex; gap: 8px; }
div.submit input { flex: 1; }

.login-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.login-actions button,
.login-actions input[type="submit"] {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
}

#login-form hr {
  border: none;
  border-top: 1px solid var(--green-border);
  margin: 22px 0 18px;
}
#login-form ul {
  margin: 6px 0 0 18px;
  padding: 0;
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.9;
}

/* ── Userinfo ────────────────────────────────────────────── */
#userinfo #name {
  text-align: center;
  width: auto;
  height: auto;
  margin: 0 auto 20px;
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
}

/* ── Headings ────────────────────────────────────────────── */
h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--green);
  margin: 24px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-soft);
}
h3 { font-size: 15px; font-weight: 600; color: var(--text-mid); margin: 18px 0 10px; }
h4 { font-size: 14px; font-weight: 600; color: var(--text-mid); margin: 14px 0 8px; }
p  { line-height: 1.65; color: var(--text-mid); }

/* ── Score ───────────────────────────────────────────────── */
span.score {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
div.score {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--green);
  width: 100%;
  padding: 6px 0;
}

div#players-a {
  width: calc(50% - 8px);
  float: left;
  text-align: center;
  margin-right: 16px;
}
div#players-b {
  width: calc(50% - 8px);
  float: left;
  text-align: center;
}
table.players-view     { width: 100%; }
table.players-view td  { padding: 6px; text-align: center; }

div#team-a-caption { float: left; width: 30px; height: 22px; text-align: center; font-weight: 600; }
div#team-b-caption { float: left; width: 100px; height: 22px; text-align: center; font-weight: 600; }
div#team-a-score   { float: left; width: 30px; height: 22px; text-align: center; }
div#team-b-score   { float: left; width: 100px; height: 22px; text-align: center; }

/* ── Link controls ───────────────────────────────────────── */
.link-control-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 16px;
  align-items: center;
}
.paging {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.paging span { padding: 4px 8px; font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── Misc ────────────────────────────────────────────────── */
.invert { padding: 1px 5px; color: white; background: var(--green); border-radius: 3px; font-weight: 700; }
.clear, div.clear { clear: both; }

/* ── Stavové ikony (náhrada za .gif súbory) ──────────────── */
.ico { display: inline-block; vertical-align: middle; line-height: 1; margin-right: 3px; font-style: normal; }
.ico::before { font-size: 15px; }

.ico-pride::before,
.ico-prisiel::before        { content: "✅"; }

.ico-nepride::before,
.ico-neprisiel::before      { content: "❌"; }

.ico-nic::before,
.ico-nereagoval::before,
.ico-bezvyjadrenia::before  { content: "⚪"; }

.ico-neskoro::before,
.ico-warning::before        { content: "⚠️"; }

.ico-vyradeny::before       { content: "🔴"; }

.form-error {
  color: var(--red);
  padding: 10px 14px;
  background: #fef0ee;
  border: 1px solid #f5c0bb;
  border-radius: var(--radius);
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
}
div.legend {
  margin-top: 14px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  padding: 9px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  line-height: 1.9;
}
hr { border: none; border-top: 1px solid var(--green-border); margin: 20px 0; }
td.smaller { font-size: 12px; }

/* ── Footer ──────────────────────────────────────────────── */

/* ── Moderny formulár (form-card) ────────────────────────── */
.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 600px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.form-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
  letter-spacing: .2px;
}
.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(35,90,13,.1);
  outline: none;
}
.form-field input[readonly],
.form-field input[disabled] {
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: not-allowed;
}
.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-section {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin: 24px 0 18px;
}
.form-section:first-child { margin-top: 0; }
.form-submit {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.form-submit input[type="submit"],
.form-submit button {
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 700;
}
.form-submit input[type="submit"] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.form-submit input[type="submit"]:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.form-field select[multiple] {
  height: auto;
  min-height: 140px;
  padding: 6px 4px;
}
@media (max-width: 520px) {
  .form-card { padding: 20px 16px; }
  .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
}


#footer {
  margin: 40px 0 10px;
  padding: 12px 0;
  border-top: 1px solid var(--green-border);
  font-size: 12px;
  color: var(--text-muted);
}
#bottom { font-size: 11px; color: var(--text-muted); }

/* ── Share cards (zvýraznenie zápasu / partie) ──────────── */
div.match-teams-share-card,
div.partia-members-share-card {
  background: var(--green-soft);
  border: 2px solid var(--green);
  border-radius: 10px;
  padding: 16px;
  font-size: 1.1em;
  margin-bottom: 16px;
}

/* ── Prepínač jazykov (desktop) ─────────────────────────── */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border: 1.5px solid var(--green-border);
  background: var(--bg);
  color: var(--text-mid);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.lang-btn:hover {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}
.lang-globe { font-size: 14px; }
.lang-arrow { font-size: 9px; color: var(--text-muted); }

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 600;
  min-width: 120px;
  padding: 4px 0;
  overflow: hidden;
}
.lang-menu.open { display: block; }

.lang-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  border-radius: 0;
  transition: background .1s;
  white-space: nowrap;
}
.lang-opt:hover  { background: var(--green-soft); color: var(--green); }
.lang-active     { color: var(--green) !important; font-weight: 700 !important; background: var(--green-soft); }
.lang-flag       { font-size: 16px; }

/* Skry Google Translate banner (prekladame cez cookie, banner nepotrebujeme) */
.goog-te-banner-frame,
.skiptranslate { display: none !important; }
body { top: 0 !important; }

/* Mobilny footer v dropdown — skryty na desktope */
@media (max-width: 620px) {
  /* ── Hamburger viditelny ── */
  .nav-toggle { display: flex; }

  /* Riadok 1: title (flex:1) + hamburger uplne vpravo */
  .line#title { flex: 1; order: 1; }
  .nav-toggle  { order: 2; }

  /* Nav polozky: dropdown, absolutna pozicia pod riadkom 1 */
  .nav-items {
    order: 3;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 2px solid var(--green);
    z-index: 500;
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
  }
  .nav-items.open { display: flex; }

  /* Polozky dropdown: plna sirka, vlavo zarovnane */
  .nav-items .active,
  .nav-items .inactive {
    width: 100%;
    box-sizing: border-box;
    border-radius: 0 !important;
    padding: 15px 22px !important;
    display: block;
    text-align: left;
    font-size: 15px;
  }
  .nav-items .active a,
  .nav-items .inactive a { display: block; width: 100%; }
  .nav-items .line-short,
  .nav-items .line-blind { display: none !important; }

  /* Riadok 2: pravy panel (tlacidla + prepinac jazyka) */
  .tabs { flex-wrap: wrap; }
  .line#right {
    order: 4;
    display: flex !important;
    width: 100%;
    padding: 7px 4px 7px 0 !important;
    border-top: 1px solid var(--border);
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0 !important;
  }
  .line#right button { font-size: 12px; padding: 7px 13px; }
}

@media (max-width: 520px) {
  div#main { padding: 0 10px 24px; }

  #logo { width: 42px; }
  #logo img { width: 36px; height: 36px; }
  .line#title { font-size: 18px; padding: 8px 10px 8px 2px; }

  table.form-table,
  table.form-table tbody { display: block; width: 100%; }
  table.form-table tr { display: flex; flex-direction: column; margin-bottom: 4px; }
  table.form-table th {
    display: block;
    text-align: left !important;
    width: 100% !important;
    padding: 8px 0 3px;
    font-size: 12px;
  }
  table.form-table td {
    display: block;
    width: 100% !important;
    padding: 0 0 10px;
  }
  table.form-table input[type="text"],
  table.form-table input[type="password"],
  table.form-table input[type="email"],
  table.form-table input[type="tel"],
  table.form-table input[type="datetime-local"],
  table.form-table select,
  table.form-table textarea { width: 100% !important; max-width: 100%; }
  table.form-table td[colspan] { width: 100% !important; }

  div#players-a { width: calc(50% - 6px); margin-right: 12px; }
  div#players-b { width: calc(50% - 6px); }

  .title      { font-size: 34px; margin-top: 30px; }
  #login-form { padding: 24px 16px; border-radius: var(--radius); box-shadow: none; }

  div.match-teams-share-card,
  div.partia-members-share-card { padding: 12px; }

  button, input[type="submit"] { min-height: 38px; }
  a { display: inline-block; min-height: 28px; }

  .link-control-main button,
  .link-control-main input[type="submit"] { font-size: 12px; padding: 7px 12px; }
  .paging button { padding: 6px 10px; font-size: 12px; }
}

@media (max-width: 360px) {
  div#players-a,
  div#players-b { width: 100%; float: none; margin-right: 0; }
  .line#title   { font-size: 16px; }
}
