/* Star Empire 0.6.77: compact per-material shortcuts for transports.
   Only cosmetic controls. Transport planning, quotes, fuel, stock,
   warehouse limits, pending flights and settlement remain unchanged. */

/* Normal transport: two quick options beside each manually picked material. */
#overlay .transport-cargo-row{
 grid-template-columns:minmax(0,1.08fr) minmax(0,.65fr)
   minmax(130px,.9fr) auto!important;
 align-items:end!important;
}
#overlay .transport-cargo-quick{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:4px;min-width:0;
}
#overlay .transport-cargo-quick>button{
 display:flex;align-items:center;justify-content:center;
 min-width:0;min-height:38px;max-width:100%;
 padding:5px 7px;font-size:11px;font-weight:700;
 line-height:1.15;white-space:normal;overflow-wrap:anywhere;
 border:1px solid #5984ba;border-radius:7px;
 background:rgba(37,51,80,.83);
 color:#e0edff;
}
#overlay .transport-cargo-quick>button:last-child{
 border-color:#678fe0;
 background:linear-gradient(110deg,rgba(54,45,112,.78),rgba(24,66,104,.86));
 color:#e8e4ff;
}
#overlay .transport-cargo-quick>button:hover,
#overlay .transport-cargo-quick>button:focus-visible{
 border-color:#a2b3ff;
 background:rgba(92,73,156,.7);
}
#overlay .transport-cargo-row-note{grid-column:1/-1!important}

/* Waypoint origin and stop: all ten resources have one compact pair of
   actions for each applicable input. Stop operations stack vertically to
   keep even 160px-wide resource cards usable on tablets and phones. */
#overlay .cc-wp-editor .cc-wp-cargo-pair{
 display:flex!important;
 flex-direction:column!important;
 gap:6px!important;
 min-width:0!important;
}
#overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-row{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:4px!important;
 width:100%!important;min-width:0!important;
 margin:3px 0 5px!important;
}
#overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-btn,
#overlay .cc-route-editor .cc-cargo-quick-btn{
 box-sizing:border-box!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 width:100%!important;min-width:0!important;
 min-height:30px!important;
 padding:5px 4px!important;
 margin:0!important;
 font-size:10px!important;
 font-weight:700!important;
 line-height:1.15!important;
 text-align:center!important;
 white-space:normal!important;
 overflow-wrap:anywhere!important;
 border:1px solid rgba(124,138,218,.66)!important;
 border-radius:6px!important;
 background:linear-gradient(125deg,rgba(46,40,94,.75),rgba(25,60,98,.82))!important;
 color:#e5ecff!important;
}
#overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-btn:nth-child(2),
#overlay .cc-route-editor .cc-cargo-quick-btn:nth-child(2){
 color:#9dffc6!important;
 border-color:#3d9873!important;
 background:linear-gradient(125deg,rgba(20,66,59,.75),rgba(22,61,89,.85))!important;
}
#overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-btn:hover,
#overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-btn:focus-visible,
#overlay .cc-route-editor .cc-cargo-quick-btn:hover,
#overlay .cc-route-editor .cc-cargo-quick-btn:focus-visible{
 outline:2px solid #b6e2ff!important;
 outline-offset:1px!important;
 box-shadow:0 0 8px #7790db4d!important;
}
#overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-btn:active,
#overlay .cc-route-editor .cc-cargo-quick-btn:active{
 transform:translateY(1px)!important;
}

/* Recurring routes are load-only: all cargo automatically unloads at target. */
#overlay .cc-route-editor .cc-route-resource .cc-cargo-quick-row{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:5px!important;
 width:100%!important;
 margin:4px 0 7px!important;
}
#overlay .cc-route-editor .cc-route-resource .cc-cargo-quick-btn{
 min-height:32px!important;
 font-size:11px!important;
}

@media(max-width:950px){
 #overlay .transport-cargo-row{
  grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)!important;
  align-items:end!important;
 }
 #overlay .transport-cargo-quick{grid-column:1/-1}
 #overlay .transport-cargo-row .transport-cargo-remove{
  grid-column:1/-1!important;
  min-height:32px!important;width:100%!important;
 }
}
@media(max-width:700px){
 #overlay .cc-wp-editor .cc-wp-resource-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
 }
 #overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-btn{
  min-height:34px!important;
  padding:4px 2px!important;
  font-size:9px!important;
 }
}
@media(max-width:400px){
 #overlay .cc-wp-editor .cc-wp-resource-grid{
  grid-template-columns:1fr!important;
 }
 #overlay .cc-wp-editor .cc-wp-resource-grid .cc-cargo-quick-btn{
  font-size:11px!important;
 }
 #overlay .transport-cargo-row{
  grid-template-columns:1fr!important;
 }
 #overlay .transport-cargo-quick{grid-column:1!important}
 #overlay .transport-cargo-row .transport-cargo-remove{
  grid-column:1!important;
 }
}

/* Origin resource's label and buttons must be ONE grid item. */
#overlay .cc-wp-editor .cc-wp-start-grid>.cc-wp-origin-resource{
 box-sizing:border-box!important;display:grid!important;gap:5px!important;
 min-width:0!important;padding:8px!important;
 border:1px solid rgba(90,160,195,.32)!important;
 border-radius:8px!important;background:rgba(8,25,44,.62)!important;
}
#overlay .cc-wp-editor .cc-wp-start-grid>.cc-wp-origin-resource>label{
 padding:0!important;background:none!important;border:0!important;
 margin:0!important;display:flex!important;flex-direction:column!important;
 gap:5px!important;min-width:0!important;
}
#overlay .cc-wp-editor .cc-wp-start-grid>.cc-wp-origin-resource strong{
 font-weight:700!important;font-size:12px!important;
}
#overlay .cc-wp-editor .cc-wp-start-grid>.cc-wp-origin-resource small{
 font-size:10px!important;overflow-wrap:anywhere!important;
}
