/*
Theme Name:   Chantarelle (Astra Child)
Theme URI:    https://www.califanet.com/
Description:  Child theme of Astra for the Chantarelle HOA website.
Author:       CalifaNet
Author URI:   https://www.califanet.com/
Template:     astra
Version: 1.0.13
License:      GPLv2 or later
Text Domain:  chantarelle-astra-child
*/

/* ===== 1.0.11: "Message <name>" buttons (replace personal emails) ===== */
a.chan-msg-btn{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 18px!important;border:2px solid #2e5d4b;border-radius:30px;background:#fff;color:#2e5d4b!important;font-size:16px;font-weight:600;line-height:1.2;text-decoration:none!important;white-space:nowrap;vertical-align:middle;transition:background-color .15s,color .15s}
a.chan-msg-btn::before{content:"\2709\FE0E";font-size:15px;line-height:1}
a.chan-msg-btn:hover,a.chan-msg-btn:focus-visible{background:#2e5d4b;color:#fff!important}
a.chan-msg-btn:focus-visible,a.chan-msg-link:focus-visible{outline:3px solid #f2c88b;outline-offset:2px}
td a.chan-msg-btn{min-height:36px;padding:4px 14px!important;font-size:15px}
p a.chan-msg-btn + a.chan-msg-btn{margin-left:6px}

/* ===== 1.0.11: Contacts page – "Send a message" form card at the top (page 11) ===== */
.page-id-11 .entry-content > .wp-block-group.alignfull:first-child{padding-top:24px!important;padding-bottom:84px!important;row-gap:14px!important;gap:14px!important}
.page-id-11 .entry-content > .wp-block-group.alignfull:first-child > h1{margin:0!important;line-height:1.1}
.page-id-11 .entry-content > .wp-block-group.alignfull:first-child > p:first-child{margin:0!important;padding:4px 14px!important;font-size:13px!important}
.page-id-11 .entry-content > .wp-block-group.alignfull:first-child > p:not(:first-child){font-size:18px!important;margin:0!important}
.chan-message-section{box-sizing:border-box;width:100%;max-width:100%;align-self:stretch;margin:0;padding:20px 26px 22px;background:#fff;border:1px solid #ddd8ce;border-radius:20px;box-shadow:0 10px 30px rgba(20,40,30,.18);color:#35403a;scroll-margin-top:16px}
.chan-message-section > h2{margin:0 0 2px!important;font-size:26px!important;line-height:1.2;color:#1f4335}
.chan-message-section > p{margin:0 0 10px!important;font-size:16px!important;color:#35403a}
.chan-message-section div.wpforms-container-full,.chan-message-section .wpforms-container{margin:0!important;max-width:none}
.chan-message-section .wpforms-head-container{display:none}
.chan-message-section .wpforms-field-container{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));column-gap:16px;row-gap:8px}
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field{grid-column:1 / -1;padding:0!important;margin:0!important;min-width:0}
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-dept,
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-name{grid-column:span 3}
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-email,
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-phone,
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-unit{grid-column:span 2}
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field-label{margin:0 0 4px!important;font-size:16px!important;font-weight:600;color:#1f2420}
.chan-message-section div.wpforms-container-full .wpforms-form input[type=text],
.chan-message-section div.wpforms-container-full .wpforms-form input[type=email],
.chan-message-section div.wpforms-container-full .wpforms-form input[type=tel],
.chan-message-section div.wpforms-container-full .wpforms-form select{width:100%!important;max-width:100%!important;height:44px;font-size:16px;border:1px solid #c9c3b6;border-radius:8px}
.chan-message-section div.wpforms-container-full .wpforms-form textarea{width:100%!important;max-width:100%!important;height:96px!important;min-height:72px;font-size:16px;border:1px solid #c9c3b6;border-radius:8px}
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field-sublabel{display:none}
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field-row{max-width:none!important}
.chan-message-section div.wpforms-container-full .wpforms-form input:focus,
.chan-message-section div.wpforms-container-full .wpforms-form select:focus,
.chan-message-section div.wpforms-container-full .wpforms-form textarea:focus{border-color:#2e5d4b!important;box-shadow:0 0 0 2px rgba(46,93,75,.25)!important;outline:none}
.chan-message-section .chan-dept select{font-weight:600;color:#1f4335}
.chan-message-section .wpforms-field.chan-flash select{animation:chanFlash 1.4s ease-out}
@keyframes chanFlash{0%{background:#f2c88b}100%{background:#fff}}
.chan-message-section div.wpforms-container-full .wpforms-form .wpforms-submit-container{margin-top:12px!important;padding:0!important;display:flex;align-items:center;gap:14px}
.chan-message-section div.wpforms-container-full .wpforms-form button.wpforms-submit{min-height:46px;padding:10px 30px!important;border-radius:30px!important;background:#2e5d4b!important;border:2px solid #2e5d4b!important;color:#fff!important;font-size:17px!important;font-weight:700}
.chan-message-section div.wpforms-container-full .wpforms-form button.wpforms-submit:hover{background:#1f4335!important;border-color:#1f4335!important}
.chan-message-section .wpforms-confirmation-container-full{margin:0!important;border-radius:12px;background:#e7f1ec!important;border-color:#2e5d4b!important;color:#1f4335}
.chan-message-section .wpforms-recaptcha-container,.chan-message-section .wpforms-turnstile-container{padding:8px 0 0!important}
@media (max-width:921px){
  .page-id-11 .entry-content > .wp-block-group.alignfull:first-child{padding-left:18px!important;padding-right:18px!important}
}
@media (max-width:700px){
  .chan-message-section{padding:16px 16px 18px;border-radius:16px}
  .chan-message-section > h2{font-size:22px!important}
  .chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-dept,
  .chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-name,
  .chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-email,
  .chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-phone,
  .chan-message-section div.wpforms-container-full .wpforms-form .wpforms-field.chan-unit{grid-column:1 / -1}
  .chan-message-section div.wpforms-container-full .wpforms-form .wpforms-submit-container button.wpforms-submit{width:100%}
}
/* time/date pickers: green hover already set in Customizer > Additional CSS (unchanged). */

/* === 1.0.12 responsive fixes (mobile/tablet only) === */
@media (max-width:1100px) and (min-width:922px){
  .main-header-menu > .menu-item > .menu-link{padding-left:.6em!important;padding-right:.6em!important;font-size:15px}
  .main-header-menu{flex-wrap:nowrap!important}
  .main-header-menu > .menu-item > .menu-link{white-space:nowrap}
}
@media (max-width:921px){
  /* hamburger tap target */
  .ast-mobile-menu-trigger-minimal,.menu-toggle.main-header-menu-toggle{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  /* emergency number in drawer: never break the phone number */
  .chan-mobile-cta{box-sizing:border-box;max-width:100%}
  .chan-mobile-cta .chan-cta{box-sizing:border-box;max-width:100%;white-space:nowrap}
  /* board officers row (is-nowrap group) wraps */
  .entry-content .wp-block-group.is-nowrap{flex-wrap:wrap!important;row-gap:16px}
  .entry-content .wp-block-group.is-nowrap > *{flex:1 1 140px;min-width:0}
  /* flex children may shrink below their min-content (prevents page-wide overflow) */
  .entry-content .wp-block-group.is-layout-flex > *,.entry-content .wp-block-columns,.entry-content .wp-block-column{min-width:0}
  .entry-content .wp-block-columns,.entry-content .wp-block-group:not(.alignfull){box-sizing:border-box;max-width:100%}
  .entry-content .wp-block-button__link{white-space:normal}
  /* Message buttons on their own line inside sentences */
  .entry-content p > .chan-msg-btn,.entry-content li > .chan-msg-btn{display:flex;width:fit-content;margin:.5em 0 0}
  .entry-content a[href^="mailto:"],.entry-content a[href^="http"]:not(.wp-block-button__link):not(.chan-msg-btn){overflow-wrap:anywhere}
  .entry-content td .chan-msg-btn{white-space:normal;text-align:left}
  /* comparison tables: scroll instead of mid-word breaks */
  .entry-content figure.wp-block-table{overflow-x:auto;max-width:100%;min-width:0;-webkit-overflow-scrolling:touch}
  .entry-content figure.wp-block-table td,.entry-content figure.wp-block-table th{word-break:normal;overflow-wrap:normal;hyphens:none}
  .entry-content figure.wp-block-table:has(tr > :nth-child(4)) table{min-width:520px}
}
@media (max-width:600px){
  /* 3-up card grids stack */
  .entry-content .wp-block-group.is-layout-grid{grid-template-columns:1fr!important}
}
@media (max-width:400px){
  .chan-mobile-cta .chan-cta{font-size:14px;padding-left:10px;padding-right:10px}
}

/* === 1.0.13: hose-free pool photo at all widths (including desktop) === */
.page-id-756 .ch-hero::before{
  background-image:linear-gradient(90deg,rgba(245,250,254,1) 0%,rgba(245,250,254,.96) 38%,rgba(245,250,254,.55) 52%,rgba(245,250,254,0) 66%),url("https://chantarelle.org/wp-content/uploads/2026/10/chantarelle-heated-pool-pergola-nohose.jpg")!important;
}

/* === 1.0.13: mobile/tablet hero – full-bleed photos, text raised and readable === */
@media (max-width:921px){
  /* Street photo fills the hero; crop to the right (houses), not the baked-in left fade */
  .page-id-756 .ch-hero{
    padding-top:48px!important;
    background-image:url("https://chantarelle.org/wp-content/uploads/2026/09/hero-01.webp")!important;
    background-size:cover!important;
    background-position:100% 50%!important;
    background-repeat:no-repeat!important;
  }
  .page-id-756 .ch-hero>*{
    position:relative;
    z-index:1;
  }
  .page-id-756 .ch-hero h1,
  .page-id-756 .ch-hero p.wp-custom-css-7b3f9e8a{
    text-shadow:0 1px 2px rgba(255,255,255,.95),0 0 18px rgba(245,250,254,.85);
  }
  /* Pool photo keeps the desktop crossfade, cover, cropped to the right */
  .page-id-756 .ch-hero::before{
    content:""!important;
    display:block!important;
    position:absolute!important;
    inset:0!important;
    z-index:0!important;
    pointer-events:none;
    opacity:0;
    animation:16s ease-in-out infinite chdHeroA!important;
    background-image:url("https://chantarelle.org/wp-content/uploads/2026/10/chantarelle-heated-pool-pergola-nohose.jpg")!important;
    background-size:cover!important;
    background-position:100% 50%!important;
    background-repeat:no-repeat!important;
  }
  /* Persistent light scrim over both photos so dark text stays readable */
  .page-id-756 .ch-hero::after{
    content:""!important;
    display:block!important;
    position:absolute!important;
    inset:0!important;
    z-index:0!important;
    pointer-events:none;
    opacity:1!important;
    animation:none!important;
    background-image:linear-gradient(180deg,rgba(245,250,254,.86) 0%,rgba(245,250,254,.78) 42%,rgba(245,250,254,.5) 72%,rgba(245,250,254,.28) 100%)!important;
    background-color:transparent!important;
    background-size:auto!important;
    background-position:0 0!important;
  }
}
@media (max-width:921px) and (prefers-reduced-motion:reduce){
  /* Keep the scrim; hide only the animated pool layer */
  .page-id-756 .ch-hero::before{animation:none!important;display:none!important}
  .page-id-756 .ch-hero::after{display:block!important;animation:none!important;opacity:1!important}
}
