/* Gear collection panel (utilities/printGearPanel.php) */

.gear-panel {
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #222;
}

.gear-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.gear-search {
  flex: 1;
  min-width: 160px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #d5dbe2;
  border-radius: 8px;
  background: #fafbfc;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gear-search:focus {
  border-color: #009966;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.15);
}

.gear-add-button {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 8px;
  background: #009966;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.gear-add-button:hover {
  background: #007a52;
}

.gear-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.gear-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 5px;
  border: 1px solid #e3e7ec;
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.gear-tab img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.gear-tab:hover {
  border-color: #009966;
}

.gear-tab.is-active {
  border-color: #009966;
  background: #e6f5ef;
}

.gear-tab-count {
  color: #666;
  font-size: 11px;
  font-weight: 600;
}

/* One row per category; scroll sideways for the rest */
.gear-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gear-grid > .gear-card {
  flex: 0 0 132px;
  scroll-snap-align: start;
}

.gear-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  border: 1px solid #e3e7ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gear-card > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.gear-card-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.gear-card-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.gear-card-meta {
  color: #555;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.gear-card-note {
  color: #777;
  font-size: 11px;
  font-style: italic;
  line-height: 1.3;
  text-align: center;
}

.gear-card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
  font-size: 11px;
}

.gear-card-actions a {
  color: #009966;
  text-decoration: none;
}

.gear-card-actions a.gear-card-delete {
  color: #c0392b;
}

/* Add required gear form on the trip page (view/tripDisplay.php) */
.req-gear-form {
  box-sizing: border-box;
  max-width: 560px;
  margin: 10px 0;
  padding: 14px 16px;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #222;
}

.req-gear-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

.req-gear-row {
  display: flex;
  gap: 10px;
}

.req-gear-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
}

.req-gear-grow {
  flex: 1;
}

.req-gear-narrow {
  flex: 0 0 120px;
}

.req-gear-input {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d5dbe2;
  border-radius: 8px;
  background: #fafbfc;
  font-family: inherit;
  font-size: 13px;
  color: #222;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.req-gear-input:focus {
  border-color: #009966;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.15);
}

textarea.req-gear-input {
  resize: vertical;
}

.req-gear-actions {
  display: flex;
  justify-content: flex-end;
}

.req-gear-submit {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #009966;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.req-gear-toggle {
  margin: 6px 0;
  padding: 6px 12px;
  border: 1px dashed #009966;
  border-radius: 8px;
  background: transparent;
  color: #009966;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Gear lists on the trip page: "Required" and "Available from Members" share these rules
   (utilities/printTripGearPanel.php and utilities/printTripAvailableGear.php) */
.trip-gear-header {
  margin: 18px 0 8px;
  color: #333;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trip-gear-ul,
.trip-gear-items {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #222;
}

.trip-gear-cat {
  margin-bottom: 10px;
}

.trip-gear-cat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-weight: 600;
}

.trip-gear-cat-head img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.trip-gear-items {
  margin-left: 24px;
}

.trip-gear-item {
  margin-bottom: 5px;
  line-height: 1.4;
}

.trip-gear-meta {
  color: #666;
  font-size: 12px;
}

.trip-gear-price {
  color: #888;
  font-size: 12px;
}

.trip-gear-borrow {
  color: #009966;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.trip-gear-free {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #007a4d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Rent/borrow flow opened under a gear item on the trip page. The div stays hidden until it has content. */
.trip-gear-flow {
  margin: 6px 0 8px;
  padding: 10px 12px;
  border: 1px solid #e3e7ec;
  border-radius: 10px;
  background: #fafbfc;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #222;
}

.trip-gear-flow:empty {
  display: none;
}

/* Safety net: no picture inside a gear panel may be wider than its panel. The fixed-size images below
   use more specific selectors, so they keep their sizes. */
.gear-panel img,
.gear-item-panel img,
.trip-gear-flow img,
.gear-borrow img {
  max-width: 100%;
}

.gear-panel .gear-card-img {
  width: 44px;
  height: 44px;
  max-width: 44px;
  object-fit: contain;
}

.gear-item-panel .gear-summary-photo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gear-borrow .gear-borrow-img {
  width: 56px;
  height: 56px;
  max-width: 56px;
}

/* Gear item panel below the gear collection (utilities/printGearPanel.php). It stays hidden until an item fills it. */
.gear-item-panel {
  box-sizing: border-box;
  max-width: 100%;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #222;
  overflow: hidden;
}

.gear-item-panel:empty {
  display: none;
}

.gear-item-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.gear-item-panel h3 + .gear-summary,
.gear-item-panel h3 + p {
  margin-top: 0;
}

.gear-item-panel h4 {
  margin: 18px 0 8px;
  color: #666;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gear-item-panel p {
  margin: 6px 0;
  line-height: 1.5;
}

.gear-item-panel .gear-summary-photo {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}


/* Item summary on the gear page (view/gearDisplay.php): labelled sections beside a larger photo */
.gear-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
  margin: 10px 0 16px;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  color: #222;
}

.gear-summary-info {
  display: flex;
  flex: 1 1 280px;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.gear-summary-block {
  padding: 10px 14px;
  border: 1px solid #e3e7ec;
  border-left: 3px solid #009966;
  border-radius: 10px;
  background: #fafbfc;
}

.gear-summary-label {
  margin-bottom: 4px;
  color: #777;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gear-summary-text {
  font-size: 14px;
  line-height: 1.45;
}

.gear-summary-text + .gear-summary-text {
  margin-top: 4px;
}

.gear-summary-muted {
  color: #666;
  font-size: 13px;
}

/* Fixed box: the photo always fits inside it, whatever its shape or size */
.gear-summary-photo {
  box-sizing: border-box;
  display: flex;
  flex: 0 1 380px;
  align-items: center;
  justify-content: center;
  width: 380px;
  max-width: 100%;
  height: 340px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gear-summary-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Rental request form on the gear page (view/gearDisplay.php) */
.gear-request {
  box-sizing: border-box;
  max-width: 560px;
  margin: 10px 0;
  padding: 14px 16px;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #222;
}

.gear-request-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

.gear-request-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gear-request-field {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
}

.gear-request-small {
  flex: 0 1 130px;
}

.gear-request-pair {
  display: flex;
  gap: 6px;
}

.gear-request-input {
  box-sizing: border-box;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #d5dbe2;
  border-radius: 8px;
  background: #fafbfc;
  font-family: inherit;
  font-size: 13px;
  color: #222;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.gear-request-input:focus {
  border-color: #009966;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.15);
}

.gear-request-time {
  width: 84px;
  flex: 0 0 84px;
}

textarea.gear-request-input {
  resize: vertical;
}

.gear-request-actions {
  display: flex;
  justify-content: flex-end;
}

/* Simplified borrow view, opened under a gear item on the trip page (view/gearBorrowSimple.php) */
.gear-borrow {
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #222;
}

.gear-borrow-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gear-borrow-img {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.gear-borrow-name {
  font-size: 15px;
  font-weight: 600;
}

.gear-borrow-owner {
  color: #666;
  font-size: 12px;
}

.gear-borrow-desc {
  margin-top: 8px;
  line-height: 1.4;
}

.gear-borrow-note {
  margin-top: 6px;
  color: #777;
  font-size: 12px;
  font-style: italic;
}

.gear-borrow-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.gear-borrow-price {
  color: #444;
  font-size: 13px;
  font-weight: 600;
}

.gear-borrow-footer .req-gear-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.trip-gear-flow-close {
  margin-bottom: 6px;
  text-align: right;
  font-size: 12px;
}

.trip-gear-flow-close a {
  color: #666;
  text-decoration: none;
}

.trip-gear-empty {
  margin: 8px 0;
  color: #777;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-style: italic;
}

/* Gear toolbar on the trip page: both add buttons side by side, and the one open form below them */
.trip-gear-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.trip-gear-dialog {
  box-sizing: border-box;
  max-width: 560px;
  margin: 6px 0 10px;
  padding: 14px 16px;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #222;
}

.trip-gear-title {
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

.trip-gear-list {
  max-height: 200px;
  margin-bottom: 10px;
  overflow-y: auto;
}

.trip-gear-note {
  color: #777;
  font-size: 12px;
}

.trip-gear-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}

.trip-gear-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.req-gear-cancel {
  padding: 8px 16px;
  border: 1px solid #d5dbe2;
  border-radius: 8px;
  background: #fff;
  color: #444;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.req-gear-toggle:hover {
  background: #e6f5ef;
}

.req-gear-submit:hover {
  background: #007a52;
}

.gear-empty {
  padding: 8px 0;
  color: #777;
  font-style: italic;
}
