/* General Styles */
:root {
  /* --primary-color: #25d46e;  */
  --primary-color: #00d4aa;
  --primary-hover: #00b892;
  --fill-color: #c1c6cb; /**/
  --font-color: #6d777e; /**/
  --gray: #f1f1f1; /**/
  --small-input: #ffffff;

  --light-gray: #fff;
  --dark-gray: #e9e9e9;
  --border-dark: #dcdcdc;
  --shadow: #a6a6a682;
  --drag-border: #acacadcc;
  --drag-background: #07b8835e;
  --font-color2: #4f4f4f;

  --primary-light: #00d4aa52;

  --drag-border: #00d4aa80;
  /* --drag-background: #00d4aa15; */
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Dark mode colors */
:root.dark-mode {
  --light-gray: #171d20;
  --dark-gray: #19191e; /**/
  --border-dark: #00000040; /**/
  --font-color: #c1c6cb; /**/
  --fill-color: #6d777e; /**/
  --dark-background: #004cff; /**/
  --gray: #1b2226;
  --small-input: #1c232c;

  --drag-border: #535353cc;
  --drag-background: #00ca8e3f;
  --primary-light: #00d4aa20;

  --font-color2: #ffffff; /**/

  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);

  /* --gray: #1f1e23;
    --dark-gray: #0f0f11;
    --light-gray: #26252a;
    --border-dark: #2b2a30;
    --shadow: #31313182;
    --drag-border: #535353cc;
    --drag-background: #3f3f3fcc;
    --font-color2: #ececec; */
}

body {
  margin: 0;
  padding: 0;
}

.currency-converter-ex .popup-container {
  font-family: Roboto flex;
  color: var(--font-color) !important;
  width: 330px;
  overflow: hidden;
  height: auto;
  min-height: 410px;
  position: relative;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
}

/* Header */
.currency-converter-ex .header {
  display: flex;
  align-items: center;
  color: var(--font-color2);
  padding: 4px 0 4px 50px;
  font-weight: 500;
  font-size: 18px;
  padding-left: 34px;
  height: 50px;
  width: 100%;
  background: var(--light-gray);
  border: none;
}

.currency-converter-ex .header img {
  width: 24px;
  margin-right: 16px;
}

.currency-converter-ex #currency-container {
  min-height: 132px;
  height: fit-content;
  min-height: 254px;
  max-height: 288px;
  overflow-y: overlay;
  background: var(--light-gray);
  align-items: center;
  display: flex;
  flex-direction: column;
  width: 100%;
  scrollbar-color: #6e6e6e73 transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.currency-converter-ex label {
  font-weight: 300;
  color: var(--font-color2);
  align-self: center;
}

/* Currency Input */
.currency-converter-ex .currency-input {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 33px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: transparent solid 1px;
  border-radius: 8px;
  margin: 5px 0px 5px 9px;
  background: var(--gray);
  padding: 0;
  width: 270px;
}

.currency-converter-ex .currency-input:hover {
  transform: scale(1.01);
}

.currency-converter-ex .currency-input input {
  width: 100%;
  padding: 5px;
  font-size: 16px;
  text-align: left;
  margin-left: 0;
  margin-right: auto;
  background: transparent;
  border: none;
  color: var(--font-color);
}

.currency-converter-ex .currency-input input:focus-visible {
  outline: none;
  border: none;
}

.currency-converter-ex .currency-input button {
  text-align: center;
  color: var(--font-color2);
  border: none;
  border-radius: 50%;
  font-size: 17px;
  font-weight: bold;
  height: 24px;
  width: 24px;
  margin: 4px;
  fill: var(--fill-color);
  background: transparent;
  z-index: 1;
}

.currency-converter-ex .currency-input button:hover {
  fill: #fb0c04;
  transition: fill 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    fill 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Add Currency */
.currency-converter-ex .add-currency {
  text-align: center;
  display: flex;
  padding: 4px;
  fill: white;
  margin: auto;
  width: 268px;
}

.currency-converter-ex .add-currency button:hover:not(.expanded) {
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    fill 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--primary-color) !important;
  fill: white !important;
}
.currency-converter-ex #tax-btn:hover {
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    fill 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--primary-color);
}
.currency-converter-ex #tax-btn.expanded:hover {
  background: var(--gray);
}

.currency-converter-ex #add-currency-btn,
.currency-converter-ex #support-dev-btn,
.currency-converter-ex #tax-btn,
.currency-converter-ex #dark-mode-btn {
  display: flex;
  cursor: pointer;
  height: 24px;
  width: 24px;
  border: transparent solid 1px;
  border-radius: 50%;
  justify-content: center;
  margin-left: 5px;
  align-self: center;
  background: var(--gray);
  fill: var(--font-color);
}
.currency-converter-ex #tax-btn {
  transition: width 0.3s ease;
}
.currency-converter-ex #tax-btn svg {
  width: 12px;
  height: 12px;
  position: absolute;
  align-self: center;
}

.currency-converter-ex #dark-mode-btn {
  margin-left: auto;
}

/* Currency Dropdown
.currency-converter-ex #currency-dropdown {
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  margin-top: 5px;
  padding: 5px;
  max-height: 150px;
  overflow-y: auto;
} */

.currency-converter-ex .currency-option {
  padding: 5px 10px;
  cursor: pointer;
}

/* Replace the existing .hidden and .show classes with these: */

.currency-converter-ex .hidden {
  transform: translateX(400px);
}

.currency-converter-ex .show {
  transform: translateX(0px);
}

/* Make sure the currency-tab has the transition property */
.currency-converter-ex .currency-tab {
  position: fixed;
  top: 0;
  width: 380px;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* This enables the smooth transition */
  height: 100%;
  overflow: hidden;
  background: var(--light-gray);
  border-bottom: var(--border-dark) solid 1px;
  z-index: 3;
}

.currency-converter-ex #currency-list {
  overflow-y: overlay;
  /* Enable scrolling for the currency options */
  height: calc(100% - 70px);
  /* Adjust height to account for the sticky title */
  position: relative;
  scrollbar-color: #6e6e6e73 transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.currency-converter-ex .currency-option {
  width: 308px;
  padding: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  border-bottom: var(--border-dark) solid 1px;
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-converter-ex .currency-active {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border: solid 1px var(--primary-color);
}

.flag {
  margin-right: 6px;
  border-radius: 2px;
  width: 24px;
  height: 24px;
  margin-left: 4px;
}

.currency-converter-ex .fi {
  margin: 4px 4px 5px 4px;
  font-size: 16px;
  /* Adjust the size of the flag */
  border-radius: 3px;
  /* Optional: Add rounded corners */
}

.currency-converter-ex .title {
  padding: 0 0 0 20px;
  margin: 0;
  display: flex;
  height: 70px;
  align-items: center;
  overflow: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: var(--font-color2);
  /* border-bottom: 2px solid var(--border-dark); */
  box-shadow: 0px 2px 10px 1px var(--border-dark);
  background: var(--light-gray);
  position: sticky;
  top: 0;
  z-index: 1;
}

.currency-converter-ex .hide-tab {
  width: 28px;
  height: 28px;
  fill: var(--font-color2);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* This enables the smooth transition */
}
.currency-converter-ex .hide-tab:hover {
  fill: var(--primary-color);
}

.currency-converter-ex .convert-select {
  /* font-weight: 400; */
  font-size: 12px;
  padding: 4px;
}

.currency-converter-ex .text-field {
  color: var(--font-color);
  font-style: italic;
  padding: 5px 5px 5px 0px;
  font-size: 14px;
  overflow-y: auto;
  white-space: nowrap;
  border-radius: 8px;
  width: 268px;
  margin: auto;
  scrollbar-color: rgba(110, 110, 110, 0.45) transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.currency-converter-ex .container {
  height: fit-content;
  width: 100%;
  position: relative;
  background: var(--light-gray);
  z-index: 2;
}

.currency-converter-ex .last-update {
  min-height: 30px;
  height: fit-content;
  padding: 5px;
  color: var(--font-color);
  text-align: center;
  font-size: 13px;
  width: 268px;
  margin: auto;
}

.currency-converter-ex .green {
  color: #03d59b;
  font-weight: bold;
  background: var(--dark-gray);
  padding: 1px 4px;
  border-radius: 4px;
}

.currency-converter-ex .red {
  color: #f8312f;
  font-weight: bold;
  background: var(--dark-gray);
  padding: 1px 4px;
  border-radius: 4px;
}

.currency-converter-ex .orange {
  color: #ffa500;
  font-weight: bold;
  background: var(--dark-gray);
  padding: 1px 4px;
  border-radius: 4px;
}

.currency-converter-ex .date {
  background: var(--dark-gray);
  padding: 1px 4px;
  border-radius: 4px;
}

.currency-converter-ex .offline {
  background: #ffe7b9;
}

/* Hide default checkbox */
.currency-converter-ex .switch {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 16px;
}

.currency-converter-ex .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Toggle background */
.currency-converter-ex .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  background-color: var(--dark-gray);
}

/* Toggle button */
.currency-converter-ex .slider::before {
  content: "";
  position: absolute;
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Checked State */
.currency-converter-ex input:checked + .slider {
  background-color: var(--primary-color);
}

.currency-converter-ex input:checked + .slider::before {
  transform: translateX(15px);
}

.currency-converter-ex .currency-info {
  display: flex;
  width: 140px;
  /* background: var(--dark-gray); */
  justify-content: center;
  align-items: center;
  border-radius: 7px 0 0 7px;
  padding: 1px;
  height: 31px;
}

.currency-converter-ex #dark-mode-btn.active {
  border: 2px solid var(--primary-color);
}
.currency-converter-ex #dark-mode-btn.auto {
  border: 1px solid transparent;
  outline: 3px double var(--primary-color);
  height: 18px;
  width: 18px;
  padding: 2px;
  margin-right: 3px;
}
.currency-converter-ex #dark-mode-btn.auto:hover {
  height: 24px;
  width: 24px;
  background: var(--primary-color);
  outline: none;
  margin-right: 0;
  padding: 5px;
}

.currency-converter-ex .donation-tab {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* This enables the smooth transition */
  position: absolute;
  z-index: 3;
  top: 0;
  background: var(--light-gray);
  width: 100%;
  height: 100%;
}

.currency-converter-ex .donation-icon {
  margin: 15px auto;
  font-size: 35px;
  text-align: center;
}

.currency-converter-ex .desc-title {
  text-align: center;
  font-weight: 800;
  color: var(--font-color2);
  font-size: 14px;
}

.currency-converter-ex .desc-text {
  color: var(--font-color2);
  width: 264px;
  text-align: center;
  margin: 12px auto;
  font-size: 12px;
}

.currency-converter-ex .donation-choice {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  margin: 20px 5px;
}

/* CSS */
.currency-converter-ex .button-64 {
  align-items: center;
  background: var(--gray);
  border: 0;
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--font-color2);
  display: flex;
  font-size: 14px;
  justify-content: center;
  line-height: 1em;
  max-width: 100%;
  min-width: 140px;
  padding: 3px;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  cursor: pointer;
}

.currency-converter-ex .button-64:active,
.currency-converter-ex .button-64:hover {
  outline: 0;
  background: var(--primary-color);
  color: white;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-converter-ex .button-64 span {
  background-color: transparent;
  padding: 6px 8px;
  border-radius: 6px;
  width: 100%;
  height: 100%;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-converter-ex .button-64:hover span {
  background: none;
}

.currency-converter-ex .italic-text {
  font-style: italic;
}

.currency-converter-ex .secret {
  color: #ff0000;
  /* Or any color you prefer */
  font-style: italic;
  font-weight: normal;
  font-size: 0.9em;
}

.currency-converter-ex a {
  text-decoration: none;
}

.currency-converter-ex #support-dev-btn svg {
  z-index: 2;
}

.currency-converter-ex #support-dev-btn {
  position: relative;
  overflow: hidden;
  /* Ensures proper centering of the ripple */
  display: flex;
  justify-content: center;
  align-items: center;
}

.currency-converter-ex #support-dev-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  z-index: 1;
  border: 1px solid var(--primary-color);
  /* Green outline */
  opacity: 0;
  border-radius: 100%;
  transform: translate(-50%, -50%) scale(1);
  /* Proper centering */
  transform-origin: center;
  /* Remove fill property as it's not applicable here */
}

.currency-converter-ex #support-dev-btn::after {
  animation: ripple 4s ease-out infinite;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.5;
  }

  50% {
    transform: translate(-50%, -50%) scale(10);
    opacity: 0.25;
  }

  100% {
    transform: translate(-50%, -50%) scale(20);
    opacity: 0;
  }
}

.currency-converter-ex .first-launch-offline {
  display: flex;
  margin-left: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  position: absolute;
  height: -webkit-fill-available;
  background: var(--light-gray);
  z-index: 1;
  max-height: 190px;
}
.currency-converter-ex .first-launch-offline p {
  margin-left: auto;
  margin-right: auto;
}
.currency-converter-ex .emoji {
  font-size: 24px;
  font-weight: 500;
  color: var(--font-color2);
}
.currency-converter-ex .msg-title {
  color: var(--font-color2);
  font-weight: 600;
}

.currency-converter-ex .settings-btn {
  height: 16px;
  width: 16px;
  margin-left: 46px;
  fill: var(--font-color);
  cursor: pointer;
}
.currency-converter-ex .settings-btn:hover svg {
  fill: var(--primary-color);
  transition: fill 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-converter-ex .custom-hidden {
  opacity: 0;
}

/* .currency-input {
    background: transparent !important;
    box-shadow: -1px 1px 5px 0px #0000003d;
} */

.currency-converter-ex .row {
  display: flex;
  justify-content: space-between;
  margin: 0 10px;
  align-items: center;
  height: 40px;
}
.currency-converter-ex .title-row {
  display: flex;
  margin: 0px 10px;
  align-items: center;
  height: 28px;
}
.currency-converter-ex .title-row svg {
  fill: var(--primary-color);
  height: 14px;
  width: 14px;
  margin-right: 8px;
}

.currency-converter-ex .option-name {
  font-size: 13px;
  font-weight: 300;
  color: var(--font-color2);
  align-self: center;
  font-weight: 200;
}

.currency-converter-ex select#format,
.currency-converter-ex select#fiat-round,
.currency-converter-ex select#crypto-round,
.currency-converter-ex select#time,
.currency-converter-ex select#date,
.currency-converter-ex select#theme,
.currency-converter-ex select#target {
  height: 26px;
  display: flex;
  align-items: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: transparent solid 1px;
  border-radius: 8px;
  margin: 5px;
  background: var(--gray);
  padding: 0;
  /* width: 155px; */
  color: var(--font-color);
  font-family: Roboto flex;
}

.currency-converter-ex .settings-content {
  border-radius: 4px;
  background: #191c23;
  margin: 4px;
  box-shadow: 0 -2px 0px var(--primary-light);
}

.currency-converter-ex .settings-tab {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* This enables the smooth transition */
  position: absolute;
  z-index: 3;
  top: 0;
  background: var(--gray);
  width: 100%;
  height: 100%;
}

.currency-converter-ex .settings-content {
  border-radius: 4px;
  background: var(--light-gray);
  margin: 4px;
}

.currency-converter-ex button#restore {
  height: 26px;
  user-select: none;
  width: fit-content;
  color: var(--font-color);
  font-family: "Roboto flex";
  text-align: center;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-width: 1px;
  border-style: solid;
  border-color: transparent;
  border-radius: 8px;
  margin: 5px;
  background: var(--gray);
  padding: 4px;
}
.currency-converter-ex button#restore:hover {
  cursor: pointer;
  background: #ff03032b;
  color: red;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-converter-ex p.section-title {
  color: var(--font-color2);
  font-size: 16px;
  font-weight: 500;
}

.currency-converter-ex #settings-btn {
  display: flex;
  cursor: pointer;
  height: 28px;
  width: 28px;
  justify-content: center;
  align-self: center;
  fill: var(--font-color);
  background: transparent;
  border: none;
  border-radius: 50%;
}

.currency-converter-ex span.custom {
  color: var(--primary-color);
  font-weight: 500;
  margin: 0 0 0 2px;
}

.currency-converter-ex .content {
  overflow-y: overlay;
  scrollbar-color: #6e6e6e73 transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  display: block;
  width: -webkit-fill-available;
  height: fit-content;
  max-height: 374px;
  min-height: 340px;
}

.currency-converter-ex .currency-input {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  /* overflow: hidden; */
}

.currency-converter-ex .currency-input::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-converter-ex .currency-input:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.currency-converter-ex .currency-input:focus-within::before {
  opacity: 1;
}

.currency-converter-ex .currency-input:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.currency-converter-ex .currency-input input {
  /* width: 100%; */
  /* padding: 12px 16px; */
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  background: transparent;
  border: none;
  z-index: 1;
  position: relative;
}

.currency-converter-ex .currency-input input:focus-visible {
  outline: none;
}
.currency-converter-ex .currency-input.loading {
  position: relative;
}

.currency-converter-ex .currency-input.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-light),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}
.currency-converter-ex .currency-input::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-converter-ex select:hover,
.currency-converter-ex select:focus {
  border-color: var(--primary-color);
  /* outline: none; */
  box-shadow: 0 0 0 1px var(--primary-color);
}
.currency-converter-ex button:focus-visible,
.currency-converter-ex select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
  box-shadow: none;
}
.currency-converter-ex select:hover {
  border-color: var(--primary-color);
  color: white;
  cursor: pointer;
}

/*************************/
#tax-btn.expanded {
  width: 44px;
  border-radius: 6px;
  border-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background: var(--gray);
  cursor: auto;
}

#tax-btn.expanded svg {
  opacity: 0;
}

#tax-input {
  width: 24px;
  border: none;
  background: transparent;
  color: var(--font-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
  text-align: left;
  overflow: hidden;
}

#tax-input::-webkit-outer-spin-button,
#tax-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/**/
#tax-btn::after {
  content: "%";
  transform: translateY(20%);
  font-size: 12px;
  color: var(--font-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  align-self: baseline;
  padding: 0 1px;
}
/**/

#tax-btn.expanded::after {
  opacity: 1;
}

#tax-btn.expanded #tax-input {
  opacity: 1;
  pointer-events: auto;
  background: var(--small-input);
  border-radius: 4px 0 0 4px;
  z-index: 1;
}
