/* Message Nana’s uses the compact My Bookings visual system. */
body.messages-page,
body.messages-page :is(h1,h2,h3,h4,p,a,button,input,select,textarea,label,summary,strong,time,span,legend) { font-family: Lora, Georgia, serif; }
body.messages-page .header { min-height: 100px; }
body.messages-page main { padding-top: 12px; }
body.messages-page .page-heading,
body.messages-page:not(.portal-access) .page-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 20px 22px; margin: 0 0 20px; min-height: 104px; height: auto; border: 1px solid #d5e1ca; border-radius: 16px; background: #f0f5ea; }
body.messages-page .page-heading-copy,
body.messages-page:not(.portal-access) .page-heading-copy { padding: 0; border: 0; min-height: 0; height: auto; background: none; }
body.messages-page .page-heading-copy h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.35px; --heading-tile-size: 44px; --heading-art-size: 25px; gap: 12px; }
body.messages-page .messaging-introduction { font-size: 14px; line-height: 1.65; margin: 8px 0 0; color: #64715c; }
body.messages-page .account-actions { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; margin: 0; }
body.messages-page .account-actions :is(#my-account,#logout) { min-height: 36px; height: 36px; padding: 7px 10px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
body.messages-page #my-account { --account-button-icon: var(--account-icon-back); }
body.messages-page #my-account::before { content: ''; width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; -webkit-mask: var(--account-button-icon) center/contain no-repeat; mask: var(--account-button-icon) center/contain no-repeat; }
body.messages-page .messaging-how { max-width: none; margin: 0 0 20px; border: 1px solid #dbe4d3; border-radius: 16px; box-shadow: none; background: #fff; }
body.messages-page .messaging-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 12px 16px; background: #f3f7ef; }
body.messages-page .messaging-section-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; line-height: 1.3; letter-spacing: -.25px; }
body.messages-page .messaging-guide-icon { width: 36px; height: 36px; min-width: 36px; flex: 0 0 36px; border-radius: 10px; }
body.messages-page .messaging-guide-icon svg { width: 20px; height: 20px; }
body.messages-page .messaging-guide-toggle { width: 20px; height: 20px; flex: 0 0 20px; font-size: 0; background: currentColor; -webkit-mask: var(--account-icon-chevron) center/contain no-repeat; mask: var(--account-icon-chevron) center/contain no-repeat; }
body.messages-page .messaging-how[open] .messaging-guide-toggle { transform: rotate(180deg); }
body.messages-page .messaging-section-body { padding: 20px; }
body.messages-page .messaging-section-body ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 0; padding: 0; }
body.messages-page .messaging-section-body li { min-width: 0; padding: 0; border: 0; background: none; }
body.messages-page .messaging-step-heading { display: flex; gap: 9px; align-items: center; }
body.messages-page .messaging-step-heading strong { font-size: 14px; line-height: 1.5; font-weight: 500; }
body.messages-page .messaging-step-icon { width: 28px; height: 28px; flex: 0 0 28px; }
body.messages-page .messaging-step-icon svg { width: 18px; height: 18px; }
body.messages-page .messaging-section-body li p { font-size: 13px; line-height: 1.7; margin: 9px 0 0; }
body.messages-page .messaging-section-footer { padding: 12px 20px; }
body.messages-page .messaging-section-footer p { font-size: 12px; margin: 0; }
body.messages-page #customer-messages { margin: 0 0 20px; border: 1px solid #dbe4d3; border-radius: 16px; overflow: hidden; box-shadow: none; }
body.messages-page #customer-messages > .messages-heading { min-height: 72px; height: auto; padding: 12px 16px; }
body.messages-page #customer-messages #messages-heading { font-size: 22px; --heading-tile-size: 36px; --heading-art-size: 20px; }
body.messages-page #messages-count { font-size: 11px; }
body.messages-page #customer-messages > .messages-body { padding: 16px; }
body.messages-page .account-conversation-card { display: grid; grid-template-columns: 44px minmax(0,1fr) auto 16px; align-items: center; gap: 12px; width: 100%; min-height: 92px; padding: 14px; border: 1px solid #dbe4d3; border-radius: 12px; background: #fff; }
body.messages-page .account-conversation-card:hover { background: #f5f8f1; }
body.messages-page .conversation-date-tile { width: 44px; min-width: 44px; height: 52px; padding: 5px; border-radius: 9px; }
body.messages-page .conversation-date-tile span { font-size: 10px; }
body.messages-page .conversation-date-tile strong { font-size: 21px; }
body.messages-page .conversation-row-title { font-size: 16px; line-height: 1.4; }
body.messages-page .conversation-excerpt { font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
body.messages-page .conversation-sent-at { font-size: 11px; line-height: 1.5; }
body.messages-page .conversation-row-meta { font-size: 11px; }
body.messages-page .inline-thread-heading h3 { font-size: 21px; }
body.messages-page .conversation-compose-intro { font-size: 14px; }
body.messages-page .conversation-compose-footer { gap: 16px; align-items: center; }
body.messages-page .conversation-compose-footer p { font-size: 12px; line-height: 1.7; }
body.messages-page .conversation-compose-footer button { min-height: 36px; padding: 7px 12px; font-size: 12px; }
body.messages-page .help-line { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 24px; font-size: 12px; }
body.messages-page .help-line .message-booking-link { display: inline; min-height: 0; margin: 0; padding: 0; font-size: 12px; }
@media(max-width:680px) {
 body.messages-page .header { min-height: 88px; }
 body.messages-page .page-heading,
 body.messages-page:not(.portal-access) .page-heading { grid-template-columns: minmax(0,1fr); padding: 16px; gap: 14px; }
 body.messages-page .page-heading-copy h1 { font-size: 25px; --heading-tile-size: 40px; --heading-art-size: 23px; }
 body.messages-page .messaging-introduction { font-size: 13px; }
 body.messages-page .account-actions { width: 100%; justify-content: flex-end; }
 body.messages-page .messaging-section-heading h2 { font-size: 19px; }
 body.messages-page .messaging-section-body ol { grid-template-columns: minmax(0,1fr); gap: 18px; }
 body.messages-page #customer-messages #messages-heading { font-size: 19px; }
 body.messages-page .account-conversation-card { grid-template-columns: 40px minmax(0,1fr) 14px; gap: 8px 10px; padding: 12px; }
 body.messages-page .conversation-date-tile { grid-column: 1; grid-row: 1 / 3; width: 40px; min-width: 40px; }
 body.messages-page .conversation-row-info { grid-column: 2; grid-row: 1; }
 body.messages-page .conversation-row-meta { grid-column: 2; grid-row: 2; justify-self: start; }
 body.messages-page .conversation-row-chevron { grid-column: 3; grid-row: 1 / 3; }
}
@media(max-width:540px) {
 body.messages-page #customer-messages > .messages-heading { display: grid; grid-template-columns: minmax(0,1fr) 24px; gap: 12px 8px; }
 body.messages-page #customer-messages .customer-inbox-heading { grid-column: 1; grid-row: 1; }
 body.messages-page #customer-messages #customer-messages-toggle { grid-column: 2; grid-row: 1; }
 body.messages-page #customer-messages #customer-message-actions { grid-column: 1/-1; grid-row: 2; justify-content: flex-end; max-width: none; }
 body.messages-page #customer-messages #new-customer-message { max-width: none; white-space: nowrap; }
}

/* Remove the old narrow messaging-only layout and legacy font overrides. */
body.messages-page .header { max-width: 1100px; width: 100%; }
body.messages-page .page-heading,
body.messages-page:not(.portal-access) .page-heading,
body.messages-page .page-heading-copy,
body.messages-page:not(.portal-access) .page-heading-copy,
body.messages-page #bookings,
body.messages-page #customer-messages { max-width: none; width: 100%; }
body.messages-page #bookings { margin: 0; }
body.messages-page .page-heading-copy #customer-welcome { font-size: 28px; line-height: 1.3; }
body.messages-page :is(h1,h2,h3,h4,p,a,button,input,select,textarea,label,summary,strong,time,span,legend) { font-family: Lora, Georgia, serif !important; }
@media(max-width:680px) { body.messages-page .page-heading-copy #customer-welcome { font-size: 25px; } }

/* One compact size for the page's text action buttons. */
body.messages-page .account-actions :is(#my-account,#logout),
body.messages-page #customer-messages #customer-message-actions button:not(#messages-refresh),
body.messages-page #customer-thread-back,
body.messages-page form button[type=submit] { width: 120px; min-width: 0; max-width: none; height: 32px; min-height: 32px; padding: 5px 8px; font-size: 11px; line-height: 1.3; gap: 5px; border-radius: 10px; white-space: nowrap; }
body.messages-page .account-actions :is(#my-account,#logout)::before,
body.messages-page #customer-messages #customer-message-actions button:not(#messages-refresh)::before,
body.messages-page #customer-thread-back::before { width: 14px; height: 14px; flex-basis: 14px; }
body.messages-page .text-button { min-height: 32px; font-size: 11px; }
body.messages-page #conversation-close { width: 32px; min-width: 32px; height: 32px; min-height: 32px; flex-basis: 32px; }
@media(max-width:350px) {
 body.messages-page .account-actions :is(#my-account,#logout),
 body.messages-page #customer-messages #customer-message-actions button:not(#messages-refresh) { width: calc(50% - 4px); }
 body.messages-page #customer-messages #customer-message-actions { width: 100%; gap: 8px; }
}

/* The composer uses the exact Messages & Requests header artwork. */
body.messages-page #conversation-title { --heading-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%234b6d84%22%20stroke-width%3D%221.7%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2011.5a8.5%208.5%200%200%201-8.5%208.5H9l-5%202v-5a8.5%208.5%200%200%201%207.5-14H12.5a8.5%208.5%200%200%201%208.5%208.5Z%22%2F%3E%3Cg%20fill%3D%22%234b6d84%22%20stroke%3D%22none%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2211.5%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2211.5%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2211.5%22%20r%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); --heading-tile-size: 36px; --heading-art-size: 20px; font-size: 22px; gap: 10px; }

/* Let the whole count badge wrap below its title, never its text inside the pill. */
body.messages-page #customer-messages .customer-inbox-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
body.messages-page #customer-messages #messages-heading { flex: 0 1 auto; min-width: 0; }
body.messages-page #customer-messages #messages-count { display: inline-flex; align-items: center; flex: 0 0 auto; width: auto; max-width: none; min-height: 24px; padding: 4px 9px; margin: 0; white-space: nowrap; font-size: 11px; line-height: 1.4; border-radius: 999px; }
body.messages-page .messages-heading > :is(.customer-inbox-heading,.messages-actions,button) { align-self: center; }
@media(max-width:680px) { body.messages-page #customer-messages #messages-count { display: inline-flex; } }
@media(max-width:350px) { body.messages-page #customer-messages #messages-heading { font-size: 17px; --heading-tile-size: 30px; --heading-art-size: 18px; gap: 8px; } }
/* Equal action sizes, including Refresh, per the latest review. */
body.messages-page #customer-messages #customer-message-actions button,
body.messages-page #customer-messages #messages-refresh {
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  flex:0 0 120px;width:120px;min-width:120px;max-width:120px;
  height:32px;min-height:32px;padding:0 9px;font-size:11px;line-height:1.2;
}
body.messages-page #customer-messages #messages-refresh span {display:inline;}
@media(max-width:350px){
 body.messages-page #customer-messages #customer-message-actions button,
 body.messages-page #customer-messages #messages-refresh {
  flex:1 1 calc(50% - 4px);width:calc(50% - 4px);min-width:0;max-width:none;
 }
}
body.messages-page #customer-messages #messages-refresh .refresh-label {display:inline !important;}

/* Keep unread status and both actions together below the mobile heading. */
@media(max-width:680px){
 body.messages-page #customer-messages > .messages-heading {display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1fr);gap:12px 6px;align-items:center;}
 body.messages-page #customer-messages .customer-inbox-heading,
 body.messages-page #customer-messages #customer-message-actions {display:contents;}
 body.messages-page #customer-messages #messages-heading {grid-column:1 / 3;grid-row:1;margin:0;}
 body.messages-page #customer-messages #customer-messages-toggle {grid-column:3;grid-row:1;justify-self:end;}
 body.messages-page #customer-messages #messages-count {grid-column:1;grid-row:2;padding:4px 6px;font-size:10px;}
 body.messages-page #customer-messages #new-customer-message {grid-column:2;grid-row:2;}
 body.messages-page #customer-messages #messages-refresh {grid-column:3;grid-row:2;}
 body.messages-page #customer-messages #customer-message-actions button {width:100%;min-width:0;max-width:none;padding:0 4px;gap:3px;font-size:10px;}
}
@media(max-width:350px){
 body.messages-page #customer-messages #customer-message-actions button::before {display:none;}
}

@media(max-width:680px){
 body.messages-page #customer-messages #customer-message-actions #new-customer-message,
 body.messages-page #customer-messages #customer-message-actions #messages-refresh {width:100%;min-width:0;max-width:100%;}
 body.messages-page #customer-messages #messages-heading {grid-column:1 / -1;padding-right:26px;}
}

@media(max-width:680px){
 body.messages-page #customer-messages #customer-message-actions #new-customer-message,
 body.messages-page #customer-messages #customer-message-actions #messages-refresh {width:100% !important;min-width:0 !important;max-width:100% !important;}
}
