:root {
  --color-primary: #1976d2;
  --color-info: #0288d1;
  --border-color: #dfe5e9;
  --input-bg-color: #ddedfc;
  --btn-color: #18212b;
  --btn-color-hover: #29323c;
  --btn-color-second: #3c5a8a;
  --success-color: #258000;
  --disabled-color: #a9a9a9;
  --mobile-color: #555555;
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #eeeeee;
  --color-gray-300: #e0e0e0;
  --color-gray-400: #bdbdbd;
  --color-gray-500: #9e9e9e;
  --color-gray-600: #757575;
  --color-gray-700: #616161;
  --color-gray-800: #424242;
  --color-light-blue: #e7eef5;
  --color-error: #d80909;
  --color-tooltip-link: #88b3de;
  --color-placeholder: #757575;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: "Montserrat", sans-serif;
  /* font-family: "Roboto", sans-serif; */
  /* font-family: "Lato", sans-serif; */
}

p {
  font-weight: 600;
  margin-bottom: 0.8rem;
}

hr {
  border: none;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--color-light-blue),
    var(--color-light-blue)
  );
  margin: 2rem 0;
  border-radius: 1px;
}

#app {
  width: 100%;
}

#container {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* MAIN START */
.main {
  width: 75%;
  display: flex;
  flex-direction: column;
}

.main__main {
  height: 90%;
  padding: 2rem 1rem 2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main__main_modal {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  width: 100%;
  height: 100%;
}

.main__main_modal_sidebar {
  background-color: var(--color-light-blue);
  width: 30%;
  position: relative;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.main__main_modal_sidebar_title {
  font-size: 2rem;
  font-weight: 500;
  height: 15%;
  border-bottom: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main__main_modal_sidebar_cart {
  display: flex;
  flex-direction: column;
  padding-left: 2rem;
  padding-top: 10%;
}

.main__main_modal_sidebar_cart span:nth-child(1) {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.main__main_modal_sidebar_cart span:nth-child(2) {
  font-weight: 200;
  font-size: 0.7rem;
  margin-bottom: 1rem;
}

.main__main_modal_sidebar_cart span:nth-child(3) {
  font-size: 1.9rem;
  font-weight: 600;
}

.main__main_modal_section {
  width: 70%;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 0;
  height: 100%;
  position: relative;
}

.main__main_modal_section_title {
  height: 15%;
  border-bottom: 1px solid var(--color-light-blue);
  display: flex;
  justify-content: space-around;
}

.main__main_modal_section_title div {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.main__main_modal_section_title div:nth-child(1),
.main__main_modal_section_title div:nth-child(2) {
  color: var(--color-gray-400);
}

.main__main_modal_section_title div.active {
  border-bottom: 2px solid #000;
}

.main__main_modal_section_content {
  display: flex;
  flex-direction: column;
  height: 85%;
}

#wrapper {
  height: 90%;
}

#content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-height: 100%;
}

.main__main_modal_section_content span {
  height: 10%;
  padding: 3% 0 0 5%;
  font-weight: bold;
}

.main__actions {
  height: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

img.laptop {
  /* margin: 10rem 0 0 0; */
  z-index: 999;
  position: absolute;
  width: 130%;
  bottom: 0;
}

.fa-xmark {
  position: absolute;
  right: 1rem;
  top: 1rem;
  color: var(--color-gray-500);
}
/* MAIN END */

/* CONFIG START */
.config {
  width: 25%;
  display: flex;
  flex-direction: column;
}

.config__main {
  height: 90%;
  padding: 0 1rem;
  overflow-x: hidden;
}

.config__actions {
  height: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* CONFIG END */

/* BUTTON START */
.btn {
  background-color: var(--btn-color);
  color: #fff;
  border-radius: 5px;
  padding: 1rem;
  border: none;
  outline: none;
  cursor: pointer;
  width: 305px;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background-color: var(--btn-color-hover);
}

.btn:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(50%);
}

.btn.reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 600ms linear;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}
/* BUTTON END */

/* PAPER START */
.paper {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  margin: 1rem 0;
  transition: box-shadow 0.3s ease;
  position: relative;
}
.paper:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
/* PAPER END */

/* DETAILS START */
summary {
  display: flex;
  justify-content: space-between; /* tekst po lewej, ikona po prawej */
  align-items: center;
  padding: 1em;
  list-style: none; /* Firefox */
  cursor: pointer;
  position: relative;
}

summary::-webkit-details-marker {
  display: none; /* Chrome, Edge, Safari */
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
}

details > *:not(summary) {
  margin-top: 0.5em;
}

.arrow-icon {
  transition: transform 0.3s ease;
}

.fa-circle-question {
  font-size: 0.65rem;
  font-weight: lighter;
  position: absolute;
  top: -10px;
  left: -5px;
}

.fa-circle-question.term {
  left: 0;
  top: -15px;
}

details[open] .arrow-icon {
  transform: rotate(90deg); /* obrót w prawo po rozwinięciu */
}

.details-content {
  padding: 0 1rem;
}
/* DETAILS END */

/* TOOLTIP START */
.tooltip-container {
  position: relative;
  cursor: help;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  min-width: 220px;
  max-width: 220px;
  min-height: 60px;
  width: auto;
  background-color: var(--color-gray-700);
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 0.8em 1em;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-80%) translateX(20%);
  z-index: 100000;
  transition: opacity 0.2s ease-in-out;
  font-size: 0.8rem;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tooltip-text.term {
  top: 60%;
}

.tooltip-text.first {
  transform: translateY(80%) translateX(10%);
}

.tooltip-text.json {
  left: 50%;
  transform: translateY(-110%) translateX(-50%);
  min-height: 0;
}

.tooltip-trigger:hover ~ .tooltip-text,
.tooltip-trigger:focus-within ~ .tooltip-text {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.tooltip-container .btn:disabled + .tooltip-text {
  display: block !important;
}

.tooltip-container .btn:enabled + .tooltip-text {
  display: none !important;
}
/* TOOLTIP END */

/* INPUT START */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.input-wrapper {
  display: flex;
  width: 100%;
  position: relative;
}

.input-wrapper input {
  width: 60%;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.input-wrapper::after {
  content: "";
  position: absolute;
  height: 90%;
  width: 1px;
  background-color: #ccc;
  top: 5%;
  left: 60%; /* lub konkretny offset */
  /* transform: translateY(-50%); */
  z-index: 1;
}

.input-wrapper select {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
  min-width: 40%;
}

.input-wrapper select.placeholder,
select.placeholder {
  color: var(--color-placeholder);
}

.input-select.placeholder option {
  color: #000; /* normalny kolor dla opcji */
}

.input-wrapper:hover .input-input {
  border-top: 1px solid var(--color-info);
  border-left: 1px solid var(--color-info);
  border-bottom: 1px solid var(--color-info);
  border-right: none;
}

.input-wrapper:hover .input-select {
  border-top: 1px solid var(--color-info);
  border-right: 1px solid var(--color-info);
  border-bottom: 1px solid var(--color-info);
  border-left: none;
}

.input-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.input-input {
  border: 1px solid var(--border-color);
  outline: none;
  padding: 0.9rem;
  background-color: var(--input-bg-color);
  transition: all 0.3s ease-in-out;
  border-radius: 5px;
}

.input-input:hover,
.input-input:focus {
  border: 1px solid var(--color-info);
}

.input-wrapper .input-input:hover,
.input-wrapper .input-input:focus {
  border-top: 1px solid var(--color-info);
  border-left: 1px solid var(--color-info);
  border-bottom: 1px solid var(--color-info);
  border-right: none;
}

.input-wrapper .input-input:hover ~ .input-select,
.input-wrapper .input-input:focus ~ .input-select {
  border-top: 1px solid var(--color-info);
  border-right: 1px solid var(--color-info);
  border-bottom: 1px solid var(--color-info);
  border-left: none;
}

.input-select {
  border: 1px solid var(--border-color);
  outline: none;
  padding: 0.9rem;
  background-color: var(--input-bg-color);
  transition: all 0.3s ease-in-out;
  border-radius: 5px;
  /* font-size: 1rem; */
  color: inherit;
  /* appearance: none; */
  cursor: pointer;
}

.input-select:hover {
  border: 1px solid var(--color-info);
}
/* INPUT END */

/* COLOR PICKER START */
.color-picker {
  margin-bottom: 1rem;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  background: #fff;
  position: relative;
}

.color-picker-wrapper.error::after {
  content: "Niepoprawny kod koloru";
  position: absolute;
  color: red;
  bottom: -1.1rem;
  left: 0;
  font-size: small;
}

.color-preview {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: #b3b3b3;
  border: 1px solid #999;
  flex-shrink: 0;
  cursor: pointer;
}

/* Pole tekstowe z kodem koloru */
.color-code {
  flex-grow: 1;
  border: none;
  font-family: monospace;
  font-size: 1rem;
  outline: none;
  max-width: 100px;
}

/* Ukrywamy natywny input color, ale jest cały klikany */
.color-input {
  position: absolute;
  opacity: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.color-label {
  font-size: 0.9rem;
  font-weight: 600;
}
/* COLOR PICKER END */

/* MOBILE START */
#mobile_wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#mobile_wrapper span {
  color: var(--mobile-color);
  font-weight: bold;
  font-size: xx-large;
  text-align: center;
}
/* MOBILE END */

.form-control {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.toggle__group {
  display: flex;
  justify-content: space-between;
}

.toggle__group span {
  font-size: 0.9rem;
  font-weight: 600;
}

.toggle__wrapper {
  display: flex;
  cursor: pointer;
}

/* TOGGLE START */
.toggle__fill {
  position: relative;
  width: 2rem;
  height: 1rem;
  border-radius: 0.5rem;
  background-color: var(--color-gray-400);
  transition: background-color 0.2s;
}

.toggle__fill::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 0.5rem;
  background-color: var(--color-white);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}

input[type="checkbox"].toggle__input {
  width: 0;
  height: 0;
  visibility: hidden;
}

input[type="checkbox"].toggle__input:checked + .toggle__fill {
  background-color: var(--color-info);
}

input[type="checkbox"].toggle__input:checked + .toggle__fill::after {
  transform: translateX(100%);
}

input[type="checkbox"].toggle__input:disabled ~ .toggle__fill {
  background-color: var(--color-gray-600);
}

input[type="checkbox"].toggle__input:disabled ~ .toggle__fill::after {
  background-color: var(--color-gray-500);
}
/* TOGGLE END */

/* BACKDROP START */
#backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}
/* BACKDROP END */

/* LOADER START */
.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-bottom-color: var(--color-info);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* LOADER END */

/* SNIPPET START */
.snippet-box {
  background-color: #1e1e1e;
  color: #fff;
  border-radius: 5px;
  padding: 1rem;
  max-height: 75vh;
  min-width: 25vw;
  max-width: 75vw;
  overflow: auto;
  font-family: monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  padding-right: calc(1rem + 8px);
}
.btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.copy-btn,
.close-btn {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #444;
  color: #fff;
  transition: background 0.3s ease;
}

.copy-btn:hover,
.close-btn:hover {
  background-color: #666;
}

.copy-btn.copied {
  background-color: #4caf50;
}
/* SNIPPET END */

/* SIMPLEBAR START */
[data-simplebar] {
  position: relative;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  align-items: flex-start;
}

.simplebar-wrapper {
  overflow: hidden;
  width: inherit;
  height: inherit;
  max-width: inherit;
  max-height: inherit;
}

.simplebar-mask {
  direction: inherit;
  position: absolute;
  overflow: hidden;
  padding: 0;
  margin: 0;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: auto !important;
  height: auto !important;
  z-index: 0;
}

.simplebar-offset {
  direction: inherit !important;
  box-sizing: inherit !important;
  resize: none !important;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 0;
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

.simplebar-content-wrapper {
  direction: inherit;
  box-sizing: border-box !important;
  position: relative;
  display: block;
  height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */
  width: auto;
  max-width: 100%; /* Not required for horizontal scroll to trigger */
  max-height: 100%; /* Needed for vertical scroll to trigger */
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.simplebar-content-wrapper::-webkit-scrollbar,
.simplebar-hide-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.simplebar-content {
  position: relative;
}

.simplebar-content:before,
.simplebar-content:after {
  content: " ";
  display: table;
}

.simplebar-placeholder {
  max-height: 100%;
  max-width: 100%;
  width: 100%;
  pointer-events: none;
}

.simplebar-height-auto-observer-wrapper {
  box-sizing: inherit !important;
  height: 100%;
  width: 100%;
  max-width: 1px;
  position: relative;
  float: left;
  max-height: 1px;
  overflow: hidden;
  z-index: -1;
  padding: 0;
  margin: 0;
  pointer-events: none;
  flex-grow: inherit;
  flex-shrink: 0;
  flex-basis: 0;
}

.simplebar-height-auto-observer {
  box-sizing: inherit;
  display: block;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 1000%;
  width: 1000%;
  min-height: 1px;
  min-width: 1px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.simplebar-track {
  z-index: 1;
  position: absolute;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

[data-simplebar].simplebar-dragging {
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

[data-simplebar].simplebar-dragging .simplebar-content {
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

[data-simplebar].simplebar-dragging .simplebar-track {
  pointer-events: all;
}

.simplebar-scrollbar {
  position: absolute;
  left: 0;
  right: 0;
  min-height: 10px;
}

.simplebar-scrollbar:before {
  position: absolute;
  content: "";
  background: var(--color-info);
  border-radius: 7px;
  left: 2px;
  right: 2px;
  opacity: 0;
  transition: opacity 0.2s 0.5s linear;
}

.simplebar-scrollbar.simplebar-visible:before {
  opacity: 0.5;
  transition-delay: 0s;
  transition-duration: 0s;
}

.simplebar-track.simplebar-vertical {
  top: 0;
  width: 11px;
}

.simplebar-scrollbar:before {
  top: 2px;
  bottom: 2px;
  left: 2px;
  right: 2px;
}

.simplebar-track.simplebar-horizontal {
  left: 0;
  height: 11px;
}

.simplebar-track.simplebar-horizontal .simplebar-scrollbar {
  right: auto;
  left: 0;
  top: 0;
  bottom: 0;
  min-height: 0;
  min-width: 10px;
  width: auto;
}

/* Rtl support */
[data-simplebar-direction="rtl"] .simplebar-track.simplebar-vertical {
  right: auto;
  left: 0;
}

.simplebar-dummy-scrollbar-size {
  direction: rtl;
  position: fixed;
  opacity: 0;
  visibility: hidden;
  height: 500px;
  width: 500px;
  overflow-y: hidden;
  overflow-x: scroll;
  -ms-overflow-style: scrollbar !important;
}

.simplebar-dummy-scrollbar-size > div {
  width: 200%;
  height: 200%;
  margin: 10px 0;
}

.simplebar-hide-scrollbar {
  position: fixed;
  left: 0;
  visibility: hidden;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
/* SIMPLEBAR END */

/* TOAST START */
.toast-wrapper {
  position: relative;
  pointer-events: auto;
}

.toast-wrapper a {
  color: var(--color-tooltip-link);
  text-decoration: none;
  /* font-weight: normal; */
}

.toast-wrapper pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.toast-close {
  pointer-events: auto;
  position: absolute;
  top: -1rem;
  right: 0;
  background: transparent;
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.toast-close:hover {
  transform: scale(1.2);
}

.toast-close > .fa-xmark {
  top: 0;
  left: 0;
  color: white;
}

div:where(.swal2-container).swal2-top > .swal2-popup {
  position: relative;
  pointer-events: none;
}

.swal2-toast-success {
  background-color: #2ecc71 !important;
  color: white;
}
.swal2-toast-error {
  background-color: #e74c3c !important;
  color: white;
}
.swal2-toast-info {
  background-color: #3498db !important;
  color: white;
}
.swal2-toast-warning {
  background-color: #f39c12 !important;
  color: white;
}

/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
