/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: black;
}

/* Boxed page above 1920px (Nikko, 2026-10-12, after autotrader.com): the body
   stops stretching and sits centred, so a 4K or ultrawide window does not blow
   the 1536px hero photos up to 2.5x or spread sections across a 3800px row.
   Screens up to 1920px wide are untouched. The margins take the page colour
   (dark mode: theme.css). The fixed navbar keeps its full-width band but
   aligns its content to this same column (navbar.css). */
:root {
    --site-max-width: 1920px;
    --site-edge-line: #d8dbe1;   /* opaque: a translucent line went near-black over the body's own black background; dark mode in theme.css */
}

html {
    background-color: var(--bg-page, #f4f4f4);
}

/* `html > body` outranks the `body { margin: 0 }` that several page sheets
   (createListingsPublic, settings, conversation, prelaunch...) still carry
   from the full-width layout, without resorting to !important. */
html > body {
    max-width: var(--site-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Once the margins appear, a hairline on each side of the column marks its
   edge. Only above the cap, so a 1920px screen never shows a line at the
   window edge; the column is stretched to the window height so the lines
   run top to bottom on short pages too. */
@media (min-width: 1921px) {
    html > body {
        min-height: 100vh;
        border-left: 1px solid var(--site-edge-line);
        border-right: 1px solid var(--site-edge-line);
    }
}

h1, h2 {
    font-size: 55px;
    margin: 0;
    font-weight: normal;
}

h3 {
    font-size: 45px;
    margin: 0;
    font-weight: bold;
}

/* Page Container */
.PageContainer {
    margin-top: 80px;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f4f4f4;
    min-height: calc(100vh - 80px);
}


.contentdivider {
    width: 100%;
    background-color: #da1515;
    z-index: 8;
    padding: 0;
    margin: 0;
    position: relative;
    height: 10px;
}

.btn {
    background-color: #1e40af;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1.5px solid #6f6f6f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: #1e40af;
    transform: translateY(-3px)
}

.btn:active {
    transform: translateY(1px)
}

/* ── Payment result pages (success / cancel) ── */

/* index.css resets .SectionTitle to margin:0 and the global reset zeroes <p>,
   leaving the message flush against the heading's underline. Scoped here so
   the homepage's use of .SectionTitle is untouched. */
.payment-result .SectionTitle {
    margin-bottom: 18px;
}

.payment-result p {
    margin: 0;
    max-width: 62ch;
    text-align: center;
    line-height: 1.6;
}

/* Action row on the payment result pages.
   display:flex blockifies the <a class="btn"> children so their vertical
   padding takes up space — as inline elements the padding overflowed the line
   box and painted over the message above. */
.payment-btn-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.cancel-btn {
    background-color: #da1515 !important;
    width: auto;
    text-align: center;
}

.cancel-btn:hover {
    background-color: #ad0f0f !important;
}

.dashboardreturn {
    margin-bottom: 15px;
}

.danger-btn {
    margin-top: 10px;
    margin-bottom: 0px !important;
}



.UserInstructions, .PaymentCalculator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    gap: 0;
}
.PaymentCalculator1{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    gap: 0;
}

.SectionTitle {
    color: #1e40af;
    margin-top: 15px;
    margin-bottom: 5px;
    border-bottom: 2px solid #c3c1c1a4;
    padding-bottom: 5px;
    font-weight: bold;
    text-align: center;
}

.SectionTitle1 {
    color: #1e40af;
    margin-top: 0px;
    margin-bottom: 5px;
    border-bottom: 2px solid #c3c1c1a4;
    padding-bottom: 5px;
    font-weight: bold;
    text-align: center;
}

.SectionCaption {
    color: black;
    margin-bottom: 20px;
}

.SectionCaption-calculator {
    color: black;
    margin-bottom: 10px;
}


/* Favorite Button Styling */

/* Default Favorite Button Styling */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    height: 40px;
    width: 40px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 5;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

/* Default Icon State */
.favorite-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

/* Hover Effect */
.favorite-btn:hover .favorite-icon {
    transform: scale(1.2); /* Slightly enlarge on hover */
}

/* Favorited State */
.favorite-btn.favorited .favorite-icon {
    content: url('/icons/heart-filled.svg?v=870d25f58f'); /* Red heart for favorited state */
}

/* Hover Effect (Not Favorited) */
.favorite-btn:not(.favorited):hover .favorite-icon {
    content: url('/icons/heart-hover.svg?v=53d923520a'); /* Light red heart on hover */
}


.MainImageContainer .heart {
    position: absolute;
    top: 10px; /* Adjust as needed */
    right: 10px; /* Adjust as needed */
    z-index: 10;
}

.image-container {
    position: relative;
}

.image-container .heart {
    position: absolute;
    top: 10px; /* Adjust as needed */
    right: 10px; /* Adjust as needed */
    z-index: 5;
}


.alert {
    position: fixed;
    top: 50px;
    padding: 10px 20px;
    margin: 20px auto;
    max-width: 800px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    z-index: 50;
    height: auto;
    width: 300px;
    align-self: center;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    z-index: 50;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    z-index: 50;    
}


/* Floating location box */
.location-box {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10;
    background-color: #f9f9f9;
    border: 1px solid #b7b5b5;
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-details-page.has-listing-actions .location-box {
    top: 160px;
}

.location-box.collapsed {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 50%;
    justify-content: center;
    overflow: hidden;
}

.location-box.collapsed form {
    display: none;
}

.location-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-box input {
    width: 120px;
    padding: 5px 8px;
    border: 1px solid #6f6f6f;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.location-box button {
    background-color: #1e40af;
    color: #fff;
    border: 1.5px solid #6f6f6f;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.location-box button:hover {
    background-color: #1e40af;
}

@media (max-width: 750px) {
    .listing-details-page.has-listing-actions .location-box {
        top: 150px;
    }
}

@media (max-width: 490px) {
    .listing-details-page .location-box {
        top: auto;
        bottom: 20px;
    }
}

/* Google OAuth SVG icon */
.google-svg {
    display: block;
}

/* Contact page */
.contact-form-wrap {
    padding: 24px 28px;
    max-width: 640px;
}

/* Signed-in visitors: identity fields come from the account and are locked */
.contact-form-wrap input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.contact-email-link {
    font-size: 0.9rem;
    word-break: break-all;
}

.contact-card-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 6px 0 0;
}

.contact-card-note {
    font-size: 0.85rem;
    color: #374151;
    margin: 6px 0 0;
}

.contact-name-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Required field asterisk */
.form-required {
    color: #dc2626;
}

/* Resizable textarea */
.textarea-resizable {
    resize: vertical;
}

/* Form submit/cancel button sizing */
.btn--form-submit {
    width: auto;
    padding: 10px 28px;
}

.btn--form-cancel {
    width: auto;
    padding: 10px 20px;
}

/* ── Password show/hide toggle (auth pages + account settings) ── */
.pw-field {
    position: relative;
    width: 100%;
}

/* [type] outranks the per-page `.form-group input` / `.acct-form-group input`
   padding rules regardless of stylesheet load order */
.pw-field input[type] {
    padding-right: 44px;
}

.pw-field .pw-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
}

.pw-field .pw-toggle:hover,
.pw-field .pw-toggle:focus-visible {
    color: #374151;
}

.pw-field .pw-toggle svg {
    width: 18px;
    height: 18px;
}

/* One icon at a time: eye while masked, eye-off while revealed */
.pw-field .pw-toggle .pw-eye-off,
.pw-field .pw-toggle.pw-showing .pw-eye {
    display: none;
}

.pw-field .pw-toggle.pw-showing .pw-eye-off {
    display: block;
}

/* Screen-reader-only text (the browse page's <h1>): present for assistive tech
   and crawlers, removed from the visual layout without display:none. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Bot-guard honeypot (views/contact.ejs, utils/contactFormGuard.js): off-screen,
   not display:none, so bots that skip hidden fields still see and fill it. */
.aal-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
