/*
Theme Name: ProStraja
Description: Editable block theme for nou.prostraja.ro.
Version: 0.1.0
Requires at least: 7.1
Requires PHP: 7.4
Text Domain: prostraja
*/

:root {
  --ps-bg: #f5f3ee;
  --ps-surface: #ffffff;
  --ps-text: #101923;
  --ps-muted: #5c6674;
  --ps-accent: #a34d00;
  --ps-action: #ff8a1f;
  --ps-ok: #1f7a45;
  --ps-stop: #c23a2a;
  --ps-tab-height: 76px;
}

html { scroll-behavior: smooth; }
body { overflow-wrap: anywhere; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  box-shadow: 0 0 0 6px var(--ps-text);
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.prostraja-site-header {
  background: color-mix(in srgb, var(--ps-surface) 94%, transparent);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgb(16 25 35 / 10%);
  margin: 1rem auto;
  max-width: min(1240px, calc(100vw - 2rem));
  padding: .65rem 1rem;
  position: relative;
  z-index: 20;
}

.prostraja-site-header .wp-block-navigation__container { align-items: center; }
.prostraja-site-header .wp-block-navigation-item__content {
  align-items: center;
  display: flex;
}

.prostraja-home-main { min-height: 60vh; }

.prostraja-hero {
  align-items: end;
  background: var(--ps-text);
  background-position: center;
  background-size: cover;
  display: flex;
  min-height: min(760px, 92svh);
  overflow: hidden;
  padding: clamp(2rem, 6vw, 6rem);
  position: relative;
}

.prostraja-hero .wp-block-cover__inner-container { max-width: 720px; }
.prostraja-hero .wp-block-buttons { gap: .75rem; }
.prostraja-hero-video {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: 0;
}
.prostraja-hero > .wp-block-cover__background,
.prostraja-hero > .wp-block-cover__inner-container { z-index: 1; }

.prostraja-mobile-tabs.is-layout-flex {
  background: var(--ps-surface);
  border: 1px solid rgb(16 25 35 / 12%);
  border-radius: 1.25rem;
  bottom: max(.5rem, env(safe-area-inset-bottom));
  box-shadow: 0 10px 34px rgb(16 25 35 / 16%);
  display: none;
  left: .75rem;
  min-height: var(--ps-tab-height);
  padding: .5rem;
  position: fixed;
  right: .75rem;
  z-index: 100;
}

.prostraja-mobile-tabs a,
.prostraja-site-header a,
.wp-element-button {
  min-height: 44px;
  min-width: 24px;
}

.prostraja-eyebrow { color: var(--ps-action); }
.prostraja-status-open { color: var(--ps-ok); }
.prostraja-status-closed { color: var(--ps-stop); }
.prostraja-status-unconfirmed { color: var(--ps-muted); }
.has-muted-color { color: var(--ps-muted) !important; }

.prostraja-lift-chip {
  background: var(--ps-bg);
  border: 1px solid rgb(16 25 35 / 14%);
  border-radius: 999px;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  padding: .55rem .7rem;
  white-space: nowrap;
}

.prostraja-home-counts {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(1.5rem, 4vw, 3rem) auto;
  max-width: min(960px, calc(100vw - 2rem));
}
.prostraja-home-count {
  align-items: center;
  background: var(--ps-surface);
  border: 1px solid rgb(16 25 35 / 12%);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}
.prostraja-home-count strong { font-size: clamp(1.75rem, 5vw, 3rem); }
.prostraja-home-count span { color: var(--ps-muted); }
.prostraja-home-counts-unavailable { color: var(--ps-muted); text-align: center; }

@media (max-width: 900px) {
  body { padding-bottom: calc(var(--ps-tab-height) + 1.5rem + env(safe-area-inset-bottom)); }
  .prostraja-mobile-tabs.is-layout-flex {
    align-items: center;
    display: flex;
    padding: .375rem;
  }
  .prostraja-mobile-tabs-nav {
    height: 100%;
    width: 100%;
  }
  .prostraja-mobile-tabs-nav .wp-block-navigation__container {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
  }
  .prostraja-mobile-tabs-nav .wp-block-navigation-item { min-width: 0; }
  .prostraja-mobile-tabs-nav .wp-block-navigation-item__content {
    align-items: center;
    display: flex;
    flex-direction: column;
    font-size: 10.5px;
    gap: 2px;
    justify-content: center;
    line-height: 1.1;
    min-height: 44px;
    min-width: 0;
    overflow: hidden;
    padding: .125rem 0;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    width: 100%;
  }
  .prostraja-mobile-tabs-nav .wp-block-navigation-item__content::before {
    background: currentColor;
    content: "";
    height: 20px;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    width: 20px;
  }
  .prostraja-mobile-tabs-nav .wp-block-navigation-item__label {
    display: block;
    max-width: calc(100% / .84);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: scaleX(.84);
    transform-origin: center;
    white-space: nowrap;
    width: calc(100% / .84);
  }
  .prostraja-mobile-tabs-nav li:nth-child(1) > a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11 12 3l9 8v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11 12 3l9 8v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .prostraja-mobile-tabs-nav li:nth-child(2) > a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m2 20 7-12 4 7 2-3 7 8H2Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m2 20 7-12 4 7 2-3 7 8H2Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .prostraja-mobile-tabs-nav li:nth-child(3) > a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6v14m18 0v-8a2 2 0 0 0-2-2H9a3 3 0 0 0-3 3v4h15M6 10V7h5v3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 6v14m18 0v-8a2 2 0 0 0-2-2H9a3 3 0 0 0-3 3v4h15M6 10V7h5v3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .prostraja-mobile-tabs-nav li:nth-child(4) > a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3v8m-3-8v5a3 3 0 0 0 6 0V3M7 11v10m8-18v18m0-18c3 2 4 5 4 8h-4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3v8m-3-8v5a3 3 0 0 0 6 0V3M7 11v10m8-18v18m0-18c3 2 4 5 4 8h-4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  }
  .prostraja-mobile-tabs-nav li:nth-child(5) > a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.8'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m5.6 5.6 4.3 4.3m4.2 4.2 4.3 4.3m0-12.8-4.3 4.3m-4.2 4.2-4.3 4.3' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.8'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m5.6 5.6 4.3 4.3m4.2 4.2 4.3 4.3m0-12.8-4.3 4.3m-4.2 4.2-4.3 4.3' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");
  }
  .prostraja-mobile-tabs-nav li:nth-child(6) > a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 5 6-2 6 2 6-2v16l-6 2-6-2-6 2V5Zm6-2v16m6-14v16' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 5 6-2 6 2 6-2v16l-6 2-6-2-6 2V5Zm6-2v16m6-14v16' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .prostraja-hero {
    min-height: 100svh;
    padding: 5rem 1rem calc(var(--ps-tab-height) + 7rem + env(safe-area-inset-bottom));
  }
  .prostraja-hero .wp-block-buttons { align-items: stretch; flex-direction: column; }
  .prostraja-hero .wp-block-button,
  .prostraja-hero .wp-block-button__link { width: 100%; }
  .prostraja-lift-chip { font-size: .6875rem; padding: .45rem .55rem; }
  .prostraja-home-counts { gap: .5rem; }
  .prostraja-home-count { padding: .75rem .25rem; }
}

@media (max-width: 380px) {
  .prostraja-site-header { padding: .5rem .65rem; }
  .prostraja-site-header .wp-block-site-title {
    font-size: .875rem;
    line-height: 1;
    white-space: nowrap;
  }
  .prostraja-lift-chip { font-size: .625rem; padding: .4rem .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
