/* Shared header and footer styling for the Club. */
body.right-sidebar #header-wrapper,
body.homepage #header-wrapper {
    height: auto;
    background: #fff;
    border-bottom: 1px solid #e1e4e2;
}

body.right-sidebar #header-wrapper:before,
body.right-sidebar #header-wrapper:after,
body.right-sidebar #footer-wrapper:before,
body.homepage #header-wrapper:before,
body.homepage #header-wrapper:after,
body.homepage #footer-wrapper:before {
    display: none;
}

body.right-sidebar #header h1 a,
body.right-sidebar #titleBar .title,
body.homepage #header h1 a,
body.homepage #titleBar .title {
    color: #16643b;
}

body.homepage #header #nav,
body.right-sidebar #header #nav {
    border-block: 1px solid #e1e4e2;
    border-image: linear-gradient(#e1e4e2, #e1e4e2) 1;
    border-image-outset: 0 100vmax;
    padding-block: 0.4rem;
}

body.right-sidebar #nav > ul > li > a,
body.homepage #nav > ul > li > a {
    margin: 2px 0;
    border: 1px solid transparent;
    border-radius: 14px;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #35423a;
}

body.right-sidebar #nav > ul > li.current_page_item > a,
body.homepage #nav > ul > li.current_page_item > a {
    background: #edf8f2;
    border-color: #00a651;
    color: #16643b !important;
}

body.right-sidebar #footer-wrapper,
body.homepage #footer-wrapper {
    padding: 1.5em 1em;
    background: #fff;
    border-top: 1px solid #e1e4e2;
    color: #4a514d;
}

body.right-sidebar #footer-wrapper .row,
body.homepage #footer-wrapper .row {
    padding-bottom: 0;
}

body.right-sidebar #footer-wrapper ul.social,
body.homepage #footer-wrapper ul.social {
    margin: 0 0 0.7em;
}

#footer-wrapper ul.social li a {
    width: auto;
    height: auto;
    line-height: 1.4;
    padding: 0.3em 0.2em;
    background: transparent;
    color: #464646;
    font-size: 0.9em;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

#footer-wrapper ul.social li a:hover,
#footer-wrapper ul.social li a:focus {
    background: #edf8f2;
    color: #16643b;
}

#footer-wrapper ul.social li a:before {
    margin-right: 0.45em;
    color: inherit;
    font-size: 1em;
    line-height: 1;
}

#footer-wrapper ul.social li a span { display: inline; }

body.right-sidebar #footer-wrapper #copyright,
body.homepage #footer-wrapper #copyright {
    margin: 0;
}

body.right-sidebar #footer-wrapper #copyright .links,
body.homepage #footer-wrapper #copyright .links {
    padding: 0.25em 0.5em;
    background: transparent;
}

body.right-sidebar #footer-wrapper #copyright a,
body.homepage #footer-wrapper #copyright a {
    color: #16643b;
}

#header .club-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    max-width: 100%;
}

#header .club-brand img {
    display: block;
    width: 235px;
    max-width: 59vw;
    height: auto;
}

#header .club-brand span {
    padding-left: 0.45em;
    border-left: 1px solid #cfd3d1;
    font-size: 0.52em;
    font-weight: 600;
    letter-spacing: normal;
}

#footer-wrapper #copyright:before {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    margin: 0.35em auto 0.65em;
    background: #e1e4e2;
}

.club-site-footer {
    clear: both;
    margin: 0;
    background: #fff;
    border-top: 18px solid #db551f;
    padding: clamp(2rem, 5vw, 4rem) 1.25rem 1.6rem;
    color: #555b57;
}

.club-site-footer__inner { max-width: 1050px; margin: 0 auto; }

.club-site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.club-site-footer__identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.club-site-footer__identity img { flex: none; width: 60px; height: auto; }
.club-site-footer__identity strong { color: #282d2a; font-size: 1.25rem; }
.club-site-footer__identity p { margin: 0.15rem 0 0; }

.club-site-footer nav h2 {
    margin: 0 0 0.5rem;
    color: #00823d;
    font-size: 0.92rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.club-site-footer nav ul { list-style: none; margin: 0; padding: 0; }
.club-site-footer nav li { margin: 0.3rem 0; }
.club-site-footer a { color: #555b57; text-decoration: none; }
.club-site-footer a:hover, .club-site-footer a:focus-visible { color: #00823d; text-decoration: underline; }

.club-site-footer__social {
    display: flex;
    gap: 0.55rem;
    margin-top: 1rem;
}

.club-site-footer__social a {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid #d9e0dc;
}

.club-site-footer__social a > :is(i, span) {
    display: block;
    margin: 0;
    font-style: normal;
    font-size: 1rem;
    line-height: 1;
}

.club-site-footer__social a > .fa::before {
    display: block;
    font-size: 1em;
    line-height: 1;
}

.club-site-footer__legal {
    margin: 2.5rem 0 0;
    text-align: center;
    color: #292d2a;
    font-size: 0.9rem;
}

@media (max-width: 760px) {
    .club-site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 400px) {
    .club-site-footer__grid { grid-template-columns: 1fr; }
}

.club-contact__channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 2rem;
}

.club-contact {
    max-width: 780px;
    margin: 0 auto;
}

.club-contact__channels { margin: 1.5em 0; }
.club-contact__channels dt { color: #16643b; font-weight: 700; }
.club-contact__channels dd { margin: 0; }

.club-contact img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.club-public-page { max-width: 850px; margin: 0 auto; }
.club-public-page h3 { margin: 1.4rem 0 0.45rem; color: #16643b; }
.club-public-page a:not(.button) { color: #16643b; }
.club-public-page__image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.club-public-page__sites { padding-left: 1.2rem; }
.club-public-page__sites li { margin-bottom: 0.35rem; }
.club-policy__document { overflow-wrap: anywhere; margin-bottom: 1.25rem; }
.club-policy__document h2, .club-policy__document h3 { margin: 1.2em 0 0.45em; }

.club-login {
    display: grid;
    grid-template-columns: minmax(0, 1.5225fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.25rem, 4vw, 3.5rem);
    max-width: 1090px;
    margin: 1.25rem auto 0;
}

.club-login__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.club-login__card {
    padding: clamp(1.25rem, 3vw, 2.15rem);
    border: 1px solid #e1e4e2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(35, 52, 42, 0.13), 0 2px 6px rgba(35, 52, 42, 0.06);
    text-align: left;
}

.club-login__card h2 { margin: 0 0 0.35rem; }
.club-login__card p { margin: 0 0 1.2rem; }
.club-login__card form { margin: 0 0 0.9rem; }
.club-login__card label { display: block; margin-bottom: 0.25rem; font-weight: 600; }

.club-login__card input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 44px;
    margin: 0 0 1rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #bcc6bf;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    color: #282d2a;
}

.club-login__card input:focus {
    outline: 2px solid #00823d;
    outline-offset: 2px;
}

.club-login__card .club-login__submit {
    width: 100%;
    min-height: 44px;
    background: #c91f27;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-weight: 700;
}

.club-login__card .club-login__submit:hover { background: #a81820; }
.club-login__card .club-login__help { color: #16643b; }
.club-login__card .club-login__alert {
    padding: 0.65rem 0.8rem;
    background: #fff0f0;
    color: #8d1d23;
    border-radius: 6px;
}

@media (max-width: 760px) {
    .club-login { grid-template-columns: minmax(0, 1fr); }
    .club-login__card { grid-row: 1; }
}

body.homepage,
body.right-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
}

/* The responsive theme wraps the page after JavaScript initializes. */
body:is(.homepage, .right-sidebar) #skel-panels-pageWrapper {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

body.club-login-page #header-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

body.club-login-page #header-wrapper > .container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

body.club-login-page .club-login {
    width: 100%;
    margin: auto;
    padding-top: 1.25rem;
}

body.homepage #header-wrapper,
body.right-sidebar #main-wrapper { flex: 1 0 auto; }

body:is(.homepage, .right-sidebar) .club-site-footer {
    flex: 0 0 auto;
    margin-top: auto;
}

/* Typography shared with the main Wineflowers website. */
body.homepage,
body.right-sidebar,
body.homepage table,
body.right-sidebar table,
body.homepage .archive-pages,
body.right-sidebar .archive-pages,
body.right-sidebar .singnature {
    font-family: "Hind", system-ui, sans-serif;
}

body.homepage :is(h1, h2, h3, h4, h5, h6, #nav, #titleBar, .club-site-footer__identity strong),
body.right-sidebar :is(h1, h2, h3, h4, h5, h6, #nav, #titleBar, .club-site-footer__identity strong) {
    font-family: "Montserrat", system-ui, sans-serif;
}

body.homepage :is(button, input, select, textarea),
body.right-sidebar :is(button, input, select, textarea) {
    font-family: inherit;
}

/* Allow the legacy grid to shrink on tablets and phones. */
@media (max-width: 1200px) {
    body.homepage,
    body.right-sidebar { min-width: 0; }

    body.homepage .container,
    body.right-sidebar .container {
        width: 100%;
        min-width: 0;
        max-width: calc(100% - 2rem);
    }

    body.right-sidebar :is(input, select, textarea, img),
    body.homepage :is(input, select, textarea, img) { max-width: 100%; }

    body.right-sidebar table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 760px) {
    body.homepage #header-wrapper,
    body.right-sidebar #header-wrapper { padding-inline: 0; }

    body.homepage #header-wrapper { padding-bottom: 1.5rem !important; }

    body.right-sidebar .box { overflow-wrap: anywhere; }
}

/* Keep login history cells aligned across the full table width. */
body.right-sidebar table.club-login-log-table {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.club-login-log-table th,
.club-login-log-table td { overflow-wrap: anywhere; }

@media (max-width: 760px) {
    .club-login-log-table th,
    .club-login-log-table td { padding-inline: 0.4rem; }
}

.club-contact__email {
    padding: 1.25rem;
    margin-bottom: 1.6rem;
    border: 1px solid #dfe4e1;
    border-radius: 8px;
    background: #f5faf7;
}

.club-contact h3, .club-contact__help dt { color: #16643b; font-weight: 700; }
.club-contact__email p { margin: 0.4rem 0 0.8rem; }
.club-contact__help { margin: 0.5rem 0 1.5rem; }
.club-contact__help > div { padding: 0.7rem 0; border-bottom: 1px solid #e1e4e2; }
.club-contact__help dd { margin: 0.2rem 0 0; }

.club-finder fieldset {
    min-width: 0;
    margin: 0 0 1.15rem;
    padding: 0.85rem 1rem 1rem;
    border: 1px solid #dfe4e1;
    border-radius: 9px;
    background: #fafcfb;
}

.club-finder legend {
    padding: 0 0.3rem;
    color: #16643b;
    font-weight: 700;
}

.club-finder__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
}

.club-finder label { display: block; min-width: 0; font-weight: 600; }
.club-finder label span { display: block; margin-bottom: 0.2rem; }
.club-finder__wide { grid-column: 1 / -1; }

.club-finder :is(input, select) {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid #bcc6bf;
    border-radius: 6px;
    background-color: #fff;
    color: #282d2a;
    font: inherit;
    font-weight: 400;
}

.club-finder :is(input, select):focus {
    outline: 2px solid #00823d;
    outline-offset: 1px;
}

.club-finder__actions { text-align: center; }
.club-finder__actions button { min-width: 9rem; }

@media (max-width: 760px) {
    .club-finder__grid { grid-template-columns: minmax(0, 1fr); }
    .club-finder__actions button { width: 100%; }
}

/* Match Find Orders while respecting the existing field layout. */
body.right-sidebar :is(
    #register-form2,
    #order-form[action="resultUsers.php"],
    #order-form[action="validate.php?form=add-order"],
    #order-form[action="validate.php?form=update-order"],
    #order-form[action="validate.php?form=update-order2"]
) :is(input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="reset"]), select, textarea) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #bcc6bf;
    border-radius: 6px;
    background-color: #fff;
    color: #282d2a;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.25;
}

body.right-sidebar :is(
    #register-form2,
    #order-form[action="resultUsers.php"],
    #order-form[action="validate.php?form=add-order"],
    #order-form[action="validate.php?form=update-order"],
    #order-form[action="validate.php?form=update-order2"]
) :is(input, select, textarea):focus-visible {
    outline: 2px solid #00823d;
    outline-offset: 1px;
}

body.right-sidebar :is(
    #register-form2,
    #order-form[action="resultUsers.php"],
    #order-form[action="validate.php?form=add-order"],
    #order-form[action="validate.php?form=update-order"],
    #order-form[action="validate.php?form=update-order2"]
) select.styled-select {
    appearance: auto;
}

body.right-sidebar :is(
    #register-form2,
    #order-form[action="validate.php?form=add-order"],
    #order-form[action="validate.php?form=update-order"],
    #order-form[action="validate.php?form=update-order2"]
) textarea {
    resize: vertical;
}
