
:root {
    --background-main: #f2edf5;
    --background-component: #fbf9fc;
    --text-color: #311462;
}
* {
  font-family: 'Inter', sans-serif;
  color:var(--text-color);
}
body, button, input {
    background: var(--background-main);
  font-family: 'Inter', sans-serif!important;
  font-size:14px;
  color:var(--text-color);
}

.pattern_text_name, .pattern_shop_name {
  color:var(--text-color)!important;
}

h1, h2, h3 {
      font-family: 'Plus Jakarta Sans', sans-serif!important;
  color:var(--text-color);
}

.title_container {
    width: max-content;
    text-align: center;
    margin: 24px auto 32px auto;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subtitle {
  max-width:330px;
}

.emoji {
  font-family: 'Noto Color Emoji', sans-serif;
}

.nav_menu {
  background: none !important;
  position: relative;
  left: -10px;
}

.nav_menu img {
    width:275px;
}

.component {
    background: var(--background-component);
    border-radius:24px;
    padding:24px;
  max-width:1100px;
  width:calc(100% - 48px);
  margin:auto;
}

.all_patterns {
    padding:16px;
    width:calc(100% - 32px);
}

.explain_container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1100px;
    width: 90%;
    flex-direction: row;
    justify-content: left;
    font-size:13px;
    gap:6px;
    margin:16px 16px 24px 16px;
}

.all_patterns.animated {
  animation-delay: 1s;
}

/* Accordion styles */
.accordion {
    cursor: pointer;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    transition: 0.4s;
    margin-top: 6px;
  border-radius:16px;
  padding:16px;
  max-width: 1132px;

}
.accordion.active, .accordion:hover {
    border-radius: 16px 16px 0 0; 
}
.panel {
  padding: 0 10px;
    display: none;
    background-color: var(--background-component);
    overflow: hidden;
    border-radius: 0 0 16px 16px;
    padding: 0 14px 14px 14px;
    max-width: 1100px;
    width: calc(100% - 28px);
}

/* banner */
.shopnowbanner
{
  padding: 0;
    width: 100%;
    background: no-repeat;
    margin-top: -20px;
    max-width:1130px;
}

.materials_banner {
  display: block;
    background: var(--Purple);
    color: #fff;
    /* border-radius: 24px; */
    padding: 16px;
    margin: 0 auto 24px auto;
    width: calc(100% - 32px);
    display: flex;
    justify-content: space-between;
    gap: 0;
    max-height: 300px;
    background-image: url(https://lcdn.ribblr.com/images/material-blur.svg);
    background-position-x: right;
    background-repeat: no-repeat;
}

.home_banner {
    flex-direction: row;
    display: flex;
    width: max-content;
    margin: 16px auto;
    max-width: 100%;
    color:#fff;
  }

  .home_mat {
    display: flex;
    justify-content: center;
    align-items: center;
    width:175px;
    position: relative;
  }
  
  .home_mat img {
      width:150px;
      position: absolute;
      bottom:-32px;
  }
  
  .home_info {
    padding: 8px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: -15px !important;
    padding: 10px !important;
  }
  
  .home_title,
  .home_subtitle,
  .home_btn sl-button::part(label) {
    color: #fff!important;
  }
  
  .home_title {
    white-space: pre-line;
  }
  
  .home_sub {
    font-size: var(--font_large);
    white-space: pre-line;
    color: #fff!important;
  }

  .home_sub span {
    display:none;
    color:#fff;
  }

  .about_ribblr_joann a::before {
    content:""!important;
  }

  #loading img {
    width: 80px;
}

  .panel a {
    text-decoration: underline;
    display:inline;
  }

  .learnmorelink {
    /*color: #f0f0f0; */
    opacity: 0.8;
    text-decoration: underline;
    /* display: block; */
    /* font-style: italic; */
    font-size: 13px;
    margin-left: 10px;
    font-weight: 400;
  }
  
  .home_btn sl-button::part(base) {
    border: 1px solid var(--White);
    background: #fbf9fc26;
    box-sizing: border-box;
    border-radius: 99px;
    height: 44px;
  }
  
  .home_btn sl-button::part(label) {
    padding: 0px 16px;
    font-size: var(--font_large);
    font-weight: 500;
    box-sizing: border-box;
  }

  .about_ribblr_joann {
    max-width: 1132px;
    margin: 40px auto;
    width: calc(100% - 32px);
}
  
@media only screen and (max-width: 500px) {
  .materials_banner {
    background-position-x: 0px;
  }

  .explain_for_code {
    overflow: hidden;
    flex-direction: column;
  }

    .dialog__panel, sl-drawer::part(panel), sl-dialog::part(panel) {
        max-height: 85vh!important;
    }

}
@media only screen and (max-width: 1024px) {

    .home_info {
      width:290px;
    }
}

  @media only screen and (min-width: 1024px) {

    .shopnowimgbanner {
      border-radius:24px;
    }

    .explain_container {
      gap:24px;
    }
  
    .home_sub span {
      display:block;
    }
  
    .home_img {
      height: 180px;
      flex-basis: 30%;
    }

    .home_mat {
      width: 275px;
      position: relative;
    }
  
    .home_mat img {
        width: 250px;
        position: absolute;
        bottom: -32px;
    }
  }

  .shopnowimgbanner {
    width:100%;
  }

  /* banner end */

  .craft_type {
    display:none;
  }

/* ------------------ */  
.reg_form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    padding: 20px;
    background: #fff;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    font-family: Arial, sans-serif;
    z-index: 1000;
}

.close_button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    color: #ff5c5c;
}

.reg_label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

sl-input {
    width: 100%;
    margin-bottom: 12px;
}

.sm-info-note {
color: var(--textSecondary);
text-align: left;
background: #eae1ed;
padding: 12px;
border-radius: 16px;
display: flex;
flex-direction: row;
gap: 8px;
font-size:12px;
margin:16px 0 0 0;
}

sl-button, sl-button#shopnowbtn::part(base), sl-button#reg_dialog_btn::part(base), sl-button#signup_dialog_btn::part(base), sl-button#login_dialog_btn::part(base), sl-button#login_btn::part(base), sl-button#change_pwd_btn::part(base) {
  border: 1px solid var(--Purple);
  background: var(--Purple);
  color: #fff;
  border-radius: 31px;
  font-size:16px;
}

.shopnowbtn {
display:block;
width:fit-content;
margin:16px auto;
}

sl-drawer::part(panel), sl-dialog::part(panel) {
  background-color: #f2edf5;
    border-radius: 24px;
}

sl-textarea::part(textarea), sl-input::part(input) {
  color:var(--text-color);
}

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

#success_popup, #email_in_use_popup, #key_in_use_popup {
    display: none;
    background: lightgreen;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    color: #fff;
}

#email_in_use_popup, #key_in_use_popup {
    background: lightcoral;
}

.field_error_name {
    display: none;
    color: red;
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}

.black_background {
    position: fixed;
    top: 0;
    padding-top: env(safe-area-inset-top);
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sm-info-container {
  height:275px;
}
.explain_for_code {
  /*display: flex; 
      gap: 16px;
*/
    margin: 35px auto 30px auto;
    align-items: center;
    max-width:320px;
}

.explain_for_code img {
  max-width: 100%;
    border-radius: 24px;
}

.sm-info-card {
  position:relative;
}
.sm-info-card .decoration {
  position: absolute;
  width: 75px;
  left: 0px;
  top: -20px;
}
.more_to_see {
  text-align: left;
  font-size: 12px;
  margin: 12px 0;
}

.claim_input {
  --sl-input-border-radius-small: 8px;
}
.claim_input::part(base) {
  border: none;
}

#pattern_info {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--background-component);
    padding: 16px;
    border-radius: 24px;
    height:190px;
}
.popup_info_text {
  min-width:90px;
}
#reg_dialog_btn, #signup_dialog_btn, #login_dialog_btn, #login_btn, #change_pwd_btn {
  width:100%;
}

.popup_img img {
  max-height: 160px;
  /* height: auto; */
  border-radius: 16px;
  /* width: 100%; */
  object-fit: cover;
  max-width: 170px;
  cursor: pointer;
}

/* images enlarge */

/* Fullscreen overlay for the image */
.image-overlay {
  position: fixed;
  top: 0;
  padding-top: env(safe-area-inset-top);
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Visible state for the overlay */
.image-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Enlarged image inside the overlay */
.image-overlay img {
  width: 80vw;
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  cursor: pointer;
  border-radius:24px;
}

.popup_art, .popup_name, .popup_shop, .popup_sizes, .popup_level {
  margin-bottom: 8px;
  font-size: 14px;
  /* font-weight: bold; */
  /* text-align: center; */
  border-bottom: 0.25px solid #efdff9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: break-word;
    line-height:20px;
}

.popup_name {
    font-weight:600;
}

.change_store_online {
  display: block;
    margin: 10px 0 20px;
    /* font-weight: 300; */
    font-size: 13px;
    width: fit-content;
    font-style: italic;
}

/* change x button to black */
sl-dialog::part(close-button__base) {
  color:black!important;
}

.sale_price_before, .pattern_price span {
  text-decoration: line-through;
  font-size: var(--font_second);
  margin-left: 0 !important;
  opacity: .7;
}

.sale_price {
  display: none !important;
}
  
  .pattern_text_name {
  height:auto!important;
  }

  .not_purchased_yet {
    display: block;
    margin: 10px 0 20px;
    /* font-weight: 300; */
    font-size: 12px;
    width: fit-content;
    /* font-style: italic; */
    background: #a471fb45;
    border-radius: 24px;
    padding: 2px 10px;
}