﻿/* =============================================================================
   Empty category / department page - "Option A": the "no records" popup
   (ModalPopupAddtocart) becomes an inline card in the content area, the teal
   "Sorry !! No Records found" bar is dropped (the card says it), and the
   sidebar's "No data found" box turns into a quiet note.

   Works on the existing markup: the code-behind still toggles the popup's
   display, so the card only appears when the category is empty. js/empty-cat.js
   adds the heading (department + country), the icon, the department tiles and
   relabels the Go button.

   Second variant (.ec-card): pages such as shopListByCatSection.aspx have no
   popup, only a <div id="divMsg"> with the text and a .couponinputarea form.
   empty-cat.js gives that div the class ec-card and the same inner classes
   (modalCont, modalTxtareaSec, mtxtareaBoot, buttGo), so every rule below,
   written as :is(.ModalPopupAddtocart.PopupAdj, .ec-card), covers both.

   Colours are the page's own: text #393939 / #191919, sidebar note #f57c20,
   "Click here" #e93808, orange Go button (its own background), rules #eaeaea,
   grey ground #ececec.
   ============================================================================= */

/* the teal bar is redundant next to the card */
.divNorecord {
    display: none !important;
}

/* ...unless it is the only thing the page shows (a filter matched nothing):
   empty-cat.js then turns it into the card (third variant, class ec-card) */
.divNorecord.ec-card {
    display: grid !important;
}

/* that filter card has no tiles: single column, text only */
.ec-card.ec-plain {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: none !important;
}

    .ec-card.ec-plain .modalCont {
        margin-bottom: 0;
    }

/* the message div has its own rule in my-custom.css, by id (float, 97% width,
   inset grey shadow, justified text, percentage padding and margins); as a card
   none of that applies, and only an id selector can override it */
#ctl00_ContentPlaceHolder1_divMsg.ec-card {
    float: none !important;
    width: auto !important;
    box-shadow: none !important;
    text-align: left !important;
    border: 1px solid #eaeaea !important;
    padding: 26px 34px 22px !important;
    margin: 16px 0 34px !important;
}

    #ctl00_ContentPlaceHolder1_divMsg.ec-card.ec-plain .modalCont {
        margin: 0 !important;
    }

@media only screen and (max-width: 767.98px) {
    #ctl00_ContentPlaceHolder1_divMsg.ec-card {
        padding: 18px 16px 16px !important;
        margin: 0 0 24px !important;
    }
}

:is(.ModalPopupAddtocart.PopupAdj, .ec-card) {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 16px 0 34px !important;
    z-index: auto;
    box-sizing: border-box;
    padding: 26px 34px 22px;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: auto auto auto auto auto auto 1fr;
    column-gap: 36px;
    row-gap: 0;
    align-items: start;
}

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) > * {
        grid-column: 1;
        min-width: 0;
    }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .modalHead {
        display: none;                  /* "ETHNIV" bar + close button */
    }

    /* header row inserted by empty-cat.js: department icon in an orange square,
       eyebrow "Department · Country", heading */
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-head {
        display: flex;
        align-items: center;
        gap: 16px;
        margin: 0 0 20px;
    }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-head .ec-head-text {
            min-width: 0;
        }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-icon {
        flex: none;
        width: 52px;
        height: 52px;
        margin: 0;
        border-radius: 14px;
        background: rgba(245, 124, 32, .12);
        color: #f57c20;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-icon svg {
            width: 26px;
            height: 26px;
        }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-eyebrow {
        margin: 0 0 4px;
        font-size: 11px;
        line-height: 15px;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #f57c20;
    }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-title {
        margin: 0;
        font-size: 24px;
        line-height: 30px;
        font-weight: 600;
        color: #292929;
    }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .modalCont {
        float: none;
        width: auto;
        max-width: 560px;
        margin: 0 0 18px;
        padding: 0;
        font-size: 14px;
        line-height: 21px;
        text-align: left;
    }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .mailUscont {
        width: auto;
        margin: 0;
        padding: 0 0 8px;
        font-size: 13px;
        font-weight: 600;
    }

    /* email + button on one line */
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .modalTxtareaSec {
        float: none;
        width: auto;
        max-width: 520px;
        margin: 0 0 6px;
        padding: 0;
        display: flex;
        gap: 10px;
    }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) input.mtxtareaBoot {
            flex: 1 1 auto;
            width: auto;
            min-width: 0;
            height: 38px;
            margin: 0;
            padding: 0 12px;
            border: 1px solid #c9d3de;
            border-radius: 6px;
            font-size: 13px;
            box-sizing: border-box;
        }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) input.mtxtareaBoot:focus {
                outline: none;
                border-color: #f57c20;
            }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .buttGo {
            flex: none;
            width: auto !important;         /* modal.css gives Go a fixed width that clips "Notify me" */
            min-width: 120px;
            height: 35px;
            margin: 0;
            padding: 0 18px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
        }

    /* one or two departments only: the panel hugs its content instead of stretching
       to the card's height, and each tile takes the full panel width */
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts.ec-few {
        align-self: start;
    }

    /* department list (empty-cat.js / EmptyCategory.ascx) - the card's right
       column: one row per department, sorted by stock, count as a pill */
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts {
        grid-column: 2;
        grid-row: 1 / span 7;
        align-self: stretch;
        box-sizing: border-box;
        padding: 14px 18px 10px;
        border: 1px solid #eaeaea;
        border-radius: 10px;
        background: #fafbfc;
        align-content: start;
        font-size: 12px;
        color: #6a6a6a;
    }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts .ec-label {
            display: block;
            margin: 0 0 2px;
            font-size: 14px;
            font-weight: 600;
            color: #292929;
        }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 6px 0;
            border-bottom: 1px solid #e3e8ec;
            color: #393939;
            font-size: 13px;
            font-weight: 600;
            line-height: 17px;
            text-decoration: none;
            transition: color .15s ease;
        }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a:last-of-type {
                border-bottom: 0;
            }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a .ec-name {
                min-width: 0;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            /* the icon: a 30px rounded badge, blue line icon on a light ground */
            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a .ec-ico {
                flex: none;
                width: 30px;
                height: 30px;
                border-radius: 8px;
                background: #ececec;
                color: #3b6bb4;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: background .15s ease, color .15s ease;
            }

                :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a .ec-ico svg {
                    display: block;
                    width: 18px;
                    height: 18px;
                }

            /* product count as a pill on the right */
            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a small {
                flex: none;
                margin-left: auto;
                padding: 2px 9px;
                border-radius: 12px;
                background: #e9f0f8;
                color: #3b6bb4;
                font-size: 11px;
                font-weight: 600;
                line-height: 15px;
            }

            /* arrow that appears on hover */
            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a::after {
                content: "\203A";
                flex: none;
                width: 8px;
                color: #f57c20;
                font-size: 18px;
                line-height: 15px;
                opacity: 0;
                transition: opacity .15s ease;
            }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a:hover {
                color: #f57c20;
            }

                :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a:hover .ec-ico {
                    background: #f57c20;
                    color: #fff;
                }

                :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a:hover::after {
                    opacity: 1;
                }

            /* rows past the sixth, and the link that reveals them */
            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts a.ec-hide {
                display: none;
            }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts.is-open a.ec-hide {
                display: flex;
            }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts .ec-depts-more {
            display: block;
            margin: 2px 0 0;
            padding: 4px 0 0;
            border: 0;
            background: none;
            color: #3b6bb4;
            font-family: inherit;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts .ec-depts-more:hover {
                color: #f57c20;
            }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts.is-open .ec-depts-more {
                display: none;
            }

    /* "Sell with ethniv ? Click here" as the card's footer */
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .modalFooter {
        grid-row: 7;                    /* the 1fr row: sits on the card's bottom edge, level with the panel */
        align-self: end;
        width: auto;
        margin: 22px 0 0;
        padding: 14px 0 0;
        border-top: 1px solid #eaeaea;
        font-size: 13px;
        color: #6a6a6a;
    }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .modalFooter a {
            font-weight: 600;
        }

/* ---- sidebar: "No data found under this category" ---- */
#BlkMenu {
    min-height: 0;
    padding: 12px 10px;
    border: 1px dashed #d1d1d1;
    border-radius: 6px;
    background: none;
    font-size: 12px;
    line-height: 18px;
}

/* ---- phones ---- */
@media only screen and (max-width: 991.98px) {
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-depts {
            grid-column: 1;
            grid-row: auto;
            margin-top: 16px;
        }
}

@media only screen and (max-width: 767.98px) {
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) {
        margin: 10px 0 24px !important;
        padding: 22px 16px 18px;
    }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-head {
            gap: 12px;
            margin-bottom: 14px;
        }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
        }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-title {
            font-size: 18px;
            line-height: 24px;
        }

        :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .modalTxtareaSec {
            flex-wrap: wrap;
        }

            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) input.mtxtareaBoot,
            :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .buttGo {
                flex-basis: 100%;
            }
}

/* ---- .ec-card variant: neutralise the inline style on the message div ---- */
.ec-card {
    color: #393939 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    padding: 26px 34px 22px !important;
    float: none !important;
    width: auto !important;
}

    /* .couponinputarea rules from my-custom.css (90% width, inset-shadow input) */
    .ec-card .couponinputarea {
        width: auto;
        padding: 0;
    }

        .ec-card .couponinputarea input[type="text"] {
            float: none;
            width: auto;
            box-shadow: none;
        }

        .ec-card .couponinputarea input[type="submit"] {
            float: none;
        }

@media only screen and (max-width: 767.98px) {
    .ec-card {
        padding: 22px 16px 18px !important;
    }
}

/* ---- "Popular stores in <country>" under the card (empty-cat.js / EmptyCategory.ascx):
   the top 10 stores as a static grid, five per row, with a "View more" link ---- */
.ec-stores {
    margin: -18px 0 34px;               /* tucks under the card's 34px bottom margin */
}

    .ec-stores-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 0 10px;
        font-size: 15px;
        font-weight: 600;
        color: #292929;
    }

        .ec-stores-head .ec-stores-more {
            font-size: 13px;
            font-weight: 600;
            color: #3b6bb4;
            text-decoration: none;
            white-space: nowrap;
        }

            .ec-stores-head .ec-stores-more:hover {
                color: #f57c20;
            }

    .ec-stores-track {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
        padding: 2px 2px 6px;
    }

    .ec-store {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        box-sizing: border-box;
        padding: 12px 14px;
        border: 1px solid #eaeaea;
        border-radius: 10px;
        background: #fff;
        color: #393939;
        text-decoration: none;
        transition: box-shadow .15s ease, border-color .15s ease;
    }

        .ec-store:hover {
            border-color: #f57c20;
            box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
        }

        .ec-store img {
            flex: none;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            border: 1px solid #eaeaea;
            background: #fff;
            object-fit: cover;
        }

        .ec-store .ec-store-body {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

            .ec-store .ec-store-body b {
                font-size: 13px;
                font-weight: 600;
                line-height: 17px;
                color: #292929;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .ec-store .ec-store-body small {
                font-size: 11px;
                line-height: 15px;
                color: #878787;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }

            .ec-store .ec-store-body em {
                font-style: normal;
                font-size: 11px;
                font-weight: 600;
                color: #3b6bb4;
            }

        .ec-store:hover .ec-store-body b {
            color: #f57c20;
        }

@media only screen and (max-width: 1199.98px) {
    .ec-stores-track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 991.98px) {
    .ec-stores-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 767.98px) {
    .ec-stores {
        margin: -10px 0 24px;
    }

    .ec-stores-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 575.98px) {
    .ec-stores-track {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* small phones (last so it wins over the phone block above): drop the header icon so the heading stays on one line */
@media only screen and (max-width: 575.98px) {
    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-head {
        gap: 0;
        margin-bottom: 12px;
    }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-icon {
        display: none;
    }

    :is(.ModalPopupAddtocart.PopupAdj, .ec-card) .ec-title {
        font-size: 16px;
        line-height: 22px;
    }
}
