/* Define the CSS variable if not already set */
:root {
  --main-b-1: #f5f7fa;
  --main-b-5: #111f3f;
  --main-c-1: #6c757d;
  --main-c-2: #343a40;
  --main-c-3: #007bff;
  --main-c-4: #e9f3ff;
  --main-a-a: #f0003c;
  --main-a-b: #9fabc9;
  --main-a-c: #f9f9f9;
  --main-a-d: #000000;
  --main-a-e: #002937;
}

/* smart-wizard */
.sw>.nav .nav-link>.num {
  float: none !important;
}

.sw-theme-basic {
  border: none;

  .tab-pane,
  > .toolbar {
    padding: 20px 0 0 0 !important;
  }
  
  > .toolbar {
    display: none;
    justify-content: flex-end !important;

    .sw-btn {
      background-color: initial !important;
      color: var(--main-a-a) !important;
      padding: 14px 30px !important;
      border: 1px solid var(--main-a-a) !important;
      border-radius: 0.5rem;

      &.disabled {
        display: none !important;
      }
    }
  }

  > .progress {
    display: none;
  }

  > .tab-content {
    height: fit-content !important;
  }

  > .nav {
    box-shadow: none !important;

    .nav-link.default {
      color: var(--main-c-1) !important;
    }

    .nav-link.active {
      color: var(--main-b-5) !important;

      &:after {
        background: var(--main-b-5) !important;
      }
    }

    .nav-link.default,
    .nav-link.done {
      &:after {
        background: none !important;
      }
    }
  }
}

/* from other stylesheets */
.d-none {
  display: none !important;
}

.d-flex {
  display: flex;
}

.d-block {
  display: block;
}

.justify-content-between {
  justify-content: space-between;
}
.pt-3 {
  padding-top: 1rem;
}

.pt-5 {
  padding-top: 3rem;
}

.mt-3 {
  margin-top: 1rem;
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875em;
  color: #C63D02;
}

i.bi {
  margin-left: 10px;
}

.feedback > .invalid-feedback {
  display: block !important;
}

/* .bi-currency-euro::before {
  content: "\f637";
} */

.bi-currency-euro::before {
  content: "€";
  font-family: "Roboto", sans-serif;
  font-style: normal;
  font-weight: normal;
  display: inline-block;
  line-height: 1;
  vertical-align: -.125em;
}

/* hide radio circle */
.btn-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.btn-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ccc;
  border-radius: 0.5rem;
  padding-left: 40px;
  padding-right: 40px;
  cursor: pointer;
}

.btn-check:checked + .btn-amount {
  border-color: var(--main-c-3);
  border-width: 2px;
  background-color: var(--main-c-4);
  color: var(--main-c-3);
}

.btn-amount:hover {
  border-color: #999;
}

/* doesnt get picked up from CT */
/* .ct-textfield */
.form-textfield {
  border-radius: 0.25rem;
  border-style: solid;
  border-width: 0.0625rem;
  padding: 0.8125rem 1rem;
  width: 100%;
  box-sizing: border-box;
}

.block-donations {
  background-color: #0000ff00;
  border-radius: 10px;
}

.block-donations-image-right {
  flex-direction: row-reverse;
}

.block-donations-phone {
  width: fit-content;
  height: fit-content;
  z-index: 1;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  flex-direction: column;
  margin: 24px;
  gap: 10px;
}

.block-donations-phone-none {
  display: none;
}

.block-donations-phone-top-right {
  right: 0;
  top: 0;
}
.block-donations-phone-top-left {
  left: 0;
  top: 0;
}
.block-donations-phone-bottom-right {
  right: 0;
  bottom: 0;
}
.block-donations-phone-bottom-left {
  left: 0;
  bottom: 0;
}

/* from donations-block.scss */
#donations-wrapper {

  width: 100%;
  background-color: var(--main-b-1);
  padding: 0;

  .tab {
    /* background-color: var(--main-a-b); */
    background-color: #ddd;
  }

  .tab.active {
    background-color: white;
  }

  .ct-tabs__links {
    border-bottom-style: none;
    gap: 1px;
  }

  .ct-link {
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--main-a-b);
    color: black;
    font-weight: 100;
  }

  .ct-label,
  .form-check-label {
    color: var(--main-c-2);
    font-family: 'Lexend', sans-serif;
  }

  .tab-content {
    height: fit-content;
  }

  .donations-recurring-intro {
    padding: 20px 0;
    /* font-size: 20px;
    font-weight: 400; */
    color: var(--main-a-e);
    text-align: center;
  }
}

.donations-amount {
  margin: 0;
  display: flex;
  flex-direction: column;

  .amount-wrapper {
    gap: 10px;
    padding-top: 20px;
    padding-left: 0;
    padding-right: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .form-control {
    border-radius: 0;
    text-align: center;
    border-top: none;
    border-left: none;
    border-right: none;

    &:focus {
      outline: none;
    }

    input {
      border-radius: 0;
      text-align: center;
    }

    input:focus,
    button:focus {
      outline: none;
    }
  }

  .amount-container {
    width: 100%;
    margin: auto;
   
    label {
      font-size: 18px;
      text-align: center;
      padding: 0;
      margin: 0;
      color: var(--main-c-2);
      transform-origin: unset;
    }
  }

  .amount-textfield {
    text-align: center;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    border-color: var(--main-a-b);
    font-family: 'Lexend', sans-serif;
    font-size: 18px;
    line-height: 36px;
    color: var(--main-a-b);
  }

  .amount-textfield.focused {
    background-color: var(--main-b-1);
    color: var(--main-a-d);
    border-bottom: 2px solid var(--main-c-3);
  }

  .amount-textfield:focus {
    background-color: var(--main-b-1);
    color: var(--main-a-d);
    border-bottom: 2px solid var(--main-c-3);
  }

  .amount-textfield:focus-visible {
    outline: none;
  }

  .btn-amount {
    border: 1px solid var(--main-a-b);
    text-wrap: nowrap;
    height: fit-content;
    min-width: 124px;
    text-align: center;
    color: var(--main-a-d);
  }
}

.donations-payment {
  display: flex;
  flex-direction: column;

  .choose-bank-options {
    justify-content: flex-start;
  }
}

.choose-bank-options {
  flex-wrap: wrap;
  gap: 8px;
}

.donations-banklink {
  input[type=radio] {
    display: none;
  }

  label {
    cursor: pointer;
  }
  
  input[type=radio]:checked+label {
    border: 2px solid var(--main-c-3);
    background-color: var(--main-c-4);
  }

  .cards {
    padding-bottom: 20px;
  }

  .btn-img {
    background-size: auto 34px;
    background-repeat: no-repeat;
    height: 36px;
  }

  .btn-img-montonio {
    display: block;
    background-repeat: no-repeat;
    background-size: 68px;
    height: 36px;
    width: 100px;
    background-position: center;
    border: 1px solid var(--main-a-b);
    border-radius: 0.5rem;
  }

  .btn-cards {
    background-size: 80%;
    width: 220px;
  }

  .btn-lhv {
    width: 61px;
    background-size: auto 54px;
    background-position-y: -11px;
    background-position-x: -28px;
  }

  .btn-seb {
    width: 48px;
    background-position-x: 11px;
    background-position-y: 11px;
    background-size: auto 10px;
  }

  .btn-swed {
    width: 115px;
    background-size: auto 20px;
    background-position-x: 12px;
    background-position-y: 6px;
  }

  .btn-coop {
    width: 119px;
    background-position-y: 0px;
  }

  .btn-luminor {
    width: 91px;
    background-size: auto 30px;
    background-position-x: 3px;
  }

  .btn-swedbank-estonia {
    background-size: 80% auto;
  }

  .btn-citadele-estonia {
    background-size: 100% auto;
  }

  .btn-n26-estonia {
    background-size: 60% auto;
  }

  .btn-paypal {
    width: 108px;
    background-size: auto 70%;
  }
}

.donations-transfer {
  color: var(--main-a-d);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.5rem !important;
  text-align: center;
}

.donations-transfer .name {
  font-weight: bold;
}

.donations-phone-number {
  padding: 12px 28px;
  border: 3px solid var(--main-a-a);
  border-radius: 10px;
  min-width: 116px;
  background-color: transparent;
  pointer-events: auto;
  transition: background-color 0.2s ease;
}

.donations-phone-number:hover {
  background-color: rgba(240, 0, 60, 0.1);
}

.donations-phone-link {
  text-decoration: none;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.donations-phone-link::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f0003c'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 006.59 6.59l2.2-2.2a1 1 0 011.01-.24 11.36 11.36 0 003.58.57 1 1 0 011 1V20a1 1 0 01-1 1A17 17 0 013 4a1 1 0 011-1h3.5a1 1 0 011 1 11.36 11.36 0 00.57 3.58 1 1 0 01-.24 1.01l-2.2 2.2z'/%3E%3C/svg%3E"); */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0003c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92V20a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3.09a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.36a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.donations-phone-n,
.donations-phone-a {
  padding: 0;
  margin: 0;
  color: #ffffff;
  font-weight: 700;
}

/* Banner theme-aware phone text colors */
.ct-banner.ct-theme-dark .donations-phone-link,
.ct-banner.ct-theme-dark .donations-phone-n,
.ct-banner.ct-theme-dark .donations-phone-a {
  color: #ffffff;
}

.ct-banner.ct-theme-light .donations-phone-link,
.ct-banner.ct-theme-light .donations-phone-n,
.ct-banner.ct-theme-light .donations-phone-a {
  color: var(--main-b-5, #111f3f);
}

/* --- Tabs list --- */
.tablist {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 2px solid #ddd;
  background: none;
  width: fit-content;
  gap: 2px;
}

.tablist .nav-link {
  border: 0;
  border-radius: 0;
  transition: all 0.2s ease;
  height: 58px;
}

.tablist .nav-link:hover {
  background: #f2f2f2;
  color: #000;
}

.tablist .nav-link.active {
  background: #fff;
  color: #222;
  font-weight: 600;
}

.tabpanel-block {
  padding: 1.5rem;
  background: #fff;
}

.tablist .nav-item:last-child .nav-link {
  border-right: none;
}

.tablist .nav-item {
  border-radius: 0px;
  min-width: 120px;
}

@media (min-width: 368px) {
  .paragraph--type--donations .block-donations {
    flex-direction: column;
  }
  .paragraph--type--donations .ct-navigation-card__image {
    width: 100% !important;
  }
  .paragraph--type--donations .block-donations-phone {
    /* top: calc(50% - 56px); */
    /* margin: 0; */
    flex-direction: row;
    width: 100%;

    position: relative;
    order: 3;
    margin: 16px 0;
  }
  .ct-banner__wrapper .block-donations {
    width: 100% !important;
  }
  .ct-banner__wrapper .block-donations-phone {
    position: relative;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin: 0;
  }
}

/* next is 992px */
@media (min-width: 768px) {
  .paragraph--type--donations .block-donations {
    flex-direction: initial;
    width: 100% !important;
  }
  .paragraph--type--donations .ct-navigation-card__image {
    /* width: 50% !important; */
    flex: 1;
  }

  .paragraph--type--donations .block-donations-phone {
    position: absolute;
    top: initial;
    margin: 24px;
    width: initial;
  }
  .ct-banner__wrapper .block-donations {
    /* width: 50% !important; */
  }
  .ct-banner__wrapper .block-donations-phone {
    position: absolute;
    flex-direction: column;
    width: initial;
  }

  #donations-wrapper {
    width: fit-content;
  }
}