/**
 * MSHB Property Detail Styles
 */

#mshb-property-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

#property-details-container,
#property-cash-flow,
#property-improvements,
#full-size-images,
#map {
    color: #333;
    line-height: 1.3;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

/* Loading and error states */
.mshb-loading,
.mshb-error,
.mshb-no-images {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.mshb-error {
    color: #c00;
}

/* Contract CTA button */
.property-contract-cta {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 10px;
}

.contract-button-large {
    display: inline-block;
    padding: 15px 40px;
    background-color: #27ae60;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.contract-button-large:hover {
    background-color: #219a52;
    color: white;
    text-decoration: none;
}

.property-header {
    text-align: center;
    padding: 25px 0 5px;
    margin-bottom: 15px;
}

.property-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1e3275;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.property-header p {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
}


/* Hero stats - big numbers at top */
.property-hero-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, #1e3275 0%, #2a4494 100%);
    padding: 30px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.hero-stat {
    text-align: center;
    flex: 1;
}

.hero-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.hero-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

/* Two-column details grid */
.property-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
    margin-bottom: 25px;
    padding: 0 15px;
}

.details-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Property stats layout */
.property-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px 20px;
    margin: 0 0 10px;
    padding: 0 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted #ddd;
    padding-bottom: 3px;
}

.stat-label {
    font-weight: 500;
    color: #444;
    font-size: 18px;
}

.stat-value {
    font-weight: 600;
    color: #1e3275;
    font-size: 18px;
}

/* Cash flow highlight */
.cash-flow {
    text-align: center;
    margin: 25px 0 30px !important;
}

.cash-flow .amount {
    font-size: 18px;
    font-weight: 600;
    color: #1e3275;
}

/* Improvements section (legacy) */
.improvements-intro {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    color: #444;
    line-height: 1.4;
    padding: 0 15px;
}

.improvement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 35px;
}

.improvement-item {
    text-align: center;
    font-size: 16px;
    color: #1e3275;
    padding: 6px 3px;
    border-bottom: 1px solid #eee;
}

/* Special extras section (legacy) */
.property-details-extras {
    margin-top: 25px;
    margin-bottom: 35px;
}

.property-details-extras h6 {
    font-size: 18px;
    font-weight: 600;
    color: #1e3275;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 10px;
}

.property-details-extras ul {
    list-style-type: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
    margin: 0;
}

.property-details-extras li {
    text-align: center;
    font-size: 16px;
    color: #1e3275;
    padding: 6px 3px;
    border-bottom: 1px solid #eee;
}

/* NEW Improvements section - Two column checklist */
.improvements-section {
    margin: 30px 0;
    padding: 0 15px;
}

.improvements-heading {
    font-size: 20px;
    font-weight: 600;
    color: #1e3275;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.improvements-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

.checklist-column {
    display: flex;
    flex-direction: column;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    line-height: 1.4;
}

.checklist-item:last-child {
    border-bottom: none;
}

.check-mark {
    color: #27ae60;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Special Extras box */
.extras-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px 25px;
    margin: 30px 0;
    border-left: 4px solid #1e3275;
}

.extras-heading {
    font-size: 16px;
    font-weight: 600;
    color: #1e3275;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.extras-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.extras-item {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
}

/* Gallery Preview */
.gallery-preview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 8px;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 400px;
}

.gallery-main {
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-main:hover img {
    transform: scale(1.02);
}

.gallery-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-thumb {
    flex: 1;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.gallery-thumb:first-child {
    border-radius: 0 8px 0 0;
}

.gallery-thumb:last-child {
    border-radius: 0 0 8px 0;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.05);
}

.view-all-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.view-all-btn {
    grid-column: 1 / -1;
    padding: 12px 20px;
    background: #1e3275;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s ease;
}

.view-all-btn:hover {
    background: #2a4494;
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    flex-direction: column;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: white;
}

.lightbox-counter {
    font-size: 16px;
    font-weight: 500;
}

.lightbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
    position: relative;
}

.lightbox-image-container {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 48px;
    padding: 20px 15px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

/* Gallery responsive */
@media (max-width: 768px) {
    .gallery-preview {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .gallery-main {
        border-radius: 8px 8px 0 0;
        height: 250px;
    }

    .gallery-side {
        flex-direction: row;
        height: 100px;
    }

    .gallery-thumb:first-child {
        border-radius: 0 0 0 8px;
    }

    .gallery-thumb:last-child {
        border-radius: 0 0 8px 0;
    }

    .lightbox-content {
        padding: 0 10px;
    }

    .lightbox-nav {
        font-size: 32px;
        padding: 15px 10px;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }
}

/* Images styling */
.full-size-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 35px 0;
}

.full-size-image-container {
    width: 100%;
}

.square-image-container {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.square-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 6px;
    font-size: 12px;
}

/* Map styling */
.property-map,
#map {
    height: 600px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .property-stats {
        grid-template-columns: 1fr;
    }

    .improvement-grid,
    .property-details-extras ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .improvements-checklist {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .extras-box {
        margin: 25px 0;
    }

    .property-map,
    #map {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .improvement-grid,
    .property-details-extras ul {
        grid-template-columns: 1fr;
    }

    .property-header h1 {
        font-size: 18px;
    }

    .stat-label,
    .stat-value {
        font-size: 16px;
    }

    .improvements-heading {
        font-size: 18px;
    }

    .checklist-item {
        font-size: 14px;
    }

    .property-map,
    #map {
        height: 300px;
    }
}
