/* =========================================================
   JC Solar Panels Notice Manager - Front-end styles
   ========================================================= */

#jcsp-site-notice {
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
    font-family: inherit;
}

#jcsp-site-notice.jcsp-show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#jcsp-site-notice .jcsp-notice-inner {
    box-sizing: border-box;
}

#jcsp-site-notice.jcsp-template-bottom-right,
#jcsp-site-notice.jcsp-template-bottom-left,
#jcsp-site-notice.jcsp-template-bottom-center,
#jcsp-site-notice.jcsp-template-center-modal {
    width: calc(100% - 48px);
    max-width: 390px;
    background: #fff;
    border: 1px solid #e4e7eb;
    border-radius: 14px;
    padding: 28px 26px 24px;
    box-shadow: 0 14px 40px rgba(8, 39, 62, .16);
}

#jcsp-site-notice.jcsp-template-bottom-right {
    right: 24px;
    bottom: 24px;
}

#jcsp-site-notice.jcsp-template-bottom-left {
    left: 24px;
    bottom: 24px;
}

#jcsp-site-notice.jcsp-template-bottom-center {
    left: 50%;
    bottom: 24px;
    max-width: 520px;
    transform: translate(-50%, 18px);
}

#jcsp-site-notice.jcsp-template-bottom-center.jcsp-show {
    transform: translate(-50%, 0);
}

/* Center-screen square-style popup */
#jcsp-site-notice.jcsp-template-center-modal {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(88vw, 430px);
    max-width: 430px;
    min-height: 390px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 30px 30px;
    transform: translate(-50%, calc(-50% + 18px)) scale(.985);
}

#jcsp-site-notice.jcsp-template-center-modal.jcsp-show {
    transform: translate(-50%, -50%) scale(1);
}

#jcsp-site-notice.jcsp-template-center-modal .jcsp-notice-inner {
    width: 100%;
    text-align: center;
}

#jcsp-site-notice.jcsp-template-center-modal .jcsp-notice-badge,
#jcsp-site-notice.jcsp-template-center-modal h3 {
    margin-right: 0;
}

#jcsp-site-notice.jcsp-template-center-modal .jcsp-notice-button {
    min-width: 180px;
}

#jcsp-site-notice .jcsp-notice-badge {
    display: inline-block;
    margin: 0 38px 9px 0;
    color: var(--jcsp-accent, #f28c00);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .75px;
    text-transform: uppercase;
}

#jcsp-site-notice h3 {
    margin: 0 38px 12px 0;
    color: var(--jcsp-heading, #13171b);
    font-size: 22px;
    line-height: 1.22;
    font-weight: 750;
}

#jcsp-site-notice .jcsp-notice-message,
#jcsp-site-notice .jcsp-notice-message p {
    margin: 0 0 12px;
    color: #333a41;
    font-size: 14px;
    line-height: 1.58;
}

#jcsp-site-notice .jcsp-notice-message p:last-child,
#jcsp-site-notice .jcsp-notice-small p:last-child {
    margin-bottom: 0;
}

#jcsp-site-notice .jcsp-notice-small,
#jcsp-site-notice .jcsp-notice-small p {
    margin: 0 0 17px;
    color: #697078;
    font-size: 12px;
    line-height: 1.5;
}

#jcsp-site-notice .jcsp-notice-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--jcsp-button-bg, #111111);
    border-radius: 7px;
    background: var(--jcsp-button-bg, #111111);
    color: var(--jcsp-button-text, #ffffff);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .2s ease, transform .2s ease;
}

#jcsp-site-notice .jcsp-notice-button:hover,
#jcsp-site-notice .jcsp-notice-button:focus {
    color: var(--jcsp-button-text, #ffffff);
    opacity: .9;
    transform: translateY(-1px);
}

#jcsp-site-notice .jcsp-notice-close {
    position: absolute;
    top: 11px;
    right: 12px;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #25292d;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
}

#jcsp-site-notice .jcsp-notice-close:hover,
#jcsp-site-notice .jcsp-notice-close:focus {
    opacity: 1;
    background: #f4f5f6;
}

/* Top announcement bar template */
#jcsp-site-notice.jcsp-template-top-bar {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e4e7eb;
    box-shadow: 0 6px 22px rgba(8, 39, 62, .12);
    transform: translateY(-100%);
}

#jcsp-site-notice.jcsp-template-top-bar.jcsp-show {
    transform: translateY(0);
}

#jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 58px 14px 20px;
}

#jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-badge {
    margin-bottom: 5px;
}

#jcsp-site-notice.jcsp-template-top-bar h3 {
    display: inline;
    margin-right: 10px;
    font-size: 17px;
}

#jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-message,
#jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-message p {
    display: inline;
    margin: 0;
    font-size: 13px;
}

#jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-small {
    display: none;
}

#jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-button {
    min-height: 36px;
    margin-left: 12px;
    padding: 7px 13px;
    font-size: 12px;
}

.admin-bar #jcsp-site-notice.jcsp-template-top-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #jcsp-site-notice.jcsp-template-top-bar {
        top: 46px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #jcsp-site-notice.jcsp-template-bottom-right,
    #jcsp-site-notice.jcsp-template-bottom-left,
    #jcsp-site-notice.jcsp-template-bottom-center {
        left: 14px;
        right: 14px;
        bottom: 14px;
        width: auto;
        max-width: none;
        padding: 22px 20px 20px;
        border-radius: 12px;
        transform: translateY(18px);
    }

    #jcsp-site-notice.jcsp-template-bottom-right.jcsp-show,
    #jcsp-site-notice.jcsp-template-bottom-left.jcsp-show,
    #jcsp-site-notice.jcsp-template-bottom-center.jcsp-show {
        transform: translateY(0);
    }

    #jcsp-site-notice.jcsp-template-center-modal {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        width: min(90vw, 390px);
        max-width: 390px;
        min-height: 0;
        aspect-ratio: auto;
        padding: 28px 22px 24px;
        transform: translate(-50%, calc(-50% + 18px)) scale(.985);
    }

    #jcsp-site-notice.jcsp-template-center-modal.jcsp-show {
        transform: translate(-50%, -50%) scale(1);
    }

    #jcsp-site-notice h3 {
        font-size: 19px;
    }

    #jcsp-site-notice .jcsp-notice-message,
    #jcsp-site-notice .jcsp-notice-message p {
        font-size: 13px;
    }

    #jcsp-site-notice .jcsp-notice-button {
        width: 100%;
    }

    #jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-inner {
        padding: 12px 52px 12px 14px;
    }

    #jcsp-site-notice.jcsp-template-top-bar h3,
    #jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-message,
    #jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-message p {
        display: block;
    }

    #jcsp-site-notice.jcsp-template-top-bar h3 {
        margin-bottom: 5px;
        font-size: 16px;
    }

    #jcsp-site-notice.jcsp-template-top-bar .jcsp-notice-button {
        width: auto;
        margin: 9px 0 0;
    }
}
