/* ==========================================================================
   Room Wanted · "I have something for you" window (wanted.html, <dialog id="propose">)
   The form inside is the post.html form (css/post.css + css/account/forms.css) without
   its own card; only the window and the listing picker live here.
   ========================================================================== */

.propose {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  box-shadow: var(--shadow-search);
}

.propose::backdrop { background: var(--color-overlay); }

.propose__inner {
  position: relative;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.propose__close {
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 2px 10px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.propose__close:hover { background: var(--color-sand); }

.propose__title {
  padding-right: 36px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
}

.propose__summary {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-muted);
}

/* The post.html form, flat inside the window */
.propose .post-form {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  gap: 18px;
}

/* Listing picker: one row per listing (photo, title, code · zone · price) */
.propose__rooms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.post-form .propose__room {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
}

.post-form .propose__room input {
  width: auto;
  flex-shrink: 0;
  accent-color: var(--color-teal);
}

.post-form .propose__room:has(input:checked) {
  border-color: var(--color-teal);
  background: var(--color-teal-faint);
}

.post-form .propose__room--sent {
  opacity: 0.6;
  cursor: default;
}

.propose__thumb {
  width: 56px;
  height: 44px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: var(--color-sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.propose__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.propose__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.propose__room-title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.propose__room-meta {
  font-size: 12.5px;
  color: var(--color-muted);
}

.propose__sent {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-green-dark);
  white-space: nowrap;
}

/* "Add a listing" / "Sent!" */
.propose__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.propose__panel .btn { display: inline-flex; align-items: center; }
.propose__panel .form-alert { align-self: stretch; }

@media (max-width: 600px) {
  .propose { width: calc(100% - 16px); }
  .propose__inner { padding: 22px 18px; }
  .propose__title { font-size: 20px; }
}
