/**
 * Copyright since 2026 Prestachamps
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 *
 * @author    Prestachamps
 * @copyright Since 2026 Prestachamps
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */

/* ---------- Modal overlay ---------- */
body .pchwr-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, .55) !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    padding: 30px 16px !important;
    margin: 0 !important;
}
body .pchwr-overlay.pchwr-open {
    display: flex !important;
}

body .pchwr-overlay .pchwr-modal {
    background: #fff !important;
    max-width: 520px !important;
    width: 100% !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    padding: 36px !important;
    position: relative !important;
    box-shadow: 0 14px 50px rgba(0, 0, 0, .28) !important;
    font-family: inherit;
    color: #3a3a3a !important;
    border-top: 4px solid var(--pchwr-primary, #2f7a3a) !important;
    border-radius: 2px !important;
    margin: 0 !important;
}

body .pchwr-overlay .pchwr-close {
    position: absolute !important;
    top: 16px !important;
    right: 20px !important;
    background: none !important;
    border: 0 !important;
    font-size: 30px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #9e9e9e !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
}
body .pchwr-overlay .pchwr-close:hover {
    color: var(--pchwr-primary, #2f7a3a) !important;
}

body .pchwr-overlay .pchwr-modal h3.pchwr-h {
    margin: 0 0 32px !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    color: var(--pchwr-primary, #2f7a3a) !important;
    font-weight: 600 !important;
    text-align: left !important;
}

body .pchwr-overlay .pchwr-intro {
    color: #6b6b6b !important;
    margin: 0 0 24px !important;
    line-height: 1.6 !important;
    font-size: 13px !important;
    font-family: inherit;
    text-align: left !important;
}

/* ---------- Form fields ---------- */
body .pchwr-overlay .pchwr-field {
    margin-bottom: 16px !important;
}
body .pchwr-overlay .pchwr-field label {
    display: block !important;
    font-weight: 500 !important;
    margin: 0 0 4px !important;
    color: #3a3a3a !important;
    font-size: 12px !important;
    font-family: inherit;
    text-align: left !important;
}
body .pchwr-overlay .pchwr-field input.form-control,
body .pchwr-overlay .pchwr-field input[type="text"],
body .pchwr-overlay .pchwr-field input[type="email"],
body .pchwr-overlay .pchwr-field input {
    width: 100% !important;
    padding: 14px !important;
    font-size: 14px !important;
    color: #3a3a3a !important;
    border: 1px solid #cfcfcf !important;
    background: #fff !important;
    box-sizing: border-box !important;
    font-family: inherit;
    border-radius: 2px !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}
body .pchwr-overlay .pchwr-field input::placeholder {
    color: #9e9e9e !important;
    opacity: 1 !important;
}
body .pchwr-overlay .pchwr-field input:focus {
    outline: none !important;
    border-color: var(--pchwr-primary, #2f7a3a) !important;
    box-shadow: 0 0 0 2px rgba(var(--pchwr-primary-rgb, 47, 122, 58), .15) !important;
}

/* ---------- Honeypot ---------- */
body .pchwr-overlay .pchwr-hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* ---------- Submit button ---------- */
body .pchwr-overlay .pchwr-submit,
body .pchwr-overlay button.pchwr-submit {
    width: 100% !important;
    margin: 6px 0 0 !important;
    padding: 13px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    font-family: inherit;
    line-height: 1.2 !important;
    border-radius: 2px !important;
    background-color: var(--pchwr-primary, #2f7a3a) !important;
    background-image: none !important;
    border: 1px solid var(--pchwr-primary, #2f7a3a) !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: background-color .15s ease, border-color .15s ease !important;
    text-shadow: none !important;
}
body .pchwr-overlay .pchwr-submit:hover,
body .pchwr-overlay .pchwr-submit:focus {
    background-color: var(--pchwr-primary-dark, #256330) !important;
    border-color: var(--pchwr-primary-dark, #256330) !important;
    color: #fff !important;
}
body .pchwr-overlay .pchwr-submit:disabled {
    background-color: #9e9e9e !important;
    border-color: #9e9e9e !important;
    cursor: not-allowed !important;
}

/* ---------- Status messages ---------- */
body .pchwr-overlay .pchwr-msg {
    margin: 18px 0 0 !important;
    padding: 14px 18px !important;
    display: none !important;
    border-radius: 2px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}
body .pchwr-overlay .pchwr-msg.pchwr-error {
    display: block !important;
    background: #fdecea !important;
    color: #b71c1c !important;
    border: 1px solid #f5c6c2 !important;
}
body .pchwr-overlay .pchwr-msg.pchwr-success {
    display: block !important;
    background: #eaf5ec !important;
    color: #1e4620 !important;
    border: 1px solid #c3e2c9 !important;
}

@media (max-width: 767px) {
    body .pchwr-overlay .pchwr-modal { padding: 20px !important; }
    body .pchwr-overlay .pchwr-modal h3.pchwr-h { margin-bottom: 18px !important; }
    body .pchwr-overlay .pchwr-intro { margin-bottom: 18px !important; }
    body .pchwr-overlay .pchwr-field { margin-bottom: 12px !important; }
}

/* ---------- Footer opener button ---------- */
body #pchwr-footer-li {
    list-style: none !important;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
}
body a#pchwr-footer-link {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: var(--pchwr-primary, #2f7a3a) !important;
    padding: 12px 18px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border: 1px solid #ffffff !important;
    border-radius: 3px !important;
    letter-spacing: .4px !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15) !important;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease !important;
}
body a#pchwr-footer-link:hover,
body a#pchwr-footer-link:focus {
    background-color: #f0f0f0 !important;
    color: var(--pchwr-primary-darker, #1f5e2a) !important;
    border-color: #f0f0f0 !important;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22) !important;
}
body a#pchwr-footer-link:active {
    transform: translateY(1px) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .18) !important;
}

/* ---------- Fallback footer opener (themes without #footer_account_list) ---------- */
body .pchwr-fallback-wrap {
    width: 100% !important;
    text-align: center !important;
    padding: 20px 16px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: end !important;
}
body a#pchwr-fallback-link {
    display: inline-block !important;
    background-color: var(--pchwr-primary, #2f7a3a) !important;
    background-image: none !important;
    color: #ffffff !important;
    padding: 12px 28px !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border: 1px solid var(--pchwr-primary, #2f7a3a) !important;
    border-radius: 3px !important;
    letter-spacing: .4px !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12) !important;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease !important;
}
body a#pchwr-fallback-link:hover,
body a#pchwr-fallback-link:focus {
    background-color: var(--pchwr-primary-dark, #256330) !important;
    border-color: var(--pchwr-primary-dark, #256330) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18) !important;
}
body a#pchwr-fallback-link:active {
    transform: translateY(1px) !important;
}

/* ---------- My Account tile ----------
 * PS 9 renders the displayCustomerAccount hook in BOTH the left sidebar
 * (.account-menu__nav) and the main grid (.account-menu--main). The tile
 * needs to look different in each, matching its siblings.
 */
a#pchwr-account-link { cursor: pointer; }

/* PS 9 — sidebar context (.account-menu.account-menu--sidebar):
 * Plain inline list row, no card. Icon left + text right, matches the other
 * sidebar items (My alerts, GDPR, etc.) — no background, no border.
 */
.account-menu--sidebar a#pchwr-account-link,
.account-menu--sidebar .pchwr-open-modal {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #212529 !important;
    text-decoration: none !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
}
.account-menu--sidebar a#pchwr-account-link .link-item {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    color: #212529 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.account-menu--sidebar a#pchwr-account-link .material-icons {
    color: #212529 !important;
    font-size: 22px !important;
    margin: 0 !important;
    line-height: 1 !important;
}
.account-menu--sidebar a#pchwr-account-link:hover,
.account-menu--sidebar a#pchwr-account-link:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: #212529 !important;
    text-decoration: none !important;
    opacity: 0.75 !important;
}

/* PS 9 — main grid context (.account-menu / .account-menu--main):
 * Card with light grey background, but icon-LEFT + text-RIGHT layout and
 * tighter padding (per request).
 */
.account-menu--main a#pchwr-account-link,
.account-menu a#pchwr-account-link,
.account-menu--main .pchwr-open-modal,
.account-menu .pchwr-open-modal {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    padding: 14px 18px !important;
    background: #f5f6f8 !important;
    background-image: none !important;
    border: none !important;
    border-radius: 8px !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    box-shadow: none !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    box-sizing: border-box !important;
}
.account-menu--main a#pchwr-account-link .link-item,
.account-menu a#pchwr-account-link .link-item {
    display: inline-flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
}
.account-menu.account-menu--sidebar a#pchwr-account-link .link-item{
    flex-direction: row !important;
}
.account-menu.account-menu--sidebar a#pchwr-account-link{
    background:none !important;
}
.account-menu--main a#pchwr-account-link .material-icons,
.account-menu a#pchwr-account-link .material-icons {
    color: #1a1a1a !important;
    font-size: 24px !important;
    margin: 0 !important;
    line-height: 1 !important;
}
.account-menu--main a#pchwr-account-link:hover,
.account-menu a#pchwr-account-link:hover {
    background: #eceef2 !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
}
