/* Calenvella: additive, multi-device readability fixes. Does not change booking behavior or brand colors. */
html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}
img,video,svg{max-width:100%;height:auto}
main,.tool-shell,.shell,.card,.tool-table-wrap,.cv-section-nav,.tool-action{min-width:0}
main :is(p,h1,h2,h3,h4,small,strong,a,code){overflow-wrap:anywhere}
.tool-action,.cv-section-nav{flex-wrap:wrap}
.tool-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.cv-booking-history-wrap{width:100%;max-width:100%}
.cv-booking-history-table{width:100%;table-layout:fixed}
.cv-booking-history-table th,.cv-booking-history-table td{vertical-align:top;min-width:0;overflow-wrap:anywhere}
.cv-booking-history-table th:nth-child(1){width:27%}
.cv-booking-history-table th:nth-child(2){width:23%}
.cv-booking-history-table th:nth-child(3){width:25%}
.cv-booking-history-table th:nth-child(4){width:25%}
.cv-booking-history-table .cv-history-email{font-size:.8em;overflow-wrap:anywhere;line-height:1.4}
.cv-booking-history-table .cv-history-status-label{display:inline-block;font-weight:650}
.cv-history-status-label[data-outcome=completed]{color:#9cf0dd}
.cv-history-status-label[data-outcome=no_show]{color:#ffd0ad}
.cv-history-outcome{margin-top:8px;max-width:100%;min-width:0;border:1px solid #355d6b;border-radius:9px;background:#102633;padding:6px 8px}
.cv-history-outcome>summary{cursor:pointer;font-size:.8rem;font-weight:650;white-space:normal;line-height:1.35}
.cv-history-outcome-inner{display:grid;gap:9px;padding-top:9px;font-size:.83rem;min-width:0}
.cv-history-checks{border:0;margin:0;padding:0;min-width:0;display:grid;gap:7px}
.cv-history-checks legend{font-weight:650;padding:0;margin-bottom:5px}
.cv-history-choice,.cv-history-verify{display:flex;align-items:flex-start;gap:8px;line-height:1.35;cursor:pointer}
.cv-history-check{appearance:auto!important;-webkit-appearance:checkbox!important;position:static!important;opacity:1!important;display:inline-block!important;min-width:17px!important;width:17px!important;height:17px!important;min-height:17px!important;flex:0 0 17px;margin:1px 0 0;accent-color:#43d6e8}
.cv-history-verify{padding-top:7px;border-top:1px solid #365363}
.cv-history-notice{font-size:.78rem;color:#b9d8e4;margin:0;line-height:1.4}
.cv-history-save{white-space:normal;max-width:100%;line-height:1.3;min-height:36px;cursor:pointer}
.cv-history-save:disabled{opacity:.55;cursor:not-allowed}
.cv-history-status-filter{max-width:190px;padding:9px 10px;border:1px solid #345869;border-radius:9px;background:#0b1b27;color:#eaf7fa}
@media(max-width:740px){
 html,body{max-width:100%;min-width:0}
 .tool-shell,.shell,main.tool-shell{width:100%;max-width:100%;padding-left:clamp(9px,3vw,20px);padding-right:clamp(9px,3vw,20px)}
 .tool-shell .card,.tool-shell section,.tool-table-wrap,.tool-hero{min-width:0;max-width:100%}
 .tool-shell .card{overflow-wrap:anywhere}
 .sitebar,.sitebar .navlinks,.tool-action,.cv-section-nav{min-width:0;max-width:100%;flex-wrap:wrap}
 .tool-action > input:not([type=checkbox]):not([type=radio]),.tool-action > select{flex:1 1 185px;min-width:0!important;max-width:100%}
 .tool-action > button,.tool-action > a.btn{flex:0 1 auto;max-width:100%;white-space:normal}
 .tool-shell :is(input,select,textarea){max-width:100%;min-width:0}
 .tool-shell :is(h1,h2,h3){overflow-wrap:anywhere;line-height:1.2}
 .cv-section-nav a{max-width:100%;white-space:normal;text-align:center}
 .cv-booking-history-wrap{overflow:visible}
 .cv-booking-history-table,.cv-booking-history-table tbody{display:block;width:100%;min-width:0}
 .cv-booking-history-table thead{display:none}
 .cv-booking-history-table .cv-history-record{display:block;width:100%;padding:12px;margin:0 0 10px;background:#102532;border:1px solid #355363;border-radius:12px}
 .cv-booking-history-table .cv-history-record>td{display:grid;width:100%;min-width:0;grid-template-columns:minmax(90px,32%) minmax(0,1fr);gap:8px;padding:8px 0;border-bottom:1px solid #294957;line-height:1.45;overflow-wrap:anywhere}
 .cv-booking-history-table .cv-history-record>td:last-child{border-bottom:0}
 .cv-booking-history-table .cv-history-record>td::before{content:attr(data-label);font-weight:650;font-size:.8rem;color:#a9c6d4;line-height:1.4}
 .cv-history-person>strong{grid-column:2}
 .cv-history-person>.cv-history-email{grid-column:2;font-size:.8rem;overflow-wrap:anywhere}
 .cv-history-state>span,.cv-history-state>details{grid-column:2;min-width:0}
 .cv-history-outcome{width:100%}
}
@media(max-width:380px){
 .cv-booking-history-table .cv-history-record>td{grid-template-columns:minmax(75px,30%) minmax(0,1fr);gap:6px}
 .cv-booking-history-table .cv-history-record{padding:9px}
 .cv-history-outcome{padding:5px}
}
/* Keep other tables scrollable when their true column count cannot fit on a phone. */
@media(max-width:740px){
 table:not(.cv-booking-history-table){max-width:100%}
 .tool-table-wrap:not(.cv-booking-history-wrap) table{min-width:520px}
}

/* Booking History: compact, fully readable cards and 10/15-item paging. */
.cv-booking-history-table{table-layout:fixed;width:100%}
.cv-booking-history-table th:nth-child(1){width:24%}
.cv-booking-history-table th:nth-child(2){width:25%}
.cv-booking-history-table th:nth-child(3){width:23%}
.cv-booking-history-table th:nth-child(4){width:13%}
.cv-booking-history-table th:nth-child(5){width:15%}
.cv-booking-history-table td.cv-history-action-cell{vertical-align:top}
.cv-history-pagination{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:12px 0 4px;margin:0 auto;max-width:100%}
.cv-history-pagination[hidden]{display:none!important}
.cv-history-page-btn{padding:7px 12px!important;min-height:34px!important;font-size:.86rem!important;line-height:1.2!important;white-space:nowrap}
.cv-history-page-btn:disabled{opacity:.4;cursor:not-allowed}
.cv-history-page-label{font-size:.86rem;font-weight:650;white-space:nowrap;color:#e3f4fa}
.cv-history-page-size{font-size:.83rem!important;padding:7px 9px!important;max-width:140px!important;min-height:34px;border:1px solid #426477;border-radius:8px;background:#102532;color:#e7f5fa}
@media(max-width:920px){
 .cv-booking-history-wrap{overflow:visible!important;width:100%;max-width:100%}
 .cv-booking-history-table,.cv-booking-history-table tbody{display:block!important;width:100%;min-width:0}
 .cv-booking-history-table thead{display:none!important}
 .cv-booking-history-table tr.cv-history-record{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:
  "person state" "service service" "when when" "action action";
  column-gap:10px;row-gap:4px;width:100%;max-width:100%;margin:0 0 8px!important;
  padding:11px 13px!important;border:1px solid #365869;border-radius:12px;background:#102532;
 }
 .cv-booking-history-table tr.cv-history-record>td{
  display:block!important;width:auto!important;max-width:100%;min-width:0!important;
  padding:0!important;margin:0!important;border:0!important;line-height:1.32!important;
  font-size:.87rem;overflow-wrap:anywhere;
 }
 .cv-booking-history-table tr.cv-history-record>td::before{content:none!important;display:none!important}
 .cv-booking-history-table td.cv-history-person{grid-area:person;display:flex!important;flex-direction:column;gap:3px;justify-content:start}
 .cv-booking-history-table td.cv-history-person strong{display:block!important;grid-column:auto!important;font-size:.95rem;line-height:1.24}
 .cv-booking-history-table td.cv-history-person .cv-history-email{grid-column:auto!important;display:block!important;font-size:.76rem;line-height:1.25;color:#a9c6d4;overflow-wrap:anywhere}
 .cv-booking-history-table td.cv-history-state{grid-area:state;display:flex!important;justify-content:flex-end;align-items:flex-start;text-align:right}
 .cv-booking-history-table .cv-history-status-label{grid-column:auto!important;font-size:.8rem;line-height:1.25;max-width:120px;padding:2px 6px;border:1px solid #3d6775;border-radius:999px;background:#163240;color:#e1f5fa;white-space:normal}
 .cv-booking-history-table td.cv-history-service{grid-area:service;border-top:1px solid #294957!important;padding-top:7px!important;margin-top:4px!important}
 .cv-booking-history-table td.cv-history-when{grid-area:when}
 .cv-booking-history-table td.cv-history-service,.cv-booking-history-table td.cv-history-when{display:grid!important;grid-template-columns:72px minmax(0,1fr);gap:6px}
 .cv-booking-history-table td.cv-history-service::before,.cv-booking-history-table td.cv-history-when::before{display:block!important;content:attr(data-label)!important;color:#a9c6d4;font-size:.78rem;font-weight:650}
 .cv-booking-history-table td.cv-history-action-cell{grid-area:action;display:block!important;min-width:0}
 .cv-booking-history-table td.cv-history-action-cell:empty{display:none!important}
 .cv-booking-history-table td.cv-history-action-cell:not(:empty){border-top:1px solid #294957!important;margin-top:4px!important;padding-top:6px!important}
 .cv-booking-history-table .cv-history-outcome{margin-top:0;padding:5px 8px;max-width:100%}
 .cv-booking-history-table .cv-history-outcome>summary{font-size:.79rem;line-height:1.2}
 .cv-booking-history-table .cv-history-outcome-inner{font-size:.82rem;line-height:1.3}
}
@media(max-width:380px){
 .cv-booking-history-table tr.cv-history-record{padding:9px 10px!important;column-gap:7px}
 .cv-history-pagination{gap:6px}
 .cv-history-page-btn{padding:7px 8px!important;font-size:.8rem!important}
 .cv-history-page-label{font-size:.79rem}
}

/* Calenvella October 28: reduce visual bulk across business tools on smaller screens. */
@media(max-width:650px){
 .tool-shell,.shell{max-width:100%;min-width:0;box-sizing:border-box}
 .tool-shell>.card,.shell>.card{margin-top:9px!important;margin-bottom:9px!important;padding:12px!important}
 .tool-shell .tool-hero,.shell .pagehead{margin-bottom:8px!important}
 .tool-shell .tool-hero h1,.shell .pagehead h1{font-size:clamp(23px,6vw,30px)!important;line-height:1.2!important}
 .tool-shell .card h2,.shell .card h2{font-size:clamp(17px,4.5vw,20px)!important;margin-top:2px!important;margin-bottom:7px!important}
 .tool-shell .card p,.shell .card p{line-height:1.45!important}
 .tool-shell .btn.smol,.shell .btn.smol{min-height:36px!important;padding:7px 10px!important}
 .tool-shell .tool-table-wrap{max-width:100%;overflow-x:auto}
 .cv-appointments-compact{padding:11px!important}
 .cv-studio-quick{gap:7px!important}
 .cv-top-office-card{padding:11px!important}
}
