/* base.css followed from Code Institute's walk-through "Boutique Ado",
and PP2 "Estonia Quiz" */

/* Google fonts import */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&display=swap');

html {
    height: 100%;
}

/* General styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Cormorant Garamond', serif;
    background-image: url('https://kellys-art-and-photo-boutique.s3.eu-north-1.amazonaws.com/media/website_background_opt_200.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-color: #FFFFFF;
    color: #555555;
    text-align: left;
    line-height: 1;
}

img {
    max-width: 100%;
    height: auto;
}

/* Styling of Headings and Logo */

h1 {
    font-size: 2.6rem;
    padding-top: 5px;
}

h2 {
    font-size: 2rem;
    width: 100%;
    font-weight: bold;
}

/* Styling of Navbar, NavLinks, Logo, and reduction of repetition fixed with ChatGPT's guidance. */
/* Logo */

.header-container {
    width: 100%;
    margin-bottom: 1rem;
}

.boutique-logo {
    width: auto;
    max-width: 7rem;
    height: auto;
}

/* Navbar - base */
.navbar {
    width: 100%;
    line-height: 1rem;
    padding-left: 10px;
    padding-right: 10px;
    min-height: 65px;
    box-shadow: 0 4px 9px rgb(59, 132, 165);
}

/* NavBar Links and Dropdown items */
.navbar .nav-link,
.navbar .dropdown-toggle,
.navbar .dropdown-item {
    font-weight: bold;
    color: black !important;
    position: relative;
    display: inline-block;
    transition: color 0.2s ease-in-out;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

/* Underline effect on hover. Fix learned from chatGPT */
.navbar .nav-link:not(.dropdown-toggle):not(.main-logo-link):hover:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: rgb(29, 97, 157);
    transition: width 0.2s ease-in-out;
}

.navbar-collapse {
    border-top: none;
}

.navbar-collapse.show {
    display: block !important;
}

/* Show parent as active, when one of it's dropdown items is active */
.navbar .dropdown-item.active {
    color: cornflowerblue !important;
    background-color: transparent !important;
}

/* Header Icons wrapper - fixed with chatGPT's guidance */
.header_icons {
    display: flex;
    align-items: center;
}

/* Hover effect for clickable Navbar icons and Logo - fixed with chatGPT */
.nav-link:hover,
.navbar-toggler:hover,
.main-logo-link:hover {
    cursor: pointer;
    transform: scale(1.05);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.13);
    border-radius: 3px;
    will-change: transform;
}

/* ----- Search - styling fixed with chatGPT's guidance ----- */
/* Search Form - hidden by default - fixed with chatGPT's guidance */
.search_form {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1050;
    background: #FFFFFF;
    padding: 0.4rem;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.13);
}

/* Active Search Form, Input and Button - fixed with chatGPT's guidance */
.search_form.active {
    display: flex;
    justify-content: flex-end;
    width: auto;
}

.search_form form {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
}

.search_form input,
.search_form button {
    height: 2rem;
    font-size: 1rem;
    line-height: 1.2;
}

.search_form input {
    flex: 1;
    min-width: 8rem;
    margin-right: 0.4rem;
}

.search_form button {
    flex-shrink: 0;
    margin-left: 0.4rem;
}

/* No underline effect for Search Icon */
#search_toggle::after {
    content: none;
}

/* Container styling */

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    height: auto;
    margin-top: 7rem;
    max-width: 400px;
}

/* from Bulma */
.icon {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    height: 1.5rem;
    width: 1.5rem;
}

.click-here-to-shop-button {
    position: fixed;
    bottom: 220px;
    left: 50px;
    background: cornflowerblue;
    color: white;
    min-width: 150px;
}

.btn-blue {
    background: cornflowerblue;
    color: white;
}

.btn-outline-black {
    background: white;
    color: black !important;
    border: 1px solid black;
}

.btn-outline-black:hover,
.btn-outline-black:active,
.btn-outline-black:focus {
    background: rgb(28, 28, 209);
    color: white !important;
}

.click-here-to-shop-button:hover,
.click-here-to-shop-button:active,
.click-here-to-shop-button:focus,
.social-networks:hover,
.social-networks:active,
.social-networks:focus,
.btn-blue:hover,
.btn-blue:active,
.btn-blue:focus {
    background: rgb(28, 28, 209);
    color: white;
}

.text-black {
    color: #000 !important;
}

.border-black {
    border: 1px solid black !important;
}

.bg-blue {
    background: cornflowerblue !important;
}

.overlay {
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background: white;
    z-index: -1;
    pointer-events: none;
}

/* Product card - clickable (not just image, and badge) - copied from chatGPT after csp fix stopped image click */
.product_card {
    position: relative;
    cursor: pointer;
    z-index: 1;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product_card:hover {
    border: 1px solid #474d54;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.16);
    border-radius: 0.4rem;
    transform: translateY(-2px);
}

.product_card * {
    pointer-events: none;
}

.product_card a {
    pointer-events: auto;
    cursor: pointer !important;
}

/* Image Container - styling fixed with ChatGPT's guidance */
.image_container {
    width: 100%;
    border-radius: 0.3rem;
    display: flex;
    justify-content: center;
    padding: 8px;
}

.image_inner_box {
    width: 90%;
    max-height: 260px;
    background-color: #FFFFFF;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
    border-radius: 0.2rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4px;
    background: linear-gradient(140deg, #FFFFFF, #f6f6f6);
}

.image_inner_box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

a.category-badge > span.badge:hover {
    background: rgb(28, 28, 209) !important;
    color: #ffffff !important;
}

.btt-button {
    height: 42px;
    width: 42px;
    position: fixed;
    bottom: 10px;
    right: 10px;
}

.btt-link,
.update-link,
.remove-item {
    cursor: pointer;
}

input[name='q']::placeholder {
    color: #555555;
}

/* ----- Bootstrap Toasts from Boutique Ado ------ */

.message-container {
    position: fixed;
    top: 72px;
    right: 15px;
    z-index: 99999999999;
}

.custom-toast {
    overflow: visible;
}

.toast-capper {
    height: 2px;
}

/* ------ From Boutique Ado walk-through (CSS-tricks.com: https://css-tricks.com/snippets/css/css-triangle/) Modified by developer ---- */
.arrow-up {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 10px solid cornflowerblue;
    position: absolute;
    top: -10px;
    right: 36px;
}

/* Submit form styling. To reduce the size of the message box on the screen */
/* So user can see buttons at all times on most screens. Learned from Chat gpt */
textarea[name="message"] {
    height: 70px;
    max-height: 150px;
    overflow-y: auto;
    resize: vertical;
}

.logo-font {
    font-size: 2rem;
    font-weight: bold;
}

/* ------- Convenience Classes from Boutique Ado(colors copied from Bootstrap), edited by developer ------ */
.arrow-primary {
    border-bottom-color: cornflowerblue !important;
}

.arrow-secondary {
    border-bottom-color: #435f78 !important;
}

.arrow-success {
    border-bottom-color: #04280c !important;
}

.arrow-danger {
    border-bottom-color: #50070e !important;
}

.arrow-warning {
    border-bottom-color: #d8a714 !important;
}

.arrow-info {
    border-bottom-color: cornflowerblue !important;
}

.arrow-light {
    border-bottom-color: #919497 !important;
}

.arrow-dark {
    border-bottom-color: #021527 !important;
}

.cart-notification-wrapper {
    height: 100px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Allauth form formatting */

.allauth-form-inner-content p {
    margin-top: 1.5rem; /* mt-4 */
    color: cornflowerblue; /* text-secondary */
}

.allauth-form-inner-content input {
    border-color: #000;
    border-radius: 0;
}

.allauth-form-inner-content label:not([for='id_remember']) {
    display: none;
}

.allauth-form-inner-content input::placeholder {
    color: #555555;
}

.allauth-form-inner-content button,
.allauth-form-inner-content input[type='submit'] {
    /* btn */
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: cornflowerblue;
    border: 1px solid #000;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0;

    /* Standard bootstrap btn transitions */
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.allauth-form-inner-content button:hover,
.allauth-form-inner-content input[type='submit']:hover {
    color: #fff;
    background-color: rgb(28, 28, 209);
    border-color: #222;
}

.allauth-form-inner-content a {
    color: #17a2b8; /* text-info */
}

/* Product Form */

.btn-file {
    position: relative;
    overflow: hidden;
}

.btn-file input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox .custom-control-label::before {
    border-radius: 0;
    border-color: #dc3545;
}

.custom-checkbox .custom-control-input:checked~.custom-control-label::before {
    background-color: #dc3545;
    border-color: #dc3545;
    border-radius: 0;
}

/* Footer - styling based on previous project: [quiz](https://github.com/BarbyKelly/quizproject/blob/main/assets/css/style.css)*/

.footer {
    margin-top: auto;
    width: 100%;
    background: #ffffff;
    color: #021527;
    text-align: center;
    font-size: medium;
    bottom: 0;
    padding: .1rem;
}

footer {
    margin-top: auto;
}

#social-networks {
    text-align: center;
    display: flex;
    justify-content: space-evenly;
    list-style-type: none;
    margin-bottom: 0;
}

#social-networks i {
    font-size: 1.2rem;
    color: cornflowerblue;
}

/* ---- Media Queries learned from PP2 (for PP2 learned from https://www.youtube.com/watch?v=K24lUqcT0Ms) ---- */
/* ---- Media Queries edited with chatGPT's guidance ---- */
/* Media Queries for 'XS' screens (portrait phones, tablets, less than 576px */
@media (max-width: 575.98px) {
  .container {
    max-width: 570px;
  }

  .navbar {
    font-size: medium;
  }
}

/* Media Queries for 'S' screens (landscape phones, tablets less than 768px) */
@media (max-width: 767.98px) {
  .container {
    max-width: 750px;
  }

  .navbar .nav-link {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Top navbar fix on Medium and up screens */
@media (min-width: 992px) {
    .fixed-top-desktop-only {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1030;
    }

    .header-container {
        padding-top: 10px;
    }

    /* Search Form - fixed with chatGPT's guidance */
    .search_form {
        width: auto;
        margin-top: 0;
    }

    .search_form.active {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .search_form.active form {
        flex-direction: row;
        align-items: center;
        width: auto;
    }

    .search_form.active input {
        width: 12rem;
        margin: 0 0.5rem 0 0;
    }

    .search_form.active button {
        margin: 0;
        width: auto;
    }
}

/* Media Queries for 'M' screens (laptops, tablets, less than 992px*/
@media (max-width: 991.98px) {
    .container {
        max-width: 990px;
  }

    .header-container {
        padding-top: 10px;
    }

    body {
        height: calc(100vh - 116px);
    }
}

/* Media Queries for 'L' screens (desktops, less than 1200px - fixed with chatGPT's guidance */
@media (max-width: 1199.98px) {
    .container {
      max-width: 100%;
    }

    /* Burger Menu to stay full width - fixed with chatGPT's guidance */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        max-width: 250px;
        background: #FFFFFF;
        border-left: 0.4px solid #919497;
        border-bottom: 0.4px solid #919497;
        box-shadow: 0 1px 3px rgba(0,0,0.02);
        z-index: 1040;
    }

    /* All items inside Burger dropdown, same width - fixed with chatGPT's guidance */
    .navbar-collapse .nav-item {
        background-color: transparent;
        color: #000;
    }

    /* Dropdown menu inside Burger - fixed with chatGPT's guidance */
    .navbar-collapse .dropdown-menu {
        width: 100%;
        position: static;
        margin-left: 0;
        box-shadow: none;
        border: none;
        background-color: transparent;
    }

    .navbar .nav-link {
        font-size: 19px;
        padding: 0.25rem 0.1rem;
    }

    .nav-item.mx-3 {
        margin-left: 0.1rem;
        margin-right: 0.1rem;
    }

    .navbar-nav {
        flex-wrap: wrap;
    }

    .navbar-toggler {
        padding: .6rem .6rem;
        font-size: 1rem;
    }

    .nav-link {
        padding: 0.15rem;
    }

    .nav-link i.fa-lg {
        font-size: 1rem;
    }

    .btn.btn-outline-black.rounded-0,
    .btn.btn-blue.rounded-0 {
        padding: .375rem .375rem;
    }

    .btn.btn-outline-black.rounded-0.btn-lg,
    .btn.btn-blue.rounded-0.btn-lg {
        padding: .375rem .375rem;
        font-size: .75rem;
    }
}

/* Media 1200 min-width - fixed with chatGPT's guidance */
@media (min-width: 1200px) {
    .navbar .nav-link {
        font-size: 19px;
    }

    .navbar .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Media Queries for 'XL' screens (large desktops, less than 1400px */
@media (max-width: 1399.98px) {
  .container {
    max-width: 1350px;
  }

  .click-here-to-shop-button {
    font-size: large;
    min-width: 200px;
  }
}

/* Media Queries for 'XXL' screens (large desktops, more than 1400px */
@media (min-width: 1399.99px) {
  .container {
    min-width: 1350px;
  }

  .click-here-to-shop-button {
    font-size: large;
    min-width: 200px;
  }
}
