/* COMPACT_PACK_V39: isolated pack/review presentation */
#review,.checkout-preview{max-width:960px;margin:18px auto;padding:18px;border-radius:18px;}
#review>h2{font-size:22px;margin:0 0 12px;}
#review #list{display:block;}
#review #list .list-group{border:0;border-radius:0;background:transparent;box-shadow:none;margin:0;}
#review #list .list-group-header,#review #list .list-group-rule,#review #list .list-group-total{display:none;}
#review #list .list-group-body,#review #list .list-group-pages{display:block;padding:0;background:transparent;}
#review #list .list-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;gap:12px;padding:12px 0;border:0;border-bottom:1px solid #e8edf5;border-radius:0;min-height:0;background:transparent;}
#review #list .list-row>p{margin:0;font-size:13px;line-height:1.4;color:#67738b;min-width:0;}
#review #list .list-item-model{font-size:14px;font-weight:600;color:#18243c;margin-bottom:3px;}
#review #list .list-row>label{display:flex;flex-direction:column;gap:3px;margin:0;font-size:11px;line-height:1.25;color:#67738b;}
#review #list .list-row input{width:54px;height:38px;padding:4px;border-radius:8px;font-size:14px;}
#review #list .list-row>button{width:auto;min-width:44px;min-height:38px;padding:6px 8px;font-size:12px;border:0;background:transparent;color:#9a4545;}
.byo-row-name{display:block;font-size:14px;font-weight:600;color:#18243c;}
.byo-row-total{font-size:14px;color:#254a98;white-space:nowrap;text-align:right;}
#review #list-total{margin:14px 0;font-size:18px;}
#review>.note{font-size:12px;line-height:1.5;margin:8px 0 14px;}
.checkout-preview-header{padding:14px 16px;}.checkout-preview-header h2{font-size:22px;}
.checkout-preview-body{padding:14px 16px;}
.checkout-book-details{gap:8px;}.checkout-book-group{margin:0 0 10px;padding:10px;border-radius:10px;}
.checkout-book-tile{padding:8px;min-height:0;}.checkout-preview-actions{gap:8px;}
@media(max-width:767px){
 #review,.checkout-preview{padding:12px;margin:12px auto;border-radius:14px;}
 #review #list .list-row{grid-template-columns:minmax(0,1fr) auto auto;gap:5px 10px;padding:10px 0;}
 #review #list .list-row>p{grid-column:1;grid-row:1 / span 2;font-size:12px;}
 #review #list .list-row>label{grid-column:2;grid-row:2;font-size:10px;}
 #review #list .list-row>button{grid-column:3;grid-row:2;min-height:38px;padding:4px;}
 #review #list .byo-row-total{grid-column:2 / span 2;grid-row:1;font-size:13px;}
 #review #list .list-row input{width:48px;height:36px;}
 .byo-row-name,#review #list .list-item-model{font-size:13px;}
 #review>h2{font-size:20px;}#review #list-total{font-size:17px;}
 .checkout-preview-header,.checkout-preview-body{padding:12px;}
}

/* V39: explicit placement overrides legacy mobile grid rules. */
#review #list .list-row {width:100%;box-sizing:border-box;margin:0;}
#review #list .list-row>p {grid-column:1;grid-row:1;}
#review #list .list-row>label {grid-column:2;grid-row:1;max-width:none;}
#review #list .list-row>button {grid-column:3;grid-row:1;width:auto;margin:0;}
#review #list .list-row>.byo-row-total {grid-column:4;grid-row:1;align-self:center;margin:0;}
@media(max-width:767px){
 #review #list .list-row {grid-template-columns:minmax(0,1fr) 48px 48px;}
 #review #list .list-row>p {grid-column:1;grid-row:1 / span 2;align-self:center;}
 #review #list .list-row>label {grid-column:2;grid-row:2;align-self:center;}
 #review #list .list-row>button {grid-column:3;grid-row:2;align-self:end;min-width:44px;width:48px;font-size:11px;padding:4px 0;}
 #review #list .list-row>.byo-row-total {grid-column:2 / span 2;grid-row:1;align-self:center;white-space:normal;overflow-wrap:anywhere;line-height:1.35;}
}

/* V39: compact final review, scoped above legacy group styling. */
.checkout-preview.checkout-preview .checkout-preview-header{background:#f5f7fc;border-bottom:1px solid #e8edf5;color:#18243c;border-radius:10px;padding:12px;}
.checkout-preview.checkout-preview .checkout-preview-header h2{font-size:20px;color:#18243c;}
.checkout-preview.checkout-preview .checkout-preview-header>span{color:#526582;background:transparent;border-color:#dce4f0;font-size:11px;}
.checkout-preview.checkout-preview .checkout-book-details .list-group{margin:0;padding:10px 0;border:0;border-bottom:1px solid #e8edf5;border-radius:0;background:transparent;box-shadow:none;overflow:visible;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-header{padding:0;background:transparent;border:0;display:flex;justify-content:space-between;align-items:center;gap:8px;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-header h3{color:#18243c;font-size:14px;line-height:1.4;margin:0;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-brand{color:#67738b;background:transparent;border:0;padding:0;font-size:12px;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-body{padding:5px 0 0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-rule{grid-column:1 / -1;margin:0;padding:0;background:transparent;border:0;color:#67738b;font-size:12px;line-height:1.4;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-pages{display:flex;flex-wrap:wrap;gap:5px 14px;grid-column:1;min-width:0;}
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:4px 7px;border:0;box-shadow:none;background:transparent;border-radius:0;padding:0;margin:0;min-height:28px;width:auto;}
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile strong{font-size:13px;color:#18243c;}
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile span{font-size:11px;color:#67738b;}
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile b{font-size:13px;border:0;background:transparent;padding:0;min-width:0;min-height:0;width:auto;height:auto;color:#18243c;}
.checkout-preview.checkout-preview .checkout-book-details .list-item-model{font-size:12px;margin:0;color:#18243c;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-total{grid-column:2;align-self:end;margin:0;padding:0;background:transparent;border:0;white-space:normal;font-size:12px;color:#254a98;}
@media(max-width:767px){
 .checkout-preview.checkout-preview .checkout-book-details .list-group-body{grid-template-columns:minmax(0,1fr);}
 .checkout-preview.checkout-preview .checkout-book-details .list-group-total{grid-column:1;text-align:right;}
}

/* V39: reset inherited column direction and implicit review grid placement. */
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile{flex-direction:row;text-align:left;align-items:center;}
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile strong,
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile span,
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile b,
.checkout-preview.checkout-preview .checkout-book-details .checkout-book-tile small{display:inline;width:auto;margin:0;text-align:left;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-body{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-rule{grid-column:1 / -1;grid-row:1;text-align:left;justify-self:start;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-pages{grid-column:1;grid-row:2;width:auto;justify-content:flex-start;}
.checkout-preview.checkout-preview .checkout-book-details .list-group-total{grid-column:2;grid-row:2;text-align:right;align-self:center;}
@media(max-width:767px){
 .checkout-preview.checkout-preview .checkout-book-details .list-group-body{grid-template-columns:minmax(0,1fr);gap:4px;}
 .checkout-preview.checkout-preview .checkout-book-details .list-group-total{grid-column:1;grid-row:3;line-height:1.3;margin-top:2px;}
}
