/* Evidencija Šengen boravaka i kalkulator pravila 90/180. */
.schengen-shell {
  border: 1px solid #b9d6e8;
  background: linear-gradient(145deg, #f8fcff, #eef7fc);
}

.schengen-heading {
  align-items: center;
  min-height: 44px;
}

.schengen-heading h2 {
  margin: 0;
  color: #12344a;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  letter-spacing: .025em;
}

.schengen-summary {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) repeat(2, minmax(150px, .6fr)) minmax(230px, 1fr);
  gap: 12px;
  align-items: stretch;
  margin: 16px 0;
}

.schengen-reference,
.schengen-stat,
.schengen-summary-status {
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #bfdae9;
  border-radius: 15px;
  background: rgba(255, 255, 255, .9);
  padding: 12px 14px;
}

.schengen-reference,
.schengen-stat,
.schengen-summary-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.schengen-reference span,
.schengen-stat span,
.schengen-summary-status span {
  color: #567085;
  font-size: .78rem;
  font-weight: 700;
}

.schengen-reference input,
.schengen-stay-form input {
  display: block;
  inline-size: 100%;
  width: 100%;
  max-width: 100%;
  min-inline-size: 0;
  min-width: 0;
  box-sizing: border-box;
}

.schengen-reference span,
.schengen-stay-form label:not(.schengen-ongoing) > span {
  color: #315b73;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.schengen-reference input[type="date"],
.schengen-stay-form input[type="date"] {
  height: 50px;
  min-height: 50px;
  padding: 0 12px;
  border: 1.5px solid #9fc9df;
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: #102f43;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 50px;
  box-shadow: 0 2px 7px rgba(18, 85, 120, .06);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.schengen-reference input[type="date"]:hover,
.schengen-stay-form input[type="date"]:hover {
  border-color: #69add0;
  background: #fbfeff;
}

.schengen-reference input[type="date"]:focus,
.schengen-stay-form input[type="date"]:focus {
  border-color: #159bdc;
  box-shadow: 0 0 0 4px rgba(21, 155, 220, .16);
}

.schengen-stay-form input[type="date"]:disabled {
  border-color: #d5e1e7;
  background: #edf3f6;
  color: #8295a1;
  box-shadow: none;
}

.schengen-reference input[type="date"]::-webkit-calendar-picker-indicator,
.schengen-stay-form input[type="date"]::-webkit-calendar-picker-indicator {
  width: 21px;
  height: 21px;
  cursor: pointer;
  opacity: .78;
}

.schengen-reference input[type="date"]::-webkit-date-and-time-value,
.schengen-stay-form input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}

.schengen-reference input[type="date"]::-webkit-datetime-edit,
.schengen-stay-form input[type="date"]::-webkit-datetime-edit {
  min-width: 0;
  padding: 0;
}

.schengen-stat strong {
  color: #12344a;
  font-size: 1.2rem;
}

.schengen-summary-status strong {
  color: #16794a;
}

.schengen-summary-status.is-warning strong {
  color: #a35d00;
}

.schengen-summary-status.is-danger strong {
  color: #c73542;
}

.schengen-progress {
  grid-column: 1 / -1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dceaf2;
}

.schengen-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #26aa75 0 70%, #e9a629 84%, #dc4b57 100%);
  transition: width .2s ease;
}

.schengen-stay-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(165px, .8fr));
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid #c7dce8;
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
}

.schengen-stay-form label:not(.schengen-ongoing) {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-weight: 800;
  color: #334f63;
}

.schengen-ongoing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 800;
  color: #334f63;
}

.schengen-ongoing input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.schengen-form-actions {
  grid-column: 2 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.schengen-form-actions button {
  min-height: 44px;
}

.schengen-stay-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.schengen-stay-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #c4dce9;
  border-radius: 15px;
  background: #fff;
}

.schengen-stay-item > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.schengen-stay-item > div:first-child span {
  color: #60778a;
  font-size: .88rem;
}

.schengen-stay-item > div:last-child {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.schengen-stay-item button {
  min-height: 40px;
}

.schengen-legal-note {
  margin-top: 16px;
  padding: 13px 15px;
  border-left: 4px solid #58a7cf;
  border-radius: 10px;
  background: #eaf6fc;
  color: #425f71;
  font-size: .88rem;
  line-height: 1.45;
}

.schengen-legal-note a {
  color: #0879bd;
  font-weight: 800;
}

@media (max-width: 780px) {
  .schengen-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schengen-summary-status {
    grid-column: 1 / -1;
  }

  .schengen-stay-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schengen-country,
  .schengen-form-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  [data-panel="schengen_90_180"] {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .schengen-shell {
    box-sizing: border-box;
    inline-size: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
    padding-inline: 10px;
  }

  .schengen-summary {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    inline-size: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .schengen-reference,
  .schengen-stat,
  .schengen-summary-status {
    grid-column: 1 / -1;
    inline-size: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .schengen-stat {
    padding: 10px;
  }

  .schengen-stat strong {
    font-size: 1rem;
  }

  .schengen-stay-form {
    box-sizing: border-box;
    grid-template-columns: 1fr;
    inline-size: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 10px;
    padding: 12px;
  }

  .schengen-stay-form > label,
  .schengen-reference {
    box-sizing: border-box;
    inline-size: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .schengen-reference input,
  .schengen-stay-form input:not([type="checkbox"]) {
    inline-size: 100% !important;
    width: 100% !important;
    max-inline-size: 100% !important;
    max-width: 100% !important;
    min-inline-size: 0 !important;
    min-width: 0 !important;
  }

  .schengen-ongoing input[type="checkbox"] {
    inline-size: 20px !important;
    width: 20px !important;
    max-inline-size: 20px !important;
    max-width: 20px !important;
    min-inline-size: 20px !important;
    min-width: 20px !important;
  }

  .schengen-country,
  .schengen-form-actions {
    grid-column: auto;
  }

  .schengen-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .schengen-stay-item {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .schengen-stay-item > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
