@import url('../../../commons/blocks/ew-ccp/ew-price-check/ew-price-check.css');

/* EW Price Check Block */
.ew-price-check {
  .emi__container {
    padding-block: 2.5rem;
    padding-bottom: 0;
    @media (width >= 1024px) {
      padding-block: 3.5rem;
    }

    background: var(--secondary-gray-10);
  }

  /* Header Section */
  .emi__header {
    :is(h1, h2, h3, h4, h5, h6) {
      color: var(--secondary-black);
      font-weight: var(--fw-700);
      font-size: var(--body-font-size-l);
      line-height: var(--heading-lh-9-des-sub-heading);
      margin-bottom: 56px;
      @media (width >= 1024px) {
        font-size: var(--body-font-size-xl);
        line-height: var(--heading-lh-1--mob-display);
        margin-bottom: 98px;
      }
    }
  }

  /* Form Section */
  .emi__form {
    margin-bottom: var(--space-24px);
    row-gap: var(--space-24px);
    column-gap: var(--space-12px);
    .emi__form-row {
      .emi__form-text {
        color: var(--primary-main);
        font-size: var(--body-font-size-sm);
        font-weight: var(--fw-600);
        line-height: var(--heading-lh-5--mob);

        @media (width >= 1024px) {
          font-size: var(--body-font-size-l);
          line-height: var(--heading-lh-9-des-sub-heading);
          padding-right: 0;
        }
      }

      .emi__dropdown-select,
      .emi__date-trigger {
        height: 1.75rem;
        font-style: normal;
        font-size: var(--body-font-size-sm);
        line-height: var(--heading-lh-5--mob);
        @media (width >= 1024px) {
          font-size: var(--body-font-size-l);
          line-height: var(--heading-lh-9-des-sub-headin);
        }
      }

      /* Dropdown - Custom ws-dropdown style */
      .emi__dropdown {
        position: relative;

        .emi__dropdown-button {
          height: unset;
          background: transparent;
          border: 0;
          display: flex;
          padding: 0 0 var(--space-4px) 0;
          justify-content: space-between;
          align-items: center;
          overflow: hidden;
          font-size: var(--body-font-size-sm);
          font-weight: var(--fw-400);
          line-height: var(--heading-lh-6-des);
          font-style: normal;
          border-bottom: 1px solid var(--tertiary-black);
          cursor: pointer;
          gap: var(--space-12px);

          @media (width >= 1024px) {
            font-size: var(--body-font-size-l);
          }

          .emi__chevron {
            height: 1.5rem;
            width: 1.5rem;
            flex: none;
            background: url(/icons/arrow_dropdown_filled.svg) no-repeat center/contain;
          }
        }
        .emi__dropdown-menu {
          box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.06);
          position: absolute;
          background: white;
          width: 100%;
          max-height: 10rem;
          overflow: auto;
          z-index: 10;
          display: none;
          margin: 0;
          padding: 0;
          list-style: none;

          &.open {
            display: block;
          }

          .emi__menu-item {
            color: var(--secondary-main);
            display: flex;
            flex-direction: column;
            row-gap: var(--space-8px);
            cursor: pointer;
            font-weight: var(--fw-400);
            line-height: var(--heading-lh-6-des);
            padding: 0;
            border: none;
            background: none;
            width: 100%;
            text-align: left;

            &:hover {
              background-color: var(--tertiary-light-grey);
            }

            @media (width >= 1024px) {
              row-gap: var(--space-12px);
            }

            .emi__item-text {
              text-align: start;
              font-weight: var(--fw-400);
              line-height: var(--heading-lh-6-des);
              display: flex;
              justify-content: space-between;

              .tick {
                width: 1.25rem;
                height: 1.25rem;
                display: none;
                background-image: url(/icons/active-checkbox.svg);
                background-repeat: no-repeat;
                background-size: contain;
                margin-right: var(--space-8px);

                @media (width >= 1024px) {
                  width: 1.5rem;
                  height: 1.5rem;
                }
              }

              @media (width >= 1024px) {
                font-size: var(--body-font-size-s);
              }
            }
          }
        }

        .emi__chevron {
          height: 1.5rem;
          width: 1.5rem;
          flex: none;
          background: url(/icons/arrow_dropdown_filled.svg) no-repeat center/contain;
        }
      }

      .emi__dropdown-menu {
        box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.06);
        position: absolute;
        background: white;
        width: 100%;
        max-height: 10rem;
        overflow: auto;
        z-index: 1;
        display: none;
        margin: 0;
        padding: 0;
        list-style: none;

        &.open {
          display: block;
        }

        .emi__menu-item {
          color: var(--secondary-main);
          display: flex;
          flex-direction: column;
          row-gap: var(--space-8px);
          cursor: pointer;
          font-weight: var(--fw-400);
          line-height: var(--heading-lh-6-des);
          padding: var(--space-10px) var(--space-16px);
          border: none;
          background: none;
          width: 100%;
          text-align: left;

          &:hover {
            background-color: var(--tertiary-light-grey);
          }

          @media (width >= 1024px) {
            row-gap: var(--space-12px);
          }

          .emi__item-text {
            text-align: start;
            font-weight: var(--fw-400);
            line-height: var(--heading-lh-6-des);
            display: flex;
            justify-content: space-between;

            .tick {
              width: 1.25rem;
              height: 1.25rem;
              display: none;
              background-image: url(/icons/active-checkbox.svg);
              background-repeat: no-repeat;
              background-size: contain;
              margin-right: 8px;

              @media (width >= 1024px) {
                width: 1.5rem;
                height: 1.5rem;
              }
            }

            @media (width >= 1024px) {
              font-size: var(--body-font-size-s);
            }
          }
        }
      }
      .emi__date {
        .emi__date-trigger {
          min-width: 8.938rem;
        }
        &::after {
          background: url(/icons/calendar.svg) no-repeat center/contain;
        }
      }
    }
  }

  /* Results Section */
  .emi__results {
    padding: var(--space-24px) var(--space-16px);
    background: var(--gradients-accent-section-bg-1);
    clip-path: none;

    @media (width >= 1024px) {
      padding: 40px 39px 40px 41px;
      margin-bottom: 0;
    }

    /* Emi display */
    .emi__display {
      .emi__divider {
        margin-top: var(--space-16px);
        justify-content: center;
        @media (width >= 1024px) {
          gap: 46.5px;
          margin-top: var(--space-24px);
        }
        .emi__display-amount {
          line-height: var(--heading-lh-7-des);
          @media (width >= 1024px) {
            line-height: var(--heading-lh-2-1-des);
          }
          .emi__amount {
            color: var(--primary-black);
            text-align: center;
            font-size: var(--body-font-size-xl);
            font-style: normal;
            font-weight: var(--fw-700);
            line-height: var(--heading-lh-1--mob-display);
            @media (width >= 1024px) {
              font-size: var(--heading-font-2-des);
              line-height: var(--heading-lh-2-1-des);
            }
          }
          .emi__per-month {
            color: var(--primary-black);
            font-size: var(--heading-font-1-mob);
            font-weight: var(--fw-700);
            line-height: var(--heading-lh-1--mob-display);
            @media (width >= 1024px) {
              font-size: var(--heading-font-12-des);
              line-height: var(--heading-lh-2-1-des);
            }
          }
        }
        .emi__cta--desktop {
          a.button {
            height: 40px;
            padding-inline: var(--space-16px);
          }
        }
      }
      .emi__display-text,
      .emi__display-amount {
        text-align: center;

        @media (width >= 1024px) {
          text-align: center;
        }
        .emi__currency {
          font-size: var(--body-font-size-xl);
          font-weight: var(--fw-700);
          @media (width >= 1024px) {
            font-size: var(--heading-font-2-mob);
          }
        }

        .emi__amount {
          font-weight: var(--fw-700);
        }
      }

      .emi__display-text {
        color: var(--primary-black);
        font-size: var(--heading-font-8-mob);
        text-align: center;
        font-style: normal;
        font-weight: var(--fw-500);
        line-height: var(--heading-lh-19-mob-display);
        text-align: left;
        @media (width >= 1024px) {
          text-align: center;
          font-size: var(--body-font-size-l);
          font-weight: var(--fw-500);
          line-height: var(--heading-lh-9-des-sub-heading);
        }
      }
    }

    /* Premium Display */
    .emi__premium {
      @media (width >= 1024px) {
        margin: 2.563rem 0 var(--space-24px) 0;
      }
      .emi__cta--mobile {
        text-align: center;
        margin-top: 0;
        a.button {
          margin-top: var(--space-16px);
          height: 2.5rem;
          padding-inline: var(--space-12px);
          font-weight: var(--fw-400);
        }
      }
      .emi__premium-text {
        color: var(--secondary-main);
        font-weight: var(--fw-400);
        font-size: var(--body-font-size-s);
        line-height: var(--heading-lh-19-mob-display);
        @media (width >= 1024px) {
          font-size: var(--heading-font-16-des);
        }
        .emi__amount {
          color: var(--primary-black);
          font-size: var(--heading-font-1-mob);
          font-style: italic;
          font-weight: var(--fw-500);
          line-height: var(--heading-lh-8-mob-display);
          letter-spacing: 0.4px;
          @media (width >= 1024px) {
            font-size: var(--heading-font-12-des);
            letter-spacing: 0.48px;
          }
        }
        .emi__currency {
          font-style: normal;
          @media (width >= 1024px) {
            font-size: var(--body-font-size-x);
            line-height: var(--heading-lh-11-mob-display);
            letter-spacing: 0.48px;
          }
        }
      }
    }
    .emi__recommendation-wrapper {
      @media (min-width: 1024px) {
        padding: 0;
      }
    }
    /* Recommendation Box */
    .emi__recommendation {
      padding: var(--space-12px) var(--space-10px) var(--space-12px) var(--space-11px);
      background: none;
      border: 1px solid var(--inactive-content);
      margin: var(--space-16px) 0 0 0;

      @media (width >= 1024px) {
        margin: 0;
        padding: var(--space-24px) 0;
      }

      .emi__recommendation-text {
        text-align: center;
        font-size: var(--body-font-size-xxs);
        color: var(--light-grey);
        line-height: var(--heading-lh-4--mob-text-medium);
        @media (width >= 1024px) {
          font-size: var(--heading-font-7-des);
          font-weight: var(--fw-500);
          line-height: var(--heading-lh-21-des-text-small);
        }
      }

      .emi__explore-btn {
        width: auto;
        margin: var(--space-12px) 0 0 0;
        line-height: var(--heading-lh-4--mob-text-medium);
      }
    }

    /* Additional Info */
    .emi__info {
      text-align: center;
      padding: var(--space-24px) var(--space-24px) 0 var(--space-24px);
      @media (width >= 1024px) {
        padding: var(--space-24px) 0 0 0;
      }

      p {
        color: var(--primary-black);
        font-size: var(--body-font-size-xxxs);
        line-height: var(--heading-lh-21-mob-text-small);
        margin: 0;

        @media (width >= 1024px) {
          color: var(--secondary-main);
          font-size: var(--body-font-size-xxs);
          font-weight: var(--fw-400);
          line-height: var(--heading-lh-6-des);
        }
        a {
          font-weight: var(--fw-700);
          line-height: var(--heading-lh-21-mob-text-small);
          @media (width >= 1024px) {
            line-height: var(--heading-lh-19-mob-display);
          }
        }
      }
    }
  }
  .emi__highlight {
    .emi__highlight--secondary {
      .emi__button--close {
        height: 1rem;
        width: rem;
        @media (width >= 1024px) {
          height: 1.5rem;
          width: 1.5rem;
        }
      }
    }
    p {
      margin: 0;
    }

    padding: var(--space-12px) var(--space-16px);
    @media (width >= 1024px) {
      padding: var(--space-16px) var(--space-24px);
    }
    .emi__highlight--primary {
      .emi__highlight--message {
        color: var(--red-shade-4);
        font-size: var(--body-font-size-xxxs);
        font-weight: var(--fw-400);
        line-height: var(--heading-lh-21-mob-text-small);
        @media (width >= 1024px) {
          font-size: var(--body-font-size-xxs);
          line-height: var(--heading-lh-6-des);
        }
        strong {
          font-size: var(--body-font-size-xxxs);
          font-weight: var(--fw-600);
          line-height: var(--heading-lh-21-mob-text-small);
          @media (width >= 1024px) {
            font-size: var(--body-font-size-xxs);
            font-weight: var(--fw-600);
            line-height: var(--heading-lh-6-des);
          }
        }
      }
      .emi__button--highlight {
        height: 2rem;
        a {
          line-height: var(--heading-lh-19-mob-display);
        }
      }
    }
  }
  .emi__highlight--error {
    margin-bottom: -112px;
    @media (width >= 1024px) {
      margin-bottom: 0;
    }
  }
}
