/* Google Fonts: Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

/* ------------------------------------ General */
body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: #201425;
    font-family: "Poppins", sans-serif;
}

main {
    flex: 1 0 auto;
    margin-top: 56px;
}

label {
    font-weight: 600;
}

/* ------------------------------------ Colours */

/* Background colors */
.bg-brand-green {
    background-color: #008B20;
}

.bg-brand-brown {
    background-color: #442A23;
}

.bg-brand-gray {
    background-color: #F8F9F8;
}

.bg-brand-yellow {
    background-color: #FFC633;
}

.bg-white {
    background-color: #ffffff;
}

.bg-modal {
    background-color: #412f2bb2;
}

.bg-toast {
    background-color: #ffffffda;
}

.bg-banner {
    background-color: #412f2b90;
}

/* Font colors */
.brand-brown {
    color: #442A23;
}

.brand-green {
    color: #008B20;
}

.brand-yellow {
    color: #FFC633;
}

.brand-dark {
    color: #201425;
}

.red {
    color: #a90606;
}

.white {
    color: #ffffff;
}

/* ------------------------------------ Heights/sizing */

.w-full {
    width: 100%;
}

.h-30 {
    height: 30px;
}

.h-min-300 {
    min-height: 300px;
}

.max-w-370 {
    max-width: 370px;
}

.max-w-900 {
    max-width: 900px;
}

.square-30 {
    width: 30px;
    height: 30px;
}

.square-70 {
    width: 70px;
    height: 70px;
}

.square-150 {
    height: 150px;
    width: 150px;
}

.square-220 {
    height: 220px;
    width: 220px;
}

.max-h-370 {
    max-height: 370px;
}

.h-line {
    height: 2.5px;
}

/* ------------------------------------ Images */
.img-cover {
    object-fit: cover;
    width: 100%;
}

.img-round {
    border-radius: 50%;
    aspect-ratio: 1/1;
}

/* ------------------------------------ Font sizes */
.fs-rem-90 {
    font-size: 0.9rem !important;
}

.fs-rem-110 {
    font-size: 1.1rem;
}

.fs-rem-120 {
    font-size: 1.2rem;
}

.fs-rem-130 {
    font-size: 1.3rem;
}

.fs-rem-150 {
    font-size: 1.5rem;
}

.fs-rem-180 {
    font-size: 1.8rem;
}

.fs-rem-250 {
    font-size: 2.5rem;
}

/* ------------------------------------ Font styles */

.fw-600 {
    font-weight: 600;
}

.hover-bold:hover {
    font-weight: 600;
}

/* ------------------------------------ Buttons and Links */

/* Utility classes for buttons and links */
.standard-link {
    text-decoration: none;
}

.standard-link:hover,
.standard-link:active {
    text-decoration: underline;
}

.btn-rounded {
    border-radius: 2em;
}

.btn-shadow {
    box-shadow: 6px 6px 12px #f1f2f1,
        -6px -6px 12px #ffffff;
}

.btn-shadow:hover,
.btn-shadow:active {
    box-shadow: 6px 6px 12px #d3d4d3,
        -6px -6px 12px #ffffff;
}

/* Standard buttons */
.btn-yellow {
    border: 2px solid #FFC633;
    background-color: #FFC633;
}

.border-btn-yellow {
    border: 2px solid #FFC633;
    background-color: #ffffff;
}

.btn-yellow:hover,
.btn-yellow:focus,
.btn-yellow:active,
.btn.btn-yellow.btn-shadow:active,
.border-btn-yellow:hover,
.border-btn-yellow:focus,
.border-btn-yellow:active,
.btn.border-btn-yellow.btn-shadow:active {
    border: 2px solid #FFC633;
    background-color: #FFC633;
}

.border-btn-red {
    border: 2px solid #a90606;
    background-color: #ffffff;
}

.border-btn-red:hover,
.border-btn-red:focus,
.border-btn-red:active {
    border: 2px solid #a90606;
    background-color: #a90606;
    color: white;
}

.border-btn-green {
    border: 2px solid #008B20;
    background-color: #ffffff;
}

.border-btn-green:hover,
.border-btn-green:focus,
.border-btn-green:active {
    border: 2px solid #008B20;
    background-color: #008B20;
    color: white;
}

.border-btn-gray {
    border: 2px solid #9e9696;
    background-color: #ffffff;
}

.border-btn-gray:hover,
.border-btn-gray:focus,
.border-btn-gray:active {
    border: 2px solid #9e9696;
    background-color: #9e9696;
}

/* Custom buttons */
.searchbar .btn {
    border: none;
}

.searchbar .btn:hover,
.searchbar .btn:focus,
.searchbar .btn:active {
    background-color: #008B20;
}

.category-btns .btn:hover,
.category-btns .btn:active,
.category-btns .btn:focus {
    background-color: transparent;
    color: #ffc633;
    border: 1px solid #ffc633;
}

/* Icon buttons */
.icon-button {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

.icon-button-stroke {
    color: #008B20;
}

.icon-button-stroke:hover,
.icon-button-stroke:active {
    color: #076c1f;
    -webkit-text-stroke: 1px #065f1b;
}

.card-heart-icon button {
    top: 0;
    right: 0;
    color: #ffffff;
    -webkit-text-stroke: 1.3px #4a3c50;
    /* Outline color and thickness for WebKit browsers */
    padding: 0;
}

.card-heart-icon button:hover,
.card-heart-icon button:active,
.card-heart-icon:focus {
    color: #4a3c50;
    -webkit-text-stroke: 1.3px #ffffff;
}

/* Recipe cards pagination */
.page-link,
.page-link:hover {
    color: black;
}

.active-page .page-link {
    background-color: #008B20;
    color: #ffffff;
}

/*-------------------------------- Misc utilities */
.shadow {
    box-shadow: 6px 6px 12px #e9eae9,
        -6px -6px 12px #ffffff;
}

.border-subtle {
    border: 1px solid #dadeda;
}

.below-header {
    margin-top: 65px;
}

/* ------------------------------------ SPECIFIC STYLES */
/* ------------------------------------ Navbar/Header */

.navbar-brand img {
    aspect-ratio: 5.66 / 1;
}

.nav-container {
    border-bottom: 0.5px solid #04330f;
}

/* -------------------------------- Hero section with content overlay */
.hero-section {
    height: 550px;
    background: #008B20 url("https://res.cloudinary.com/deceun0wd/image/upload/q_auto:good/v1713091288/hero-small_llutpr.webp") no-repeat center top/cover;
}

.hero-section-wallpaper {
    height: 450px;
    background: #FFC633 url("https://res.cloudinary.com/deceun0wd/image/upload/q_auto/v1713094260/pattern-white_bdituv.webp") no-repeat center top/cover;
}

.searchbar-outline {
    border-radius: 15px;
    padding: 10px;
    border: 1.5px solid white;
}

.searchbar {
    border-radius: 15px;
}

/* ------------------------------------ Recipe cards */

.card-img-top {
    aspect-ratio: 3/2;
}

/* Credit: https://blog.logrocket.com/ways-truncate-text-css/ */
.truncate-two-lines {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    line-height: 1.5;
    max-height: 3em;
}

/* Credit: https://blog.logrocket.com/ways-truncate-text-css/ */
.truncate-three-lines {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 4;
    line-height: 1.5;
    max-height: 6em;
}

.card-heart-icon {
    position: absolute;
    top: 0;
    right: 0;
}

.card-heart-icon p {
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    -webkit-text-stroke: 1.3px #4a3c50;
}

.unfavourited-card {
    position: relative;
}

.unfavourited-card::after {
    content: "";
    /* Create a pseudo-element to act as the overlay */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(61, 56, 56, 0.835);
    z-index: 1;
}

.unfavourited-p {
    z-index: 99;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
}

/* --------------------------------- Recipe detail page */
.recipe-instructions li {
    margin-top: 20px;
}

.recipe-instructions li::marker {
    font-weight: 600;
}

/* ------------------------------------ Comments */

#comments-input textarea {
    height: 150px;
}

.comment-inactive p {
    color: #9b969e;
}

/* to increase priority */
.red.small {
    color: #a90606;
}

/* ------------------------------------ Ratings */
.selected {
    color: #008B20;
}

/* ------------------------------------ Signup/Sign in */
.errorlist li {
    color: #a90606;
}

form.signup div {
    margin-top: 10px;
}

/* ------------------------------------Footer */
.line-top {
    border-top: 0.5px solid white;
}

/* ------------------------------------------------ MEDIUM SCREENS */
@media screen and (min-width: 768px) {

    /* ---------------------------------- Font sizes */
    .fs-rem-md-120 {
        font-size: 1.2rem !important;
    }

    .fs-rem-md-180 {
        font-size: 1.8rem;
    }

    /* --------------------------------- SPECIFIC STYLES - Medium screens */
    /* -------------------------------- Hero section with content overlay */
    .hero-section {
        height: 550px;
        background: #008B20 url("https://res.cloudinary.com/deceun0wd/image/upload/q_auto:good/v1713093337/hero_z0n0ks.webp") no-repeat center top/cover;
    }

    /* --------------------------------- Recipe detail page */
    .recipe-instructions {
        border-left: 2.5px solid #008B20;
    }

    /* --------------------------------- Features page (home page) */
    .circle {
        height: 180px;
        width: 180px;
        line-height: 180px;
        border-radius: 50%;
        text-align: center;
    }

    .circle-white {
        background-color: #ffffff;
    }

    .circle-gray {
        background-color: #F8F9F8;
    }

    /* ---------------------------------- Comments */
    .comment-body {
        border-left: 2px solid #008B20;
    }
}

/* ------------------------------------------------ LARGE SCREENS */
@media screen and (min-width: 992px) {

    /* ------------------------------- General */
    main {
        margin-top: 66px;
    }

    .below-header {
        margin-top: 75px;
    }

    /* ------------------------------ Heights/sizing */
    .h-l-40 {
        height: 40px;
    }

    .h-l-min-400 {
        min-height: 400px;
    }

    .max-h-l-450 {
        max-height: 450px;
    }

    .square-l-200 {
        height: 200px;
        width: 200px;
    }

    .square-l-300 {
        height: 300px;
        width: 300px;
    }

    /* ------------------------------ Font sizes */
    .fs-rem-lg-125 {
        font-size: 1.25rem;
    }

    .fs-rem-lg-160 {
        font-size: 1.6rem;
    }

    .fs-rem-lg-180 {
        font-size: 1.8rem;
    }

    /* --------------------------------- SPECIFIC STYLES - Large screens */
    /* ----------------------------------- Features page (home page) */
    .circle,
    .circle-white,
    .circle-gray {
        height: auto;
        width: auto;
        line-height: normal;
        border-radius: initial;
        text-align: initial;
        background-color: initial;
    }

    /* -------------------------------- Navbar/Header */
    .navbar-brand img {
        aspect-ratio: 5.66 / 1;
    }

    .line-left {
        border-left: 1px solid white;
    }
}