@import 'colors.css';

@font-face {
  font-family: 'Roboto';
  src: url('./fonts/Roboto-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Roboto Medium';
  src: url('./fonts/Roboto-Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Font Awesome 6 Brands';
  src: url('/assets/fonts/fa-brands-400.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'FontAwesome';
  src: url('/assets/fonts/fa-solid-900.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

/* Font Awesome */
.fas {
  font-family: 'FontAwesome' !important;
}

/* Global font */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
}

/* Koniunktura style */
.koniunktura-style {
  font-family: 'Roboto';
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dark-theme .koniunktura-style {
  background-color: #000;
  border: 1px solid #fff;
  color: #fff;
  box-shadow: none;
}

/* Motywy */
.light-theme {
  background-color: var(--lt-background-color);
  color: var(--black-color);
}

/* Majechanie na link w stopce*/
.light-theme #footer a:hover,
.dark-theme #footer a:hover,
#footer .light-theme a:hover,
#footer .dark-theme a:hover{
  color: var(--blue-light-color)
}

.light-theme .navbar,
.light-theme .panel-background {
  background: #fff;
  color: var(--black-color);
}

.dark-theme,
.dark-theme #footer a {
  background-color: var(--dt-background-color);
  color: var(--white-color);
}

.dark-theme .navbar,
.dark-theme .footer,
.dark-theme .panel-background {
  background-color: var(--black-color);
  color: var(--white-color);
}

/* Przycisk w ciemnym motywie */
.dark-theme .btn-secondary {
  background-color: transparent;
  color: #fff; /* poprawione z #000 na biały */
  border: 1px solid #fff;
}

/* Global focus outline - only for keyboard navigation */
*:focus-visible {
  outline: 2px solid #888 !important;
  outline-offset: 2px;
}

.dark-theme .btn-secondary:hover,
.dark-theme .btn-secondary:focus,
.dark-theme .btn-secondary:active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid #fff;
}

.dark-theme .btn-primary {
  background-color: var(--green-color);
  color: #000;
  border: 1px solid #fff;
}

.dark-theme .btn-primary:hover,
.dark-theme .btn-primary:focus,
.dark-theme .btn-primary:active {
  background-color: var(--green-color);
  color: #000;
  border: 1px solid #fff;
}

.dark-theme .btn-primary i,
.dark-theme .btn-primary span {
  color: #000;
}

.dark-theme .btn-secondary i,
.dark-theme .btn-secondary span {
  color: #fff;
}

/* Navbar */
.navbar {
  border-bottom: 3px solid #E0E5EB;
}

.navbar-toggler:focus,
.navbar-toggler:active {
  outline: 2px solid var(--blue-light-color) !important;
  outline-offset: 2px;
  box-shadow: none !important;
}

/* Linki nawigacji */
.nav-link,
.nav-link:hover {
  color: var(--black-color);
  position: relative;
  text-decoration: none;
}

.nav-link.active {
  font-weight: bold;
}

/* Podkreślenie aktywnego linku */
.nav-link::after,
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 3px;
  transition: background-color 0.3s ease;
}

.light-theme .nav-link.active::after {
  background-color: #001D77;
}

.dark-theme .nav-link.active::after {
  background-color: #fff;
}

.nav-link:hover::after {
  background-color: #ccd1e3;
}

/* Przycisk do zmiany języka i przewodnika */
.lang-switch-btn,
.guide-switch-btn {
  background-color: transparent;
  border: none;
  border-radius: 7px;
  padding: 1px 5px;
  margin: 0 10px;
  color: var(--black-color);
}

/* Linki na stronach */
.light-theme .accessibility-page a,
.methodology-page a {
  color: #001D77;
}

.dark-theme .accessibility-page a {
  color: #fff;
}

/* Accessibility link */
.accessibility-link {
  color: white;
  font-size: 14px;
}

/* Nagłówki */
.indicator-title-paragraph,
.indicator-title-paragraph-h2,
.indicator-title-name,
.indicator-title-details,
.indicator-title-region,
.indicator-title-period {
  font-family: 'Roboto';
  width: 100%;
  text-align: center;
  margin-bottom: 5px;
  white-space: normal;
  display: block;
}

.indicator-title-paragraph {
  text-align: left;
}

.indicator-title-paragraph-h2 {
  font-size: 32px;
  margin-bottom: 30px;
}

.indicator-title-name {
  font-size: 32px;
  position: relative;
  margin-bottom: 5px;
}

.indicator-title-details {
  font-size: 24px;
}

.indicator-title-region {
  font-size: 20px;
  text-transform: uppercase;
}

.indicator-title-period {
  font-family: 'Roboto Medium';
}

/* Nagłówki na stronach accessibility i privacy */
.accessibility-h2 {
  font-size: 24px;
  font-weight: bold;
  margin: 20px 0 10px 0;
}

.accessibility-h3 {
  font-size: 20px;
  font-weight: bold;
  margin: 15px 0 8px 0;
}

/* Odpowiedniki H4, H5, H6 */
.indicator-h4 {
  font-size: 20px;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
}

.indicator-h5 {
  font-size: 16px;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
}

.indicator-h6 {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  font-family: 'Roboto', sans-serif;
}

/* Nagłówek karty na explore */
.explore-card-title {
  font-size: 16px;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
}

/* Kolory nagłówków zależnie od motywu */
.light-theme .indicator-title-name {
  color: #333;
}

.light-theme .indicator-title-details,
.light-theme .indicator-title-period {
  color: #000;
}

.light-theme .indicator-title-details a {
  color: var(--blue-light-color);
}

.dark-theme .indicator-title-details,
.dark-theme .indicator-title-period {
  color: #fff;
}

.dark-theme .indicator-title-details a {
  color: var(--blue-light-color-dark);
}

/* Loading containers */
.loading-container {
  height: 100%;
}

.loading-container-50 {
  height: 30%;
}

.loading-container-main-map {
  height: 90%;
}

/* Przycisk w stylu karty */
.btn-card-style {
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 10px;
  text-align: left;
}

/* Select menu */
.Select-menu-outer {
  font-size: 14px;
}

/* Przyciski nawigacji */
.cmp-back-btn,
.access-back-btn {
  border-radius: 10px;
  background: var(--lt-primary-right);
  padding: 10px 15px;
  border: none;
  position: relative;
  text-align: left;
  z-index: 1001;
  margin-left: 0;
}

.cmp-back-btn {
  width: 85px;
  top: 20px;
}

.access-back-btn {
  width: 250px;
  height: 40px;
  bottom: 20px;
}

/* Tabele */
table {
  width: 100%;
  margin: 5px 0;
  font-size: 16px;
  text-align: center;
  background-color: var(--white-color);
  border: none;
  border-radius: 8px;
}

.dark-theme table {
  background-color: #1e1e1e;
  color: #f0f0f0;
  border-radius: 8px;
  border: none;
}

th {
  background-color: white;
  color: black;
  font-weight: bold;
  padding: 7px;
}

td {
  padding: 7px;
  text-align: center;
}

/* Grupy w tabeli */
.table-header-group {
  font-size: 15px;
  font-weight: bold;
  background-color: #F8F9FB;
  color: black;
}

.group-row {
  font-weight: bold;
  background-color: #f4f6f8;
  text-align: center;
  color: black;
  width: 10%;
}

.left-group-value-row,
.right-group-value-row {
  text-align: left;
  width: 45%;
}

.group-value-row {
  font-weight: bold;
  text-align: center;
  color: black;
}

/* Scroll */
html {
  scroll-behavior: smooth;
}

.scroll-offset {
  scroll-margin-top: 70px;
}

.scroll-offset:target {
  animation: flash-highlight 1s ease-out;
}

/* --- CIEMNY MOTYW --- */
.dark-theme table th {
  background-color: #2a2a2a;
  color: #f0f0f0;
  font-weight: bold;
  padding: 7px;
}

.dark-theme table td {
  padding: 7px;
  text-align: center;
  color: #ddd;
  background-color: transparent;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dark-theme .table-header-group {
  background-color: #2a2a2a;
  color: #f0f0f0;
}

/* Prevent user selection on map SVG container */
.js-plotly-plot .plotly .svg-container {
  user-select: none;
  -webkit-user-select: none;
}

.js-plotly-plot .plotly .main-svg {
  user-select: none;
  -webkit-user-select: none;
}

.dark-theme .group-row {
  background-color: #333;
  color: #f0f0f0;
}

.dark-theme .left-group-value-row,
.dark-theme .right-group-value-row {
  color: #ddd;
}

.dark-theme .group-value-row {
  color: #f0f0f0;
}

@keyframes flash-highlight {
  0% {
    background-color: #ccd1e3;
  }
  100% {
    background-color: transparent;
  }
}

/* Linki i hovery */
#cmp-modal-open:hover,
#btn-lng:hover,
#btn-guide:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Kolory tła */
.bg-green {
  background-color: #B5D33D;
  color: black;
}

.bg-red {
  background-color: #E1B1C1;
  color: black;
}

.bg-gray {
  background-color: #edeeef;
  color: black;
}

/* Przycisk modalny */
.cmp-modal-btn {
  color: black;
  border: none;
  background-color: transparent;
  text-align: left;
  margin-left: 20px;
}

.cmp-modal-btn:hover {
  opacity: 0.2;
  text-decoration: underline;
}

/* Plotly wykres */
.modebar-group,
.modebar {
  background-color: transparent !important;
}

/* Akordeon */
.accordion,
.accordion-item,
.accordion-button {
  border: none !important;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  background-color: #342e68;
  color: #fff;
  border-radius: 10px !important;
}

.accordion-button.collapsed {
  background-color: #f8f9fa;
  color: #000;
  border-radius: 10px !important;
}

.accordion-button:not(.collapsed)::after {
  filter: invert(100%) !important;
  font-size: 0.8rem;
  transform: scale(0.7) rotate(180deg);
  transition: transform 0.3s ease;
}

.accordion-button.collapsed::after {
  font-size: 0.8rem;
  transform: scale(0.7) rotate(0deg);
  transition: transform 0.3s ease;
}

.accordion-item .accordion-header {
  font-size: 26px;
  font-weight: bold;
  color: #0056b3;
  border-radius: 10px;
  background-clip: padding-box;
  padding: 3px 5px;
  border: none;
}

.accordion-item {
  margin-bottom: 5px;
}

/* Jasny motyw - domyślny */
#home-left-accordion {
  color: var(--black-color);
}

/* Ciemny motyw */
.dark-theme #home-left-accordion {
  background-color: var(--black-color);
}

/* Style dla pojedynczych itemów accordion w ciemnym motywie */
.dark-theme #home-left-accordion .accordion-item {
  border-bottom: 1px solid var(--white-color);
  background-color: var(--black-color);
}

/* Style dla nagłówków accordion */
.dark-theme #home-left-accordion .accordion-button {
  background-color: var(--black-color);
  color: var(--white-color);
  border: 1px solid var(--white-color) !important;
  border-radius: 10px;
}

/* Aktywny (otwarty) accordion button */
.dark-theme #home-left-accordion .accordion-button:not(.collapsed) {
  background-color: var(--green-color);
  color: var(--black-color);
  border-color: #FFD700;
}

/* Styl kart prywatności */
.privacy-card {
  background: var(--white-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.privacy-card .card-title,
.card-title {
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 15px;
}

.privacy-card .card-text {
  flex-grow: 1;
  font-size: 16px;
  color: #333;
}

/* Ciemny motyw - opcjonalnie */
.dark-theme .privacy-card {
  background: #1e1e1e;
  color: #eee;
  box-shadow: none;
}

.dark-theme .privacy-card .card-text {
  color: #ddd;
}

/* Jasny motyw dropdown */
.custom-dropdown {
  background-color: white !important;
  color: black !important;
  /*border: 1px solid var(--black-color) !important;*/
  font-size: 12px;
}

/* Dropdown w ciemnym motywie */
.dark-theme .Select-menu,
.dark-theme .Select-menu div {
  background-color: var(--green-color) !important;
  color: black !important;
}

.dark-theme .Select-control {
  background-color: var(--black-color) !important;
  border: 1px solid var(--white-color) !important;
  color: white !important;
}

.dark-theme .Select-value-label {
  color: white !important;
}

.dark-theme .Select-arrow {
  border-top-color: white !important;
}

/* Margin bottom helper */
.mb-4 {
  margin-bottom: 0.8rem !important;
}

/* Carousel overrides */
#carousel-autoplay,
#carousel-autoplay .mantine-Carousel-slide {
  padding: 0 !important;
}

/* Indykatory */
.indicator-box {
  text-align: center;
  height: 100%;
  min-height: 15vh;
}

.indicator-h4 {
  font-size: 32px;
  font-weight: bold;
  font-family: 'Roboto', sans-serif;
}

.indicator-name {
  font-size: 12px;
  margin-bottom: 0 !important;
  font-family: 'Roboto', sans-serif;
}

.indicator-name p {
  margin: 0 !important;
}

.indicator-value {
  font-size: 32px;
  color: #001d77;
  font-family: 'Roboto Medium', sans-serif;
}

/* Małe tytuły na stronie głównej */
.home-title-small {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 1rem;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Linki ogólnie */
a {
  color: var(--black-color);
  text-decoration: none;
}

a:hover,
.dark-theme a:hover,
.light-theme .indicator-title-details a:hover,
.dark-theme .indicator-title-details a:hover {
  color: var(--green-color);
}

/* Linki w ciemnym motywie */
.dark-theme a {
  color: var(--blue-light-color-dark);
}

/* Przyciski podstawowe */
.btn-primary {
  background-color: #001d77;
  border: 2px solid #001d77;
  color: white;
  transition: background-color 0.3s, border-color 0.3s;
}

.btn-primary:hover {
  background-color: #001a66;
  border-color: #001a66;
}

.btn-secondary {
  background-color: white;
  border: 2px solid #E2E2E2;
  color: #484550;
  transition: border-color 0.3s, color 0.3s;
}

.btn-secondary:hover {
  border-color: #001d77;
  background-color: var(--white-color);
  color: #001d77;
}

/* Hover kart */
.hover-card {
  transition: background-color 0.3s ease;
  background-color: #fff;
}

.dark-theme .hover-card {
  background-color: #121212;
  color: #fff;
}

/* Plotly cursor */
.js-plotly-plot .cursor-crosshair,
.js-plotly-plot .nsewdrag,
.js-plotly-plot .draglayer .xy {
  cursor: default !important;
}

/* Select options */
.Select-option,
.Select-single-value {
  font-weight: normal !important;
}

/* Responsywność */
@media (min-width: 768px) {
  .right-tile-scroll {
    max-height: 76vh;
    overflow-y: auto;
  }
  .nav-spacing {
    margin-right: 20px;
  }
}

@media (max-width: 767.98px) {
  .right-tile-scroll {
    max-height: none;
    overflow-y: visible;
  }
  .nav-spacing {
    margin-top: 10px;
  }
}

/* Tabela bez pionowych linii */
.no-vertical-lines {
  width: 100%;
  border-collapse: collapse;
}

.no-vertical-lines td,
.no-vertical-lines th {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
