/** Rent Offer: one message, one current action, with optional Ask Josephs access. */
#rent-offer-page,
#rent-offer-page * { box-sizing: border-box; }

#rent-offer-page {
    --rop-blue: #00a2ff;
    --rop-text: rgba(0, 0, 0, 0.87);
    --rop-muted: rgba(0, 0, 0, 0.58);
    width: 100%;
    max-width: 43rem;
    min-height: max(25rem, calc(100dvh - 15rem));
    margin: 0 auto;
    padding: 1.5rem 0 calc(1.25rem + env(safe-area-inset-bottom, 0px));
    color: var(--rop-text);
    text-align: left;
}

#rent-offer-page [hidden] { display: none !important; }

#rent-offer-page .rop-title.ui.header {
    margin: 0 0 1rem;
    font-weight: 500;
}

#rent-offer-page .rop-primary-message {
    width: 100%;
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    background: #f3f4f5;
    border: 1px solid rgba(34, 36, 38, 0.1);
    border-radius: 0.4rem;
    font-size: 1.08rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#rent-offer-page .rop-primary-message-changed {
    animation: rop-message-attention 480ms ease-out both;
}

@keyframes rop-message-attention {
    0% {
        opacity: 0.35;
        transform: translateY(5px);
        background-color: #e7f5fd;
    }
    55% { background-color: #eef7fb; }
    100% {
        opacity: 1;
        transform: translateY(0);
        background-color: #f3f4f5;
    }
}

#rent-offer-page .rop-workflow { width: 100%; margin: 0 0 0.85rem; }

#rent-offer-page .rop-bedroom-buttons {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

#rent-offer-page .rop-bedroom-buttons .ui.button {
    width: 100%;
    min-width: 0;
    margin: 0;
}

#rent-offer-page .rop-postcode-controls {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

#rent-offer-page .rop-postcode-controls input {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    text-transform: uppercase;
}

#rent-offer-page .rop-postcode-controls .ui.button,
#rent-offer-page .rop-contact-form .ui.button {
    flex: 0 0 auto;
    margin: 0;
}

#rent-offer-page .rop-contact-form {
    max-width: 34rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid rgba(34, 36, 38, 0.12);
    border-radius: 0.4rem;
}

#rent-offer-page .rop-offer-result {
    width: 100%;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid rgba(0, 162, 255, 0.35);
    border-radius: 0.4rem;
    text-align: center;
}

#rent-offer-page .rop-offer-amount {
    color: #e03997;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
}

#rent-offer-page .rop-offer-period {
    margin-top: 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
}

#rent-offer-page .rop-offer-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.25rem;
    max-width: 34rem;
    margin: 1.25rem auto 0;
    padding: 0;
    text-align: left;
    list-style: none;
}

#rent-offer-page .rop-offer-benefits li::before {
    content: '\2713';
    margin-right: 0.45rem;
    color: #00b5ad;
    font-weight: 700;
}

#rent-offer-page .rop-offer-questions {
    margin: 1.5rem -1.25rem -1.25rem;
    padding: 1rem 1.25rem;
    background: #f3f4f5;
    border-top: 1px solid rgba(34, 36, 38, 0.1);
    border-radius: 0 0 0.4rem 0.4rem;
}

#rent-offer-page .rop-offer-question-prompt {
    margin: 0 0 0.75rem;
    font-weight: 600;
}

#rent-offer-page .rop-question-suggestions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#rent-offer-page .rop-question-suggestions .ui.button { margin: 0; }

#rent-offer-page .rop-question-suggestions .ui.button {
    color: rgba(0, 0, 0, 0.62) !important;
    background: rgba(255, 255, 255, 0.62) !important;
    border-color: rgba(34, 36, 38, 0.14) !important;
    box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.14) inset !important;
}

#rent-offer-page .rop-question-suggestions .ui.button:hover,
#rent-offer-page .rop-question-suggestions .ui.button:focus {
    color: #007fc7 !important;
    background: #fff !important;
}

#rent-offer-page .rop-offer-dialogue:not(:empty) {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#rent-offer-page .rop-dialogue-message {
    max-width: 88%;
    padding: 0.75rem 0.9rem;
    border-radius: 0.4rem;
    text-align: left;
    overflow-wrap: anywhere;
}

#rent-offer-page .rop-dialogue-user {
    align-self: flex-end;
    color: #fff;
    background: #00a2ff;
}

#rent-offer-page .rop-dialogue-assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid rgba(34, 36, 38, 0.12);
}

#rent-offer-page .rop-dialogue-label {
    margin-bottom: 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.78;
}

#rent-offer-page .rop-dialogue-content {
    line-height: 1.45;
    white-space: pre-wrap;
}

#rent-offer-page .rop-dialogue-action {
    display: inline-block;
    margin-top: 0.55rem;
    font-weight: 600;
    text-decoration: underline;
}

#rent-offer-page .rop-utilities { margin-top: 2.25rem; }

#rent-offer-page .rop-utilities .ui.divider { margin: 0 0 0.8rem; }

#rent-offer-page .rop-utility-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#rent-offer-page .rop-utility-buttons .ui.button { margin: 0; }

#rent-offer-page .rop-question-form.ui.form { margin: 1rem 0 0; }

#rent-offer-page .rop-compose {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

#rent-offer-page .rop-question-form textarea {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 3.4rem;
    max-height: 9rem;
    padding: 0.75rem;
    resize: vertical;
    font-size: 16px;
    line-height: 1.4;
}

#rent-offer-page .rop-send.ui.button {
    flex: 0 0 auto;
    min-width: 5rem;
    margin: 0;
}

#rent-offer-page .rop-question-exit {
    margin-top: 0.8rem;
    text-align: center;
}

#rent-offer-page .rop-question-exit .ui.button { margin: 0; }

#rent-offer-page .rop-inline-action {
    display: block;
    margin-bottom: 0.8rem;
    color: #008ad6;
    font-weight: 600;
    text-decoration: underline;
}

#rent-offer-page .rop-privacy {
    margin-top: 1rem;
    color: var(--rop-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

@media (max-width: 480px) {
    #rent-offer-page { padding-top: 0.75rem; }
    #rent-offer-page .rop-bedroom-buttons { grid-template-columns: repeat(2, 1fr); }
    #rent-offer-page .rop-offer-benefits { grid-template-columns: 1fr; }
    #rent-offer-page .rop-question-suggestions .ui.button { width: 100%; }
}

@media (max-width: 360px) {
    #rent-offer-page .rop-compose,
    #rent-offer-page .rop-postcode-controls { flex-wrap: wrap; }
    #rent-offer-page .rop-send.ui.button,
    #rent-offer-page .rop-postcode-controls .ui.button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    #rent-offer-page .rop-primary-message-changed { animation: none; }
}
