/* Wondering Imp v0.8.21 — compact proposal dropdowns + proposal search */

.offer-search-panel{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:17px;
  padding:14px;
  margin:0 0 14px;
}
.offer-search-panel>label{display:block;color:var(--forest);font-size:12px;font-weight:900;margin:0 0 8px}
.offer-search-row{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:0 8px 0 11px;min-width:0}
.offer-search-icon{color:#557067;font-size:22px;line-height:1;flex:none}
.offer-search-row input{flex:1;min-width:0;border:0!important;outline:0;background:transparent;padding:12px 2px;font-size:16px!important;color:var(--ink)}
.offer-search-row input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.offer-search-clear{padding:7px 10px!important;font-size:11px;flex:none}
.offer-search-count{display:block;color:var(--muted);font-size:11px;margin-top:7px;line-height:1.35}

.offers-month-body{display:grid;gap:8px}
.trade-proposal-dropdown{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fffdf9;
  overflow:hidden;
}
.trade-proposal-dropdown>summary{
  list-style:none;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto auto 22px;
  gap:9px;
  align-items:center;
  padding:12px 13px;
  cursor:pointer;
  color:var(--forest);
  user-select:none;
}
.trade-proposal-dropdown>summary::-webkit-details-marker{display:none}
.trade-proposal-dropdown>summary::after{
  content:'＋';
  width:22px;height:22px;border-radius:50%;display:grid;place-items:center;
  background:#efe8d8;color:var(--forest);font-weight:900;line-height:1;
}
.trade-proposal-dropdown[open]>summary{background:#fff9ed;border-bottom:1px solid var(--line)}
.trade-proposal-dropdown[open]>summary::after{content:'−'}
.trade-proposal-dropdown.needs-attention>summary{box-shadow:inset 4px 0 0 #d9ad52}
.proposal-summary-person{min-width:0;display:flex;align-items:baseline;gap:7px}
.proposal-summary-person small{text-transform:uppercase;letter-spacing:.7px;color:var(--muted);font-size:9px;font-weight:900;white-space:nowrap}
.proposal-summary-person strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.proposal-summary-date{font-size:12px;color:var(--muted);font-weight:800;white-space:nowrap}
.proposal-unread{font-size:9px;font-weight:900;background:#b8453e;color:white;border-radius:999px;padding:5px 7px;white-space:nowrap}
.trade-proposal-body{background:#fff}
.trade-proposal-dropdown .offer-row{border:0;border-radius:0;margin:0;background:transparent;padding:15px}
.trade-proposal-dropdown .offer-row>span.muted{display:none}
.offer-search-empty{margin-top:4px}

@media(max-width:780px){
  .offer-search-panel{padding:12px;margin-bottom:12px}
  .trade-proposal-dropdown>summary{grid-template-columns:minmax(0,1fr) auto 22px;gap:8px;padding:12px}
  .proposal-summary-person{grid-column:1/2;display:block}
  .proposal-summary-person small{display:block;margin-bottom:2px}
  .proposal-summary-person strong{display:block;font-size:16px}
  .proposal-summary-date{grid-column:2/3;grid-row:1/2;font-size:11px}
  .trade-proposal-dropdown>summary::after{grid-column:3/4;grid-row:1/2}
  .trade-proposal-dropdown>summary>.status{grid-column:1/2;grid-row:2/3;justify-self:start}
  .proposal-unread{grid-column:2/3;grid-row:2/3;justify-self:end}
  .trade-proposal-dropdown .offer-row{padding:13px 12px}
}

@media(max-width:430px){
  .offer-search-row{padding-left:9px}
  .offer-search-icon{font-size:19px}
  .offer-search-clear{padding:6px 8px!important}
  .proposal-summary-person strong{font-size:15px}
  .proposal-summary-date{font-size:10px}
}

/* Shared month/year archive groups for Offers and Treasure Alerts. */
.history-month{
  border:1px solid var(--line);
  border-radius:17px;
  background:rgba(255,253,249,.68);
  margin:0 0 12px;
  overflow:hidden;
}
.history-month>summary{
  list-style:none;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 24px;
  align-items:center;
  gap:10px;
  padding:14px 15px;
  cursor:pointer;
  color:var(--forest);
  background:#fffaf0;
  border-bottom:1px solid transparent;
  user-select:none;
}
.history-month>summary::-webkit-details-marker{display:none}
.history-month>summary::after{
  content:'＋';
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:50%;
  color:var(--forest);
  background:#efe8d8;
  font-weight:900;
  line-height:1;
}
.history-month[open]>summary{border-bottom-color:var(--line)}
.history-month[open]>summary::after{content:'−'}
.history-month-title{font-family:Georgia,serif;font-size:19px;font-weight:800;line-height:1.1}
.history-month-meta{font-size:11px;color:var(--muted);font-weight:800;text-align:right;white-space:nowrap}
.history-month-meta .attention{color:#9a5b1e}
.history-month-meta .new{color:#9d3d38}
.history-month-body{padding:12px}
.offers-month-body .offer-row:last-child{margin-bottom:0}

/* Let the page itself scroll; month groups now prevent long alert walls. */
.treasure-alert-list{max-height:none!important;overflow:visible!important;padding-right:0!important}
.treasure-alert-list .history-month-body{display:grid;gap:9px}

/* Per-alert dismiss X. The row itself remains tappable to open the alert. */
.treasure-alert-actions{display:flex;align-items:flex-start;gap:7px;justify-content:flex-end}
.treasure-alert-actions>i{
  font-style:normal;
  font-size:8px;
  font-weight:900;
  letter-spacing:.8px;
  background:#b8453e;
  color:#fff;
  border-radius:999px;
  padding:5px 7px;
}
.treasure-alert-dismiss{
  width:30px;
  height:30px;
  min-width:30px;
  padding:0;
  border:1px solid #ddd4c3;
  border-radius:9px;
  background:#fffdf8;
  color:#67736e;
  font-size:18px;
  font-weight:700;
  line-height:1;
}
.treasure-alert-dismiss:hover,.treasure-alert-dismiss:focus-visible{background:#f3ede1;color:#173d33;border-color:#cbbc9d}
.treasure-alert-dismiss:focus-visible{outline:3px solid rgba(216,170,78,.24);outline-offset:2px}

@media(max-width:780px){
  .history-month>summary{grid-template-columns:minmax(0,1fr) auto 22px;padding:13px 12px}
  .history-month-title{font-size:18px}
  .history-month-meta{font-size:10px}
  .history-month-body{padding:10px}
  .treasure-alert-card{grid-template-columns:38px minmax(0,1fr) auto!important}
  .treasure-alert-actions{position:relative;right:auto;top:auto;flex-direction:column;align-items:flex-end}
}

@media(max-width:430px){
  .history-month>summary{grid-template-columns:minmax(0,1fr) 22px;gap:8px}
  .history-month-meta{grid-column:1/-1;text-align:left;white-space:normal;margin-top:-3px}
  .treasure-alert-card{grid-template-columns:34px minmax(0,1fr) auto!important;gap:9px!important;padding:12px!important}
  .treasure-alert-dismiss{width:28px;height:28px;min-width:28px}
}
