/* 
 * All CSS variable overrides MUST happen within the following selector
 * in order to override Reuters default styles.
 */

@font-face {
  font-family: Curator;
  font-weight: normal;
  src: url(https://www.straitstimes.com/multimedia/graphics/assets/fonts/v2/CuratorRegular.woff2);
}

@font-face {
  font-family: Curator;
  font-weight: 700;
  src: url(https://www.straitstimes.com/multimedia/graphics/assets/fonts/v2/CuratorBold.woff2);
}

:root, body {
  color-scheme: light dark !important;
  background-color: #fff !important;
}

div.theme-client-override {
  /* 
   * Override the following CSS variables to match your site.
   */

   /* Font families */
  --theme-font-family-sans-serif: Knowledge, sans-serif;
  --theme-font-family-monospace: "Droid Sans Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --theme-font-family-hed: var(--theme-font-family-sans-serif);
  --theme-font-family-subhed: var(--theme-font-family-sans-serif);
  --theme-font-family-note: var(--theme-font-family-sans-serif);
  --theme-font-family-number: var(--theme-font-family-sans-serif);

  /* Font sizes */
  --theme-font-size-xxs: 0.7rem;
  --theme-font-size-xs: 0.75rem;
  --theme-font-size-sm: 0.8rem;
  --theme-font-size-base: 0.875rem;
  --theme-font-size-lg: clamp(1rem, 0.08vw + 0.98rem, 1.05rem);
  --theme-font-size-xl: clamp(1.13rem, 0.31vw + 1.06rem, 1.31rem);
  --theme-font-size-2xl: clamp(1.27rem, 0.63vw + 1.14rem, 1.64rem);
  --theme-font-size-3xl: clamp(1.42rem, 1.04vw + 1.21rem, 2.05rem);
  --theme-font-size-4xl: clamp(1.6rem, 1.6vw + 1.28rem, 2.56rem);
  --theme-font-size-5xl: clamp(1.8rem, 2.34vw + 1.33rem, 3.2rem);
  --theme-font-size-6xl: clamp(2.03rem, 3.3vw + 1.37rem, 4.01rem);

  /* 
   * Colors
   */

  /* Font colors */
  --theme-colour-text-primary: var(--theme-colour-black);
  --theme-colour-text-secondary: var(--theme-colour-grey-700);

  /* Page furniture */
  --theme-colour-page-background: #ffffff;
  --theme-colour-page-live: var(--tr-dark-orange);
  --theme-colour-page-shadow: rgb(64 64 64 / 80%);

  /* Basic grays */
  --theme-colour-white: #ffffff;
  --theme-colour-black: #404040;
  --theme-colour-grey-100: #f5f5f5;
  --theme-colour-grey-200: #efefef;
  --theme-colour-grey-300: #e7e7e7;
  --theme-colour-grey-400: #d0d0d0;
  --theme-colour-grey-500: #999999;
  --theme-colour-grey-600: #6c6c6c;
  --theme-colour-grey-700: #585858;

  /* Republican colors */
  --theme-colour-rep-scale-100: #FEB6AC;
  --theme-colour-rep-scale-200: #F28D87;
  --theme-colour-rep-scale-300: #E26163;
  --theme-colour-rep-scale-400: #da0113;
  --theme-colour-rep-win: var(--theme-colour-rep-scale-400);
  --theme-colour-rep-bgd: #f7edef;
  --theme-colour-rep-lead: #FFDAD9;
  --theme-colour-rep-flip: #7C000F;

  /* Democrat colors */
  --theme-colour-dem-scale-100: #ADDFF7;
  --theme-colour-dem-scale-200: #7DC1EB;
  --theme-colour-dem-scale-300: #57A6D7;
  --theme-colour-dem-scale-400: #0042a2;
  --theme-colour-dem-win: var(--theme-colour-dem-scale-400);
  --theme-colour-dem-bgd: #EDF4F7;
  --theme-colour-dem-lead: #D2EAF7;
  --theme-colour-dem-flip: #004C7F;

  /* Independent colors */
  --theme-colour-ind-scale-100: #CDE8CD;
  --theme-colour-ind-scale-200: #9FDC9F;
  --theme-colour-ind-scale-300: #7FCF7F;
  --theme-colour-ind-scale-400: #60C160;
  --theme-colour-ind-win: var(--theme-colour-ind-scale-400);
  --theme-colour-ind-bgd: #EDF4ED;
  --theme-colour-ind-lead: #CDE8CD;
  --theme-colour-ind-flip: #008000;

  /* Ties */
  --theme-colour-tie-result: #F7D131;
  --theme-colour-tie-bgd: #fcf6e3;
}

/* 
 * Add any other CSS rules to customise your embeds.
 */
div.theme-client-override {
  @font-face {
    font-family: Curator;
    font-weight: normal;
    src: url(https://www.straitstimes.com/multimedia/graphics/assets/fonts/v2/CuratorRegular.woff2);
  }

  @font-face {
    font-family: Curator;
    font-weight: 700;
    src: url(https://www.straitstimes.com/multimedia/graphics/assets/fonts/v2/CuratorBold.woff2);
  }
    
  --theme-font-family-sans-serif: Curator, Helvetica Neue, Helvetica, Arial, sans-serif;

  -webkit-font-smoothing: antialiased;

  --theme-font-size-sm: 0.78rem;

  color-scheme: light dark !important;
  background-color: #fff !important;

  .embedded {
    color-scheme: light dark !important;
    background-color: #fff !important;
    min-height: 115px;

    .embed-title {
      display: none !important;
      height: 0 !important;
      opacity: 0 !important;
      color: #fff !important;
    }

    .last-update {
      letter-spacing: normal;
    }

    .wrapper-power-bar .wrapper-content {
      .wrapper-text {
        margin-top: 10px;
        
        .div-results .tally-party {
          text-transform: uppercase;
          font-weight: normal;
          font-size: 12px;
        }

        .h4.office-body-label {
          font-size: 11px;
        }

        .holdovers {
          margin-top: -10px;
        }

        > p {
          color: #7B7B7B;

          @media (max-width: 280px) {
            font-size: 11px !important;
          }
        }
      }

      .power-bar .pct-bar {
        border-radius: 0 !important;
      }

      @media (min-width: 690px) {
        .wrapper-text {
          .div-results {
            .tally-party {
              font-size: 15px;
            }
            .tally-numbers {
              font-size: 30px;
            }
          }
                    

          .h4.office-body-label {
            font-size: 13px;
          }

          > p {
            font-size: 14px !important;
          }
        }
      }
    }

    .tooltip-wrapper {
      box-shadow: 0 3px 6px var(--theme-colour-grey-200), 0 3px 6px var(--theme-colour-grey-200);
    }

    .wrapper-tooltip {
      .place-details {
        font-weight: 700;
        font-size: var(--theme-font-size-lg);
      }
    }
    
    > .nav-bar nav {
      @media (max-width: 350px) {
        > ul.nav-list li.nav-item {
          font-size: 14px !important;
        }
      }
    }

    &[data-embed-type="embeds-national-power-bars-officeBody"] {
      @media (min-width: 690px) {
        > div.spacer {
          height: 5px !important;
        }
      }
    }

    &[data-embed-type="embeds-national-ratings-tables"] {
      .updated-timestamp-container aside.embed {
        margin-bottom: 0;
      }

      /* .table-results-layout {
        justify-content: center;
        column-gap: 50px;

        .results-table-container {
          min-width: 30%;
          order: unset !important;
          padding-inline: unset !important;
        }

        @media (min-width: 733px) and (max-width: 1165px) {
          > .results-table-container {
            min-width: 45%;
          }
        }
      } */

      .results-table-wrapper {
        border: 1px solid var(--theme-colour-white);

        .heading.h3, thead, td.state, tfoot {
          background-color: var(--theme-colour-white);
        }

        .heading.h3 {
          font-family: 'Curator';
          font-weight: 700;
          font-size: var(--theme-font-size-base);
          text-align: center;
        }

        > table {
          > thead {
            border-bottom: 2px solid #C0CAC8;
          }

          > tbody tr {
            border-bottom: 1px dotted #C0CAC8;
            
            > td {
              border: none !important;
            }
          }
        }
      }
    }

    &[data-embed-type="embeds-national-maps"] {
      .updated-timestamp-container aside.embed {
        margin-bottom: 0;
      }
    }
  }
}

@media (prefers-color-scheme: dark) {
  :root, body {
    color-scheme: light dark !important;
    background-color: #fff !important;
  }

  .div.theme-client-override {
    color-scheme: light dark !important;
    background-color: #fff !important;
  }

  .embedded {
    color-scheme: light dark !important;
    background-color: #fff !important;
  }
}


.wrapper-power-bar img{display:none;}
.wrapper-power-bar:before,.wrapper-power-bar:after{content:'';width:40px;height:40px;border-radius:50%;position:absolute;}
.wrapper-power-bar:before{left:0;background-image:url('https://dss0.zbstatic5.com/assets/interactive/2024/us-presidential-election-2024/imgs/kamala-harris-tn.webp')!important;background-color:none;}
.wrapper-power-bar:after{right:0;background-image:url('https://dss0.zbstatic5.com/assets/interactive/2024/us-presidential-election-2024/imgs/donald-trump-tn.webp')!important;}
