/**
 * ============================================================
 * TYPOGRAPHY — Modelul Unitar de Design (MUD)
 * ASP Moldova — aspgovmd theme
 * ============================================================
 */

body {
  font-family: var(--font-family-base)!important;
  font-size: var(--text-desktop-body-md-size);
  font-weight: var(--text-desktop-body-md-weight);
  line-height: var(--text-desktop-body-md-height);
  color: var(--color-text-primary);
}

.text-display-lg {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-display-lg-size);
  font-weight: var(--text-desktop-display-lg-weight);
  line-height: var(--text-desktop-display-lg-height);
  letter-spacing: var(--text-desktop-display-lg-spacing);
}
.text-display-md {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-display-md-size);
  font-weight: var(--text-desktop-display-md-weight);
  line-height: var(--text-desktop-display-md-height);
  letter-spacing: var(--text-desktop-display-md-spacing);
}

.fsize14{font-size: 14px;}

h1, .heading-lg {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-heading-lg-size);
  font-weight: var(--text-desktop-heading-lg-weight);
  line-height: var(--text-desktop-heading-lg-height);
  letter-spacing: var(--text-desktop-heading-lg-spacing);
  color: var(--color-text-primary);
}
h2, .heading-md {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-heading-md-size);
  font-weight: var(--text-desktop-heading-md-weight);
  line-height: var(--text-desktop-heading-md-height);
  letter-spacing: var(--text-desktop-heading-md-spacing);
  color: var(--color-text-primary);
}
h3, .heading-sm {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-heading-sm-size);
  font-weight: var(--text-desktop-heading-sm-weight);
  line-height: var(--text-desktop-heading-sm-height);
  letter-spacing: var(--text-desktop-heading-sm-spacing);
  color: var(--color-text-primary);
}
h4, .heading-xs {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-heading-xs-size);
  font-weight: var(--text-desktop-heading-xs-weight);
  line-height: var(--text-desktop-heading-xs-height);
  letter-spacing: var(--text-desktop-heading-xs-spacing);
  color: var(--color-text-primary);
}
h5, .heading-2xs {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-heading-2xs-size);
  font-weight: var(--text-desktop-heading-2xs-weight);
  line-height: var(--text-desktop-heading-2xs-height);
  letter-spacing: var(--text-desktop-heading-2xs-spacing);
  color: var(--color-text-primary);
}
h6 {
  font-family: var(--font-family-base);
  font-size: var(--text-desktop-body-md-500-size);
  font-weight: var(--text-desktop-body-md-500-weight);
  line-height: var(--text-desktop-body-md-500-height);
  color: var(--color-text-primary);
}

.body-lg {
  font-size: var(--text-desktop-body-lg-size);
  font-weight: var(--text-desktop-body-lg-weight);
  line-height: var(--text-desktop-body-lg-height);
}
.body-lg-500 {
  font-size: var(--text-desktop-body-lg-500-size);
  font-weight: var(--text-desktop-body-lg-500-weight);
  line-height: var(--text-desktop-body-lg-500-height);
}
.body-md {
  font-size: var(--text-desktop-body-md-size);
  font-weight: var(--text-desktop-body-md-weight);
  line-height: var(--text-desktop-body-md-height);
}
.body-md-500 {
  font-size: var(--text-desktop-body-md-500-size);
  font-weight: var(--text-desktop-body-md-500-weight);
  line-height: var(--text-desktop-body-md-500-height);
}
.body-sm {
  font-size: var(--text-desktop-body-sm-size);
  font-weight: var(--text-desktop-body-sm-weight);
  line-height: var(--text-desktop-body-sm-height);
}
.body-sm-500 {
  font-size: var(--text-desktop-body-sm-500-size);
  font-weight: var(--text-desktop-body-sm-500-weight);
  line-height: var(--text-desktop-body-sm-500-height);
}

.caption-md {
  font-size: var(--text-desktop-caption-md-size);
  font-weight: var(--text-desktop-caption-md-weight);
  line-height: var(--text-desktop-caption-md-height);
}
.caption-md-500 {
  font-size: var(--text-desktop-caption-md-500-size);
  font-weight: var(--text-desktop-caption-md-500-weight);
  line-height: var(--text-desktop-caption-md-500-height);
}
.caption-sm {
  font-size: var(--text-desktop-caption-sm-size);
  font-weight: var(--text-desktop-caption-sm-weight);
  line-height: var(--text-desktop-caption-sm-height);
}

p {
  font-size: var(--text-desktop-body-md-size);
  line-height: var(--text-desktop-body-md-height);
  color: var(--color-text-primary);
}
p + p { margin-top: var(--spacing-12); }

a{color: var(--color-text-link);}
a:hover  { color: var(--color-text-link-hover); }
a:focus-visible {
  outline: var(--border-width-2) solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: var(--border-radius-4);
}

.rich-text ul,
.rich-text ol{
  padding-left: var(--spacing-24);
}
.rich-text ul{ list-style: disc; }
.rich-text ol { list-style: decimal; }
.rich-text ul li,
.rich-text ol li {
  margin-bottom: var(--spacing-4);
}
.rich-text ol.list-alpha {list-style-type: none; counter-reset: alpha-counter; padding-left: 1.5em;}
.rich-text ol.list-alpha li {counter-increment: alpha-counter;}
.rich-text ol.list-alpha li::before {content: counter(alpha-counter, lower-alpha) ") ";}


.rich-text ol[reversed], ol.listline {padding-left: 2.5rem; margin: 1rem 0;}
.rich-text ol[reversed] li, ol.listline li {
  padding: 0.5rem 0.75rem 0.5rem 0.25rem;
  border-bottom: 1px solid var(--color-border-default);
  line-height: 1.5;
}
.rich-text ol[reversed] li:last-child, ol.listline li:last-child {border-bottom: none;}
.rich-text ol[reversed] li:hover, ol.listline li:hover {background: var(--gray-50); border-radius: var(--radius-sm);}
.rich-text ol[reversed] li::marker, ol.listline li:marker {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9375rem;
}
.rich-text ol[reversed] li .marker, ol.listline li .marker {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin-left: 0.25rem;
}

.text-primary    { color: var(--color-text-primary)!important; }
.text-secondary  { color: var(--color-text-secondary)!important; }
.text-tertiary, .text-muted   { color: var(--color-text-tertiary)!important; }
.text-disabled   { color: var(--color-text-disabled)!important;}
.text-inverse    { color: var(--color-text-inverse)!important;}
.text-link       { color: var(--color-text-link)!important;}
.text-info       { color: var(--color-text-info)!important; }
.text-positive   { color: var(--color-text-positive)!important; }
.text-warning    { color: var(--color-text-warning)!important; }
.text-danger     { color: var(--color-text-danger)!important;}
.text-justify {text-align: justify !important;}
.schedule_light {background-color: var(--gray-120); padding: var(--spacing-8) var(--spacing-12); border-radius: var(--border-radius-8);}
.schedule {background-color: var(--color-bg-secondary); padding: var(--spacing-8) var(--spacing-12); display: inline-block; width: 100%;}
.schedule-block {
    background-color: var(--blue-sky-100);
    padding: var(--spacing-12) var(--spacing-16); 
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-8);
    width: 100%;
    margin-bottom: var(--spacing-16);
}
strong.bi-clock-history::before{padding-right: 5px;}
.schedule-block .btn {margin-left: auto;}
.schedule_public {background-color: var(--color-bg-secondary); padding: var(--spacing-8) var(--spacing-12);}
.restaurant {background-color: var(--blue-sky-100); font-weight: 600; padding: var(--spacing-8) var(--spacing-12);}
.head-bg-secondary {
    background-color: var(--color-bg-secondary);
    padding: var(--spacing-8) var(--spacing-12);
    border-radius: var(--border-radius-8);
}

span.bi::before {padding-right: var(--spacing-6);}

.alert {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md, 6px);
  border: 1px solid transparent;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
}

/* Модификаторы .alert.
 * Раньше каждый вариант описывался дважды (фон — выше по файлу, рамка/цвет —
 * здесь), причём вторая декларация молча перекрывала color из первой:
 * alert-danger терял var(--black), alert-info терял `inherit`. Блоки сведены
 * в один; итоговые значения совпадают с тем, что реально применялось.
 */
.alert.alert-danger {
  background: var(--color-bg-danger);
  border-color: #fecdca;
  color: #7a271a;
}

.alert.alert-warning {
  background: var(--color-bg-warning);
  border-color: #fedf89;
  color: #7a2e0e;
}

.alert.alert-success {
  background: var(--color-bg-positive);
  border-color: #a6f4c5;
  color: #054f31;
}

.alert.alert-info {
  background: var(--color-bg-info);
  border: 1px solid var(--blue-sky-100);
  color: #0b3a75;
}

.alert.alert-primary {
  background: var(--color-bg-neutral);
  border: 1px solid var(--gray-120);
  color: inherit;
}

.alert ul,
.alert .messages__list,
[data-drupal-messages] ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.alert li,
.alert .messages__item {
  margin: 0.25rem 0;
}

.alert *:last-child{margin-bottom: 0;}

p.text-end > span.alert {
  display: inline-block;
  width: fit-content;
  margin-left: auto;
  margin-right: 0;
}

/* Drupal status messages (AJAX / form errors) */
[data-drupal-messages] {
  width: 100%;
  margin: 0 0 1rem;
}

[data-drupal-messages] > .messages,
[data-drupal-messages] > .alert {
  margin-bottom: 0.75rem;
}

/* Fallback: core markup without theme classes (until cache clears) */
div[role="contentinfo"]:not(.alert) > div[role="alert"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md, 6px);
  border: 1px solid #fecdca;
  background: var(--color-bg-danger, #fef3f2);
  color: #7a271a;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
}

div[role="contentinfo"]:not(.alert) > div[role="alert"] ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Field-level validation under inputs */
.form-item--error-message {
  display: block;
  width: 100%;
  margin-top: 0.375rem;
  color: #b42318;
  font-size: 0.875rem;
  line-height: 1.4;
}

.form-item--error input.form-control,
.form-item--error select.form-select,
.form-item--error textarea.form-control,
.form-item.error input.form-control {
  border-color: #f04438;
}

/*
 * Bootstrap 5 .placeholder (skeleton) conflicts with Drupal message tokens:
 * <em class="placeholder">filename.pdf</em>
 */
.messages em.placeholder,
.alert em.placeholder,
[data-drupal-messages] em.placeholder,
div[role="alert"] em.placeholder,
em.placeholder {
  display: inline !important;
  min-height: 0 !important;
  vertical-align: baseline !important;
  cursor: inherit !important;
  background-color: transparent !important;
  background: none !important;
  opacity: 1 !important;
  color: inherit !important;
  font-style: italic;
  font-weight: 700;
}


@media (max-width: 767px) {
  body {
    font-size: var(--text-mobile-body-md-size);
    line-height: var(--text-mobile-body-md-height);
  }
  h1, .heading-lg {
    font-size: var(--text-mobile-heading-lg-size);
    line-height: var(--text-mobile-heading-lg-height);
  }
  .page--date-deschise-jocuri-de-noroc-nu-autorizate h1{font-size: 24px; line-height: 28px;}
  
  
  h2, .heading-md {
    font-size: var(--text-mobile-heading-md-size);
    line-height: var(--text-mobile-heading-md-height);
  }
  h3, .heading-sm {
    font-size: var(--text-mobile-heading-sm-size);
    line-height: var(--text-mobile-heading-sm-height);
  }
  h4, .heading-xs {
    font-size: var(--text-mobile-heading-xs-size);
    line-height: var(--text-mobile-heading-xs-height);
  }
  .text-display-lg {
    font-size: var(--text-mobile-display-lg-size);
    line-height: var(--text-mobile-display-lg-height);
  }
  .text-display-md {
    font-size: var(--text-mobile-display-md-size);
    line-height: var(--text-mobile-display-md-height);
  }
}

.leaflet-popup-content-wrapper *{
    font-size: 12px;
}

.min-h-72{min-height: 72px;}