/* ============================================================
   NEST Listings — Structural CSS only
   All colors, fonts, and decorative styles are intentionally
   removed so the active WordPress theme handles them.
   Only layout, grid, positioning, and functional UI kept.
   ============================================================ */

/* ── Search Form ── */
.nest-search-form {
    margin-bottom: 28px;
}
.nest-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.nest-search-field {
    flex: 1 1 160px;
}
.nest-search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.nest-search-field select,
.nest-search-field input {
    width: 100%;
}
.nest-search-submit { flex: 0 0 auto; }

/* ── Listings Grid ── */
.nest-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ── Property Card ── */
.nest-property-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.nest-card--leased { opacity: .75; }

.nest-card-image {
    position: relative;
    display: block;
    overflow: hidden;
    height: 190px;
}
.nest-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.nest-card-image:hover img { transform: scale(1.04); }

.nest-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status badges */
.nest-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #fff;
    border-radius: 3px;
}
.nest-badge--available { background: #2a7a4e; }
.nest-badge--featured  { background: #8B5E3C; }
.nest-badge--leased    { background: #888; }
.nest-badge--coming    { background: #3a7bd5; }

.nest-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.nest-card-title { margin: 0 0 6px; }
.nest-card-excerpt {
    flex: 1;
    margin: 0 0 10px;
}
.nest-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}
.nest-meta-tag {
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid currentColor;
    opacity: .7;
}
.nest-card-rent {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

/* ── Notices ── */
.nest-notice {
    padding: 12px 16px;
    margin-bottom: 18px;
    border-left: 4px solid currentColor;
}
.nest-notice--success { color: #155724; background: #d4edda; }
.nest-notice--warning { color: #856404; background: #fff3cd; }
.nest-notice--error   { color: #721c24; background: #f8d7da; }
.nest-notice--info    { color: #0c5460; background: #d1ecf1; }
.nest-notice a { color: inherit; font-weight: 700; }

/* ── Forms ── */
.nest-listing-form,
.nest-editor { max-width: 760px; }

.nest-form-section { margin-bottom: 28px; }
.nest-form-row     { margin-bottom: 14px; }
.nest-form-row--2  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nest-form-row--3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.nest-listing-form label,
.nest-editor label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
}
.nest-listing-form input[type=text],
.nest-listing-form input[type=number],
.nest-listing-form input[type=date],
.nest-listing-form input[type=email],
.nest-listing-form select,
.nest-listing-form textarea,
.nest-editor input[type=text],
.nest-editor input[type=number],
.nest-editor input[type=date],
.nest-editor select,
.nest-editor textarea {
    width: 100%;
    box-sizing: border-box;
}
.nest-listing-form textarea,
.nest-editor textarea { resize: vertical; }
.nest-form-hint { font-size: 12px; opacity: .7; margin: 4px 0 0; }
.req { color: #c0392b; }

/* ── Owner Dashboard — My Listings grid ── */
.nest-owner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.nest-owner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.nest-owner-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.nest-owner-card-image {
    position: relative;
    height: 190px;
    overflow: hidden;
}
.nest-owner-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nest-pub-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 3px;
}
.nest-pub-badge--live    { background: rgba(42,122,78,.9); }
.nest-pub-badge--pending { background: rgba(100,100,100,.85); }

.nest-owner-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.nest-owner-card-body h3 { margin: 0 0 8px; }

.nest-owner-card-actions { margin-top: auto; padding-top: 12px; }
.nest-owner-card-links {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}
.nest-text-link { font-weight: 600; }
.nest-text-link--danger { color: #c0392b; }

.nest-empty-state {
    text-align: center;
    padding: 48px 24px;
    border: 2px dashed;
    opacity: .6;
}
.nest-empty-state p { margin-bottom: 16px; }

/* ── Tabbed Editor ── */
.nest-editor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.nest-editor-title {
    flex: 1;
    margin: 0;
}
.nest-tab-nav {
    display: flex;
    border-bottom: 2px solid;
    margin-bottom: 28px;
    opacity: .9;
}
.nest-tab {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: opacity .2s;
    white-space: nowrap;
    opacity: .6;
}
.nest-tab:hover  { opacity: 1; }
.nest-tab--active { opacity: 1; border-bottom-color: currentColor; }

.nest-tab-panel { animation: nestFadeIn .2s ease; }
@keyframes nestFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Status radio options */
.nest-status-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 520px;
}
.nest-status-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    opacity: .75;
    transition: opacity .2s;
}
.nest-status-option:hover { opacity: 1; }
.nest-status-option--active { opacity: 1; font-weight: 600; }
.nest-status-option input[type=radio] { margin-top: 3px; flex-shrink: 0; }
.nest-status-option-label { display: flex; flex-direction: column; gap: 2px; }
.nest-status-option-label span { font-size: 12px; font-weight: normal; opacity: .7; }

/* ── Photo Manager ── */
.nest-pm-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.nest-pm-tile {
    position: relative;
    width: 110px;
    cursor: grab;
}
.nest-pm-tile:active { cursor: grabbing; }
.nest-pm-tile.nest-pm-dragging { opacity: .4; }

.nest-pm-tile-inner {
    position: relative;
    width: 110px;
    height: 82px;
    overflow: hidden;
}
.nest-pm-tile-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nest-pm-cover-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 2px 0;
    text-transform: uppercase;
}
.nest-pm-tile-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    opacity: 0;
    transition: opacity .15s;
}
.nest-pm-tile:hover .nest-pm-tile-actions { opacity: 1; }
.nest-pm-delete {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nest-pm-delete:hover { background: #c0392b; }

.nest-pm-drag-handle {
    position: absolute;
    top: 4px;
    left: 4px;
    color: rgba(255,255,255,.8);
    font-size: 14px;
    cursor: grab;
    opacity: 0;
    transition: opacity .15s;
    user-select: none;
}
.nest-pm-tile:hover .nest-pm-drag-handle { opacity: 1; }

.nest-pm-upload-zone {
    border: 2px dashed;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    opacity: .7;
    transition: opacity .2s;
}
.nest-pm-upload-zone:hover,
.nest-pm-upload-zone.nest-pm-dragover { opacity: 1; }
.nest-pm-drop-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.nest-pm-drop-inner p { margin: 4px 0; }

.nest-pm-progress-bar {
    height: 6px;
    background: rgba(0,0,0,.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.nest-pm-progress-fill {
    height: 100%;
    background: currentColor;
    border-radius: 3px;
    transition: width .15s linear;
    width: 0%;
}
.nest-pm-progress-text { font-size: 12px; opacity: .7; }
.nest-pm-status { font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .nest-search-row,
    .nest-form-row--2,
    .nest-form-row--3 { flex-direction: column; grid-template-columns: 1fr; }
    .nest-listings-grid,
    .nest-owner-grid   { grid-template-columns: 1fr; }
    .nest-tab          { padding: 10px 14px; font-size: 13px; }
    .nest-pm-tile,
    .nest-pm-tile-inner { width: 90px; height: 68px; }
    .nest-owner-card-links { flex-wrap: wrap; }
}

/* ============================================================
   Single Property Page — Single Column Layout
   ============================================================ */

.nest-single-property {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 4px;
}

.nest-single-breadcrumb {
    margin-bottom: 14px;
    font-size: 13px;
}

/* ── Gallery ── */
.nest-gallery { margin-bottom: 20px; }

.nest-gallery-main {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    background: #111;
}
.nest-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .2s;
}
.nest-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 60px;
    font-size: 28px;
    cursor: pointer;
    z-index: 2;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nest-gallery-nav:hover { background: rgba(0,0,0,.8); }
.nest-gallery-prev { left: 0; }
.nest-gallery-next { right: 0; }
.nest-gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 14px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 20px;
}
.nest-gallery-thumbs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.nest-gallery-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    cursor: pointer;
    opacity: .6;
    transition: opacity .15s;
    border: 2px solid transparent;
    box-sizing: border-box;
}
.nest-gallery-thumb:hover { opacity: 1; }
.nest-thumb-active { opacity: 1; border-color: currentColor; }

/* ── Header: title + rent + actions ── */
.nest-single-header {
    margin-bottom: 24px;
}
.nest-single-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.nest-single-title {
    margin: 0;
    flex: 1;
    min-width: 200px;
}
.nest-single-rent {
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}
.nest-single-rent span {
    font-size: 13px;
    font-weight: 400;
    opacity: .7;
}

/* ── Action buttons row ── */
.nest-single-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.nest-btn-action {
    padding: 10px 18px;
    font-size: 14px;
    white-space: nowrap;
}
.nest-btn-phone {
    font-weight: 800;
}

/* ── Inline panels ── */
.nest-panel {
    border: 1px solid;
    border-radius: 4px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.nest-panel h3 { margin: 0 0 14px; font-size: 15px; }

.nest-inquiry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
.nest-form-row-full { grid-column: 1 / -1; }
.nest-inquiry-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .7;
}
.nest-inquiry-form input,
.nest-inquiry-form textarea {
    width: 100%;
    box-sizing: border-box;
}
.nest-inquiry-form textarea { resize: vertical; }

/* ── Details table ── */
.nest-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
    font-size: 14px;
}
.nest-details-table tr { border-bottom: 1px solid; opacity: .85; }
.nest-details-table th {
    text-align: left;
    padding: 8px 12px 8px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    width: 35%;
    opacity: .65;
}
.nest-details-table td { padding: 8px 0; }

/* ── Description ── */
.nest-single-description h2 { margin-bottom: 12px; }
.nest-single-description p  { line-height: 1.7; margin-bottom: 14px; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .nest-gallery-main  { height: 240px; }
    .nest-gallery-thumb { width: 56px; height: 42px; }
    .nest-single-title-row { flex-direction: column; gap: 4px; }
    .nest-single-actions { flex-direction: column; }
    .nest-btn-action { width: 100%; text-align: center; }
    .nest-inquiry-grid { grid-template-columns: 1fr; }
}

/* ── Pagination ── */
.nest-results-count {
    font-size: 13px;
    opacity: .7;
    margin-bottom: 16px;
}
.nest-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid;
    opacity: .85;
}
.nest-page-btn {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
    min-width: 36px;
    text-align: center;
}
.nest-page-btn:hover { opacity: .7; }
.nest-page-current {
    font-weight: 800;
    opacity: 1;
}
.nest-page-ellipsis {
    border-color: transparent;
    cursor: default;
}
