html {
  min-height: 100%;
  color-scheme: light;
}

html[data-bs-theme="dark"] {
  color-scheme: dark;

  body {
    background-image: linear-gradient(90deg, rgba($black, 0.2), rgba($black, 0.5), rgba($black, 0.5), rgba($black, 0.2)), url('/plik/res/svg/rsch_ptt_wt.svg');
  }

  body section,
  .card,
  .card .card-header,
  .card .card-body,
  .card .card-title,
  .card .card-text,
  .card .card-subtitle {
    color: $white;
  }

  main h1,
  main h2,
  main h3,
  main h4,
  main h5,
  main h6,
  main .h1,
  main .h2,
  main .h3,
  main .h4,
  main .h5,
  main .h6,
  .card-header,
  .card-header h1,
  .card-header h2,
  .card-header h3,
  .card-header h4,
  .card-header h5,
  .card-header h6,
  .modal-title,
  .accordion-button {
    color: $white;
  }

  form .form-label,
  form .col-form-label {
    color: $white;
  }

  .form-control,
  .form-select,
  .form-control-plaintext {
    color: $white;
  }

  .form-control::placeholder,
  .form-select::placeholder {
    color: rgba($white, 0.72);
    opacity: 1;
  }

  a:not(.btn) {
    color: $white;
  }

  a:not(.btn):hover,
  a:not(.btn):focus {
    color: var(--bs-primary);
  }

  .dropdown-menu {
    @include glass(.55, $black);
    background-color: rgba($black, 0.57) !important;
    color: $white;
    border-color: rgba($white, 0.18);
  }

  .dropdown-item {
    color: $white !important;
  }

  .dropdown-item:hover,
  .dropdown-item:focus,
  .dropdown-item.active,
  .dropdown-item:active {
    color: $white !important;
    background-color: rgba($white, 0.12) !important;
  }

  .dropdown-divider {
    border-top-color: rgba($white, 0.2);
  }

  .alert,
  .alert p,
  .alert li,
  .alert strong,
  .alert a:not(.btn),
  .alert .alert-link {
    color: $white;
  }

  .alert a:not(.btn):hover,
  .alert a:not(.btn):focus,
  .alert .alert-link:hover,
  .alert .alert-link:focus {
    color: rgba($white, 0.85);
  }

  .alert .btn-close {
    filter: invert(1) grayscale(100%);
  }

  .text-muted,
  .text-body-secondary {
    color: $rs-blue-light !important;
  }

  .rg-tag.btn-outline-dark {
    color: $gray-200;
    border-color: rgba($white, 0.4);
  }

  .rg-tag.btn-outline-dark:hover,
  .rg-tag.btn-outline-dark:focus {
    color: $white;
    border-color: rgba($white, 0.65);
    background-color: rgba($white, 0.08);
  }

  .form-switch .form-check-input:not(:checked):not(:focus) {
    border-color: rgba($white, 0.42);
    background-color: rgba($white, 0.2);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23111'/%3e%3c/svg%3e");
  }

  .header::before {
    @include glass(.55, $black);
  }

  .rg-section-ultralight {
    @include glass(.82, $rs-blue-dark);
    color: $white;

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      color: $white;
    }
  }

  .rg-icon-circle-primary {
    @include glass(.78, $rs-blue-dark);
    border-color: rgba($white, 0.22);
  }

  .rg-communication-item {
    @include glass(.42, $black);
    border-color: rgba($white, 0.16) !important;
    color: $white;

    .text-muted,
    .small.text-muted {
      color: rgba($white, 0.72) !important;
    }

    a:not(.btn) {
      color: $white;
    }

    a:not(.btn):hover,
    a:not(.btn):focus {
      color: rgba($white, 0.85);
    }
  }

  .rg-message-preview {
    @include glass(.4, $black);
    border-color: rgba($white, 0.16) !important;
    color: $white;

    a:not(.btn) {
      color: $white;
    }

    a:not(.btn):hover,
    a:not(.btn):focus {
      color: rgba($white, 0.85);
    }
  }
}

html,
body {
  overflow-x: clip;
}

// .container {
//   max-width: 1100px;
// }

// RG: ADDITIONAL STYLES

.footer-social a {
  font-size: 2rem;
  margin: 0 0rem;
}

.footer {
  width: 100%;
}



.btn , .btn-sm, .btn-lg {     
  margin-bottom: 0.2rem; margin-top: 0.2rem; 
}         // base adjustment

form .has-danger {
  margin-bottom: 1rem;
}

form .form-label,
form .col-form-label {
  font-family: $headings-font-family;
  font-weight: 400;
  color: $headings-color;
}

form h6.card-text,
form h6.card-subtitle {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.card {
  margin-bottom: 1rem;
}

@supports (animation-timeline: view()) {
  @keyframes rg-soft-reveal {
    from {
      transform: translateY(var(--rg-reveal-move, 28px)) scale(var(--rg-reveal-scale, 0.92)) rotate(var(--rg-reveal-rotate, -2deg));
      filter: saturate(0.82) contrast(0.9);
    }
    to {
      transform: translateY(0) scale(1) rotate(0deg);
      filter: saturate(1) contrast(1);
    }
  }

  @keyframes rg-soft-reveal-sm {
    from {
      transform: translateY(var(--rg-reveal-move-sm, 14px)) scale(var(--rg-reveal-scale-sm, 0.96)) rotate(var(--rg-reveal-rotate-sm, -1deg));
      filter: saturate(0.9) contrast(0.95);
    }
    to {
      transform: translateY(0) scale(1) rotate(0deg);
      filter: saturate(1) contrast(1);
    }
  }

  .rg-event-thumb,
  .rg-icon-circle-primary,
  .rg-circle,
  img.object-fit-cover,
  .btn,
  .alert,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    animation-name: rg-soft-reveal;
    animation-duration: 900ms;
    animation-timing-function: cubic-bezier(.22, .61, .36, 1);
    animation-fill-mode: both;
    animation-timeline: view();
    will-change: transform, filter;
    backface-visibility: hidden;
  }

  p {
    animation-name: rg-soft-reveal-sm;
    animation-duration: 900ms;
    animation-timing-function: cubic-bezier(.22, .61, .36, 1);
    animation-fill-mode: both;
    animation-timeline: view();
    will-change: transform, filter;
    backface-visibility: hidden;
  }

  .rg-event-thumb,
  .rg-icon-circle-primary,
  .rg-circle,
  img.object-fit-cover,
  .alert {
    animation-range: entry 0% cover 45%;
  }

  .btn,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p {
    animation-range: entry 0% cover 15%;
  }

  .rg-event-thumb,
  .rg-icon-circle-primary,
  .rg-circle,
  img.object-fit-cover,
  .btn,
  .alert,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p {
    transform-origin: center center;
  }

  .rg-event-thumb,
  img.object-fit-cover {
    --rg-reveal-move: 56px;
    --rg-reveal-scale: 0.8;
    --rg-reveal-rotate: -2.4deg;
  }

  .rg-icon-circle-primary,
  .rg-circle {
    --rg-reveal-move: 34px;
    --rg-reveal-scale: 0.78;
  }

  .btn {
    --rg-reveal-move: 20px;
    --rg-reveal-scale: 0.94;
    --rg-reveal-rotate: 0deg;
  }

  .alert {
    --rg-reveal-move: 16px;
    --rg-reveal-scale: 0.97;
    --rg-reveal-rotate: 0deg;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    --rg-reveal-move: 24px;
    --rg-reveal-scale: 0.94;
    --rg-reveal-rotate: 0deg;
  }

  p {
    --rg-reveal-move-sm: 12px;
    --rg-reveal-scale-sm: 0.97;
    --rg-reveal-rotate-sm: 0deg;
  }

  .modal .rg-event-thumb,
  .modal .rg-icon-circle-primary,
  .modal .rg-circle,
  .modal img.object-fit-cover,
  .modal .btn,
  .modal .alert,
  .modal h1,
  .modal h2,
  .modal h3,
  .modal h4,
  .modal h5,
  .modal h6,
  .modal p,
  .cookie-consent-modal .rg-event-thumb,
  .cookie-consent-modal .rg-icon-circle-primary,
  .cookie-consent-modal .rg-circle,
  .cookie-consent-modal img.object-fit-cover,
  .cookie-consent-modal .btn,
  .cookie-consent-modal .alert,
  .cookie-consent-modal h1,
  .cookie-consent-modal h2,
  .cookie-consent-modal h3,
  .cookie-consent-modal h4,
  .cookie-consent-modal h5,
  .cookie-consent-modal h6,
  .cookie-consent-modal p {
    animation: none;
  }

  @media (prefers-reduced-motion: reduce) {
    .rg-event-thumb,
    .rg-icon-circle-primary,
    .rg-circle,
    img.object-fit-cover,
    .btn,
    .alert,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p {
      animation: none;
    }
  }
}

.rg-communication-item {
  @include glass(.38, $white);
  border-color: rgba($rs-blue, 0.12) !important;
}

.rg-message-preview {
  @include glass(.34, $white);
  border-color: rgba($rs-blue, 0.12) !important;
}

.form-check-input:not(:checked) {
  border-color: $input-border-color;
  background-color: rgba($white, 0.9);
}

.attendance-switch {
  width: fit-content;
  margin-left: auto;
}

.attendance-row {
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;

  > [class^="col-"] {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
  }

  .collapse {
    margin-top: 0.25rem;
  }
}

.attendance-row-cancelled {
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
}

.rg-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  color: inherit;
  text-decoration: none;

  &:hover,
  &:focus {
    color: inherit;
    text-decoration: none;
  }
}

.rg-collapse-toggle-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

[data-bs-toggle="collapse"][aria-expanded="true"] .rg-collapse-toggle-icon {
  transform: rotate(180deg);
}

[data-bs-toggle="collapse"][aria-expanded="false"] .rg-collapse-toggle-icon {
  transform: rotate(0deg);
}

.rg-section-blue {
  @include glass(.3, $rs-blue);
  text-align: center;
  h5 {
    color: $white;
  }
}

.rg-section-dark {
  @include glass(.4, $rs-blue);
  text-align: center;
  color: $white;
  h1 {
    color: $white;
  }
}

.rg-section-ultradark {
  @include glass(.7, $rs-blue-dark);
  text-align: center;
  color: $white;
  h1 {
    color: $white;
  }
}

.rg-section-ultralight {
  @include glass(.3, $rs-blue-ultralight);
  text-align: center;
  color: $rs-blue-ultradark;
  h1 {
    color: $rs-blue-ultradark;
  }
}

.rg-icon-circle-primary {
    @include glass(.5, $rs-blue-ultralight);
    // background-color: rgba($rs-blue-ultralight, .5); 
    // backdrop-filter: blur(1px);
    border: 1px solid $primary; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    width: 4rem;         
    height: 4rem;
    font-size: 2rem;  

    i {
      color: $primary;
    }

    &.icon-xs {
        width: 3rem;         
        height: 3rem;
        i {
          font-size: 1.5rem;  
        }
    }

    &.icon-sm {
        width: 4rem;         
        height: 4rem;
        i {
          font-size: 2rem;  
        }
    }
    
    &.icon-md {
        width: 6rem;         
        height: 6rem;
        i {
          font-size: 3rem;  
        }
    }
}

.rg-waitlist-card {
  @include glass(.28, $rs-blue-ultralight);
  border: 1px solid rgba($primary, 0.18);
}

.rg-waitlist-table-wrap {
  @include glass(.2, $white);
  border: 1px solid rgba($primary, 0.12);
  border-radius: 1rem;
  overflow: hidden;
}

.rg-waitlist-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rg-waitlist-item {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.65rem 0;
  margin: 0;
  border-bottom: 1px solid rgba($primary, 0.14);

  .row {
    --bs-gutter-x: 0.9rem;
    --bs-gutter-y: 0.5rem;
  }

  .row > [class*="col-"] {
    min-width: 0;
  }

  .btn {
    animation: none !important;
    animation-timeline: auto !important;
    transform: none !important;
    filter: none !important;
  }

  .rg-tag,
  .rg-tag.btn {
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
  }

  .btn,
  .badge,
  .rg-tag {
    margin-top: 0;
    margin-bottom: 0;
  }
}

.rg-waitlist-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 0.25rem;
  row-gap: 0.2rem;

  .rg-tag,
  .badge {
    margin: 0;
  }

  .rg-tag.btn {
    padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
    line-height: var(--bs-btn-line-height);
  }

  .badge {
    padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x);
    line-height: 1;
  }
}

html[data-bs-theme=dark] {
  .rg-section-ultralight {
    a:not(.btn) {
      color: $white;
    }

    a:not(.btn):hover,
    a:not(.btn):focus {
      color: rgba($white, 0.85);
    }
  }
}

.header::before{
  @include glass(.3, $rs-blue-ultralight);
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5rem; 
	pointer-events: none;
	z-index: 0;
}


.strong, strong {
  font-weight: 800;
}

hr {
  border: none;
  border-top: $hr-border-width solid var(--bs-primary-border-subtle);
  margin: 1.5rem 0;
  opacity: 0.5;
}

.border-bottom.border-primary-subtle {
  border-bottom-color: color-mix(in srgb, var(--bs-primary-border-subtle) 50%, transparent) !important;
}

a:hover i.fa-facebook {
  color: #1877F2 !important;
  transition: color 0.3s;
}

a:hover i.fa-youtube {
  color: #FF0000 !important;
  transition: color 0.3s;
}


a:hover i.fa-instagram {
  color: #C13584 !important;
  transition: color 0.3s;
}

a:hover i.fa-whatsapp {
  color: #25D366 !important;
  transition: color 0.3s;
}


// RG: FONTS


/* material-icons-outlined-regular - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Material Icons Outlined';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/material-icons-outlined-v109-latin-regular.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* material-symbols-outlined-300 - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/material-symbols-outlined-v226-latin-300.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  vertical-align: text-top;
  line-height: 1;
  font-weight: 300;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
}

.material-symbols-outlined.md-28 {
  font-size: 28px !important;
}

.material-symbols-outlined.md-20 {
  font-size: 20px !important;
}

.material-symbols-outlined.md-24 {
  font-size: 24px !important;
}

.material-symbols-outlined.md-18 {
  font-size: 18px !important;
}

.material-symbols-outlined.md-16 {
  font-size: 16px !important;
}





// RG Tiles
.rg-tiles-container {

  .card-img-link {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    aspect-ratio: 1 / 1; /* Force square ratio */
  }
  .card-img-link img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover; /* Crop non-square images to fill the square */
    transition: filter 0.3s ease;
  }
  /* minimal card padding */
  .col-6.col-md-4.col-lg-3 {
    padding-left: 3px;
    padding-right: 3px;
    margin-bottom: 3px !important;
  }
  .card-body {
    padding: 8px !important;
  }
  .card {
    margin-bottom: 2px !important;
    margin-top: 2px !important;
  }
  .overlay-button {
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    text-align: center;
    color: #fff;
    
    padding: 0.5rem 0;
  }
  /* desktop button: hidden on larger screens, visible on small screens only */
  .dsktp-btn {
    display: none;
  }
   /* Always show on small screens (mobile) */
   @media (max-width: 575.98px) {
     .overlay-button {
       display:none
     }
    .dsktp-btn {
      display: block;
      text-align: center;
      margin-top: 6px;
    }
   }
  /* Hide initially and reveal on hover for larger screens */
  @media (min-width: 576px) {
    .overlay-button {
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    /* apply hover effect when cursor is over the whole card (not only the image) */
    .card:hover .card-img-link img {
      filter: brightness(80%);
    }
    .card:hover .overlay-button {
      opacity: 1;
    }
  }
  h2, h4 {
    text-transform: uppercase !important;
  }

}

.card-img-top {
  width: 100%; 
  aspect-ratio: 1/1; 
  object-fit: cover; 
  object-position: center;
}

.rg-event-thumb {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.rg-map-rounded {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

html[data-bs-theme="dark"] .leaflet-control-zoom a {
  color: #0f172a !important;
  text-shadow: none;
  background-color: #ffffff;
}

html[data-bs-theme="dark"] .leaflet-control-zoom a:hover,
html[data-bs-theme="dark"] .leaflet-control-zoom a:focus {
  color: #0f172a !important;
  background-color: #f1f5f9;
}

html[data-bs-theme="dark"] .leaflet-control-attribution,
html[data-bs-theme="dark"] .leaflet-control-attribution a,
html[data-bs-theme="dark"] .leaflet-control-attribution a:hover,
html[data-bs-theme="dark"] .leaflet-control-attribution a:focus {
  color: #0f172a !important;
}

.dev-environment-corner {
  --dev-environment-marker-color: #dc3545;
  --dev-environment-marker-label: "DEV";

  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 50px;
  z-index: 2147483647;
  pointer-events: none;
  border-top: 5px solid var(--dev-environment-marker-color);
  background: linear-gradient(135deg, var(--dev-environment-marker-color) 0 50%, transparent 50%) 0 0 / 46px 46px no-repeat;

  &::after {
    content: var(--dev-environment-marker-label);
    position: absolute;
    top: 5px;
    left: 5px;
    width: auto;
    color: #111;
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.45);
  }

  &--test {
    --dev-environment-marker-color: #ffb624;
  }

  &--local {
    --dev-environment-marker-color: #31961a;
    --dev-environment-marker-label: "LOC";
  }
}
