/*COLOUR-PALETTE.HTML STYLING*/
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;800&display=swap');

/*GLOBAL STYLES*/
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #FBF4EE;
  font-family: 'Roboto', sans-serif;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
}

/* links */
a {
  text-decoration: none;
}

.link-as-button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #E18E26;
    color: #FBF4EE;
    padding: 4px 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    width: fit-content;
    line-height: 1.5;
}

.link-as-button:hover{
    background-color: #BF9055;
}

.link-as-button:active{
    background-color: #575548;
}

/* buttons */
button{
   all: unset;
   background-color: #E18E26;
   color: #FBF4EE;
   padding: 5px 20px;
   cursor: pointer;
   font-weight: 500;
   border-radius: 10px;
   text-align: center;
   max-width: 1592px;
}

button:hover{
    background-color: #BF9055;
}

button:active{
    background-color: #575548;
}


/* MAIN CONTAINER LAYOUT*/
#main-container{
  display: grid;
  grid-template-rows: auto;
  margin: 0 auto;
  padding: 4px 80px 60px 80px;
  max-width: 1405px;
  min-width: 530px;
  box-sizing: border-box;
}


/*HEADER SECTION*/
#logo {
    grid-row: 1;
    margin-left: 30px;
    margin-bottom: 20px;
}

#logo img{
    max-width: 350px;
}


/*MOVIE INFORMATION SECTION*/
#movie-information-container{
    grid-row: 2;
    display: grid;
    grid-template-columns: 0.5fr 2fr;
}

/* movie information and poster */
#title-container{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

#movie-title{
    grid-row: 3;
    font-size: 25px;
    font-weight: 600;
    color: #1E1D17;
    margin: 0px;
}

#back-button {
     margin: 0 50px 10px 0;
     border-radius: 10px;
}


#movie-poster{
    grid-column: 1;
    margin-left: 30px;
}


#movie-poster img{
    width: auto;
    height: 420px;
}

#movie-details{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin-left: 50px;
    height: 100%;
}

/* colour palettes */
#colour-palette-group {
    margin-top: auto;
}

#colour-palette-heading{
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.colour-palette{
    grid-row: 5;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}

#palette-1{
    margin-bottom: 10px;
}

#palette-2{
    margin-bottom: 5px;
}

.colour-box {
     width: 70px;
     height: 150px;
     margin: 0px;
}


/* VISUALISER SECTION */
#visualiser-container{
    grid-row: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 0.25fr 3fr;
    position: relative;
    padding-top: 35px;
    padding-bottom: 35px;
}

/* full-width background */
#visualiser-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background-color: #F8E9D8;
    z-index: -1;

    /* blurred edge effect */
        mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,1) 50px, rgba(0,0,0,1) calc(100% - 50px), rgba(0,0,0,0) 100%);
        mask-repeat: no-repeat;
        mask-size: 100% 100%;
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,1) 100px, rgba(0,0,0,1) calc(100% - 50px), rgba(0,0,0,0) 100%);
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-size: 100% 100%;
        filter: blur(40px);
}

#visualiser-heading{
    grid-row: 1;
    grid-column: 1 / span 2;
    justify-self: center;
    font-size: 25px;
    font-weight: 600;
    margin-top: 32px;
}

/* colour matches styling */
#dulux-colours-container{
    grid-row: 2;
    grid-column: 1;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    padding: 18px 35px 35px;
}

#matched-colour-palette{
    display: flex;
    flex-wrap: wrap;
}

#secondary-matched-colour-palette{
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
}

.matched-colour-box {
    width: 100px;
    height: 70px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-between;
}

/* selecting style buttons */
.style-button{
    display: none;
    width: 48%;
    box-sizing: border-box;
    border-radius: 0px;
    font-size: 10px;
    padding: 2px;
    opacity: 0.8;
}

.style-button:hover{
    background-color: #BF9055;
}
.style-button:active{
    background-color: #575548;
}

.dulux-buy-link {
    display: block;
    margin: 5px auto 10px;
}


/* room selector and preview styling */
#room-container{
    grid-row: 2;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 10px 10px;
}


#button-menu{
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
    gap: 20px;

}

#room-selector{
    width: 25%;
}

#reset-button{
    width: 25%;
}


/* room preview styling with masks */
.bedroom-preview {
    position: relative;
    display: inline-block;
    margin: 20px 20px 20px 0;
}

.bedroom-preview img.bedroom-base {
    display: block;
    width: 100%;
    height: auto;
}

.bedroom-preview .mask_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    object-fit: cover;
}

.mask_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    mix-blend-mode: multiply;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: cover;
    mask-repeat: no-repeat;
    mask-size: cover;
}


/* RECOMMENDATIONS SECTION */
#recommendations-container {
    grid-row: 5;
    display: grid;
    margin: 0px 10px 0;
}

#recommendations-heading {
     grid-row: 1;
     grid-column: 1;
     font-size: 25px;
     font-weight: 600;
     color: #1E1D17;
     text-align: center;
}

#recommended-movies-flexbox{
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.recommended-movie {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #F8E9D8;
}

.recommended-movie:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(30, 29, 23, 0.15);
}

.recommended-movie a {
    display: block;
    margin: 0;
}

.recommended-movie a:hover {
    color: inherit;
}

.recommended-poster {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.dominant-colour-indicator {
    width: 100%;
    height: 10px;
    border-radius: 3px;
    margin-top: 5px;
}


/* E-COMMERCE SECTION */
#e-commerce-container{
    grid-row: 4;
    display: grid;
    margin: 0 50px 20px 50px;
}

#e-commerce-heading{
    font-size: 25px;
    font-weight: 600;
    color: #1E1D17;
    text-align: center;
    margin-bottom: 0px;
}

#redbubble-section {
    margin-top: 2rem;
}

.redbubble-link-container {
    background: #E18E26;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.redbubble-link-container h3 {
    margin: 0 0 0.5rem 0;
    color: white;
    font-size: 1.2rem;
}

.redbubble-link-container p {
    margin: 0 0 1rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.redbubble-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.redbubble-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.redbubble-logo {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-text {
    font-size: 0.9rem;
}

.external-link-icon {
    font-size: 1.1rem;
    opacity: 0.8;
}



/*MEDIA QUERIES and WEBKIT/ FIREFOX*/

/* 1400px breakpoint */
@media (max-width: 1400px) {
  .colour-box {
       height: 75px;
  }
}

/* 1331px breakpoint */
@media (max-width: 1331px) {
  #dulux-colours-container {
    padding-right: 0px;
  }

  #room-container{
    padding: 10px;
  }

  .bedroom-preview{
    margin: 20px 0 0 0;
  }
}

/* 1320px breakpoint */
@media (max-width: 1320px) {
  #visualiser-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  #visualiser-heading {
    grid-row: 1;
    grid-column: 1;
    text-align: center;
  }

  #dulux-colours-container {
    grid-row: 3;
    grid-column: 1;
    padding: 35px;
    justify-self: center;
  }

  #matched-colour-palette{
    justify-content: center;
  }

  #secondary-matched-colour-palette{
    justify-content: center;
  }

  #room-container {
    grid-row: 2;
    grid-column: 1;
    justify-self: center;
    align-items: center;
  }

  #button-menu{
      align-items: center;
      justify-content: center;
  }

}

/* 1149px breakpoint */
@media (max-width: 1149px) {
  #dulux-colours-container {
    padding: 0;
  }
}

/* 979px breakpoint */
@media (max-width: 979px) {
  .colour-box {
       height: 50px;
  }

  #recommended-movies-grid {
       grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
       gap: 15px;
   }

   .recommended-poster {
       height: 200px;
   }

   .recommended-title {
       font-size: 13px;
   }

   #recommendations-heading {
       font-size: 20px;
   }
}

/* 840px breakpoint */
@media (max-width: 880px) {
  #movie-information-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  #movie-poster {
    grid-row: 1;
    grid-column: 1;
    justify-self: center;
    margin: 0;
  }

  #movie-details {
    grid-row: 2;
    grid-column: 1;
    margin-left: 0;
    align-items: center;
    text-align: center;
  }

  .colour-palette{
    justify-content: center;
  }

  #title-container{
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  #back-button {
     margin-right: 0px;
  }

  #logo {
    justify-self: center;
    align-self: center;
    margin-left: 0px;
  }
}

/* 768px breakpoint */
@media (max-width: 768px) {
    .redbubble-link {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* 610px breakpoint */
@media (max-width: 610px) {
  #room-selector {
    width: 80%;
  }

  #recommended-movies-grid {
       grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
       gap: 12px;
   }

   .recommended-poster {
       height: 180px;
   }

   .recommended-title {
       font-size: 12px;
   }

   #recommendations-heading {
       font-size: 18px;
       margin-bottom: 20px;
   }

   .dominant-colour-indicator {
       height: 4px;
   }

  #button-menu{
       flex-direction: column;
       align-items: center;
       justify-content: center;
       gap: 10px;
    }

  #button-menu button{
    width: 50%;

  }

}

/* 569px breakpoint */
@media (max-width: 569px) {
  #visualiser-container::before {
    background-color: transparent;
  }
}


/* Chrome, Safari, Edge Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #FBF4EE;
}

::-webkit-scrollbar-thumb {
  background-color: #E18E26;
  border-radius: 6px;
  border: 3px solid #FBF4EE;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #E18E26 #FBF4EE;
}
