﻿.devmap-lokale-grid {
    display: grid;
    grid-template-columns: repeat(var(--devmap-lokale-grid-desktop, 3), minmax(0, 1fr));
    gap: var(--devmap-section-gap, 18px);
}

.devmap-lokale-card {
    display: grid;
    gap: 16px;
    align-content: start;
    padding: var(--devmap-section-padding-desktop, 18px);
    border: 1px solid var(--devmap-panel-border);
    border-radius: var(--devmap-panel-radius);
    background: linear-gradient(180deg, var(--devmap-surface-primary) 0%, var(--devmap-surface-secondary) 100%);
    box-shadow: var(--devmap-section-shadow, var(--devmap-table-shadow));
    transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.devmap-lokale-card:hover,
.devmap-lokale-card:focus-within {
    background: linear-gradient(180deg, var(--devmap-surface-hover) 0%, var(--devmap-surface-secondary) 100%);
    box-shadow: var(--devmap-table-shadow, 0 18px 42px rgba(15, 23, 42, 0.12));
    transform: none;
}

.devmap-lokale-media {
    min-height: 220px;
    height: var(--devmap-lokale-media-height, 220px);
    border: 1px solid var(--devmap-panel-border);
    border-radius: var(--devmap-panel-radius);
    overflow: hidden;
    background: var(--devmap-surface-muted);
}

.devmap-lokale-media-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: var(--devmap-surface-primary);
}

.devmap-lokale-media-empty {
    min-height: 220px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 20px;
    color: var(--devmap-text-muted);
    text-align: center;
    font-size: 14px;
}

.devmap-lokale-media-empty a {
    color: var(--devmap-text-primary);
    font-weight: 700;
    text-decoration: none;
}

.devmap-lokale-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.devmap-lokale-head-copy {
    display: grid;
    gap: 0;
    min-width: 0;
    text-align: left;
}

.devmap-lokale-head-copy .devmap-lokale-title {
    margin: 0 !important;
    color: var(--devmap-text-primary);
    font-size: var(--devmap-card-title-size, 28px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.devmap-lokale-head-copy .devmap-lokale-subtitle {
    margin: 0 !important;
    color: var(--devmap-text-muted);
    font-size: var(--devmap-card-text-size, 13px);
    line-height: 1.5;
    text-align: left;
}

.devmap-lokale-price-block {
    flex: 0 0 auto;
    text-align: right;
}

.devmap-lokale-price {
    color: var(--devmap-text-primary);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.devmap-lokale-price-sub {
    margin-top: 4px;
    color: var(--devmap-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.devmap-lokale-price-note-value {
    margin: 6px 0 0;
    color: var(--devmap-text-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
}

.devmap-lokale-facts {
    display: grid;
    grid-template-columns: repeat(var(--devmap-lokale-fact-columns, 3), minmax(0, 1fr));
    gap: 10px;
}

.devmap-lokale-fact {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--devmap-panel-border);
    border-radius: var(--devmap-panel-radius);
    background: var(--devmap-surface-muted);
    text-align: center;
}

.devmap-lokale-fact-label {
    color: var(--devmap-text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.devmap-lokale-fact-value {
    color: var(--devmap-text-primary);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
}

.devmap-lokale-details {
    padding-top: 2px;
}

.devmap-lokale-details-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    justify-items: center;
}

.devmap-lokale-detail-item {
    display: inline-grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: baseline;
    justify-self: center;
    gap: 8px;
    min-width: 0;
}

.devmap-lokale-detail-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
}

.devmap-content-container-off .devmap-lokale-card,
.devmap-content-container-off .devmap-lokale-media,
.devmap-content-container-off .devmap-lokale-fact {
    border-color: transparent;
    box-shadow: none;
}

.devmap-lokale-detail-bullet {
    width: 18px;
    height: 1px;
    align-self: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--devmap-accent-strong) 45%, transparent);
}

.devmap-lokale-detail-label {
    color: var(--devmap-text-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.devmap-lokale-detail-value {
    color: var(--devmap-text-primary);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

.devmap-lokale-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.devmap-lokale-actions .devmap-plan-link {
    width: 100%;
}

.devmap-lokale-status-full {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    border: 1px solid var(--devmap-panel-border);
    border-radius: var(--devmap-panel-radius);
    background: var(--devmap-surface-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.devmap-lokale-status-full.devmap-status-dostepny,
.devmap-lokale-status-full.devmap-status-zarezerwowany,
.devmap-lokale-status-full.devmap-status-sprzedany {
    border-color: var(--devmap-panel-border);
}

.devmap-lokale-status-full.devmap-status-dostepny {
    color: #047857;
    background: color-mix(in srgb, #ecfdf5 82%, var(--devmap-surface-primary));
}

.devmap-lokale-status-full.devmap-status-zarezerwowany {
    color: #b45309;
    background: color-mix(in srgb, #fff7ed 82%, var(--devmap-surface-primary));
}

.devmap-lokale-status-full.devmap-status-sprzedany {
    color: #b91c1c;
    background: color-mix(in srgb, #fef2f2 82%, var(--devmap-surface-primary));
}

.devmap-lot-card-root {
    color: var(--devmap-text-primary);
    font-family: var(--devmap-table-font-family);
    width: 100%;
    max-width: min(100%, var(--devmap-section-max-width, 1240px));
    margin-inline: auto;
    --devmap-lot-types-header-color: var(--devmap-table-header-color, #5a6b80);
}

.devmap-use-template-container.devmap-lot-card-root {
    max-width: 100%;
}

.devmap-lot-card-page {
    display: grid;
    gap: 18px;
}

.devmap-lot-card-toolbar {
    display: flex;
    justify-content: flex-end;
}

.devmap-lot-card-sheet {
    display: grid;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--devmap-panel-border);
    border-radius: var(--devmap-panel-radius);
    overflow: hidden;
    background: linear-gradient(180deg, var(--devmap-surface-primary) 0%, var(--devmap-surface-secondary) 100%);
    box-shadow: var(--devmap-table-shadow, 0 24px 56px rgba(15, 23, 42, 0.10));
}

.devmap-lot-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--devmap-panel-border);
}

.devmap-lot-card-header-copy {
    display: grid;
    gap: 4px;
}

.devmap-lot-card-kicker {
    color: var(--devmap-text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.devmap-lot-card-title {
    margin: 0;
    color: var(--devmap-text-primary);
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.devmap-lot-card-subtitle,
.devmap-lot-card-project {
    color: var(--devmap-text-muted);
    font-size: 15px;
    line-height: 1.45;
}

.devmap-lot-card-header-meta {
    min-width: 220px;
    text-align: right;
    display: grid;
    gap: 6px;
}

.devmap-lot-card-price {
    color: var(--devmap-text-primary);
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.devmap-lot-card-price-sub,
.devmap-lot-card-lowest {
    color: var(--devmap-text-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.devmap-lot-card-plan-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(280px, 0.9fr);
    gap: 22px;
}

.devmap-lot-card-plan-bar.is-multi-level {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(260px, 0.8fr);
}

.devmap-lot-card-plan-bar-item {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 14px 18px;
    background: var(--devmap-accent-strong);
    color: var(--devmap-text-contrast);
}

.devmap-lot-card-plan-bar-title,
.devmap-lot-card-plan-bar-area {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.devmap-lot-card-main {
    display: grid;
    gap: 22px;
}

.devmap-lot-card-main-top {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(280px, 0.9fr);
    gap: 22px;
    align-items: stretch;
}

.devmap-lot-card-main-top.is-multi-level {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(260px, 0.8fr);
}

.devmap-lot-card-plan-stage,
.devmap-lot-card-secondary,
.devmap-lot-card-details {
    min-width: 0;
}

.devmap-lot-card-main-top > .devmap-lot-card-plan-stage,
.devmap-lot-card-main-top > .devmap-lot-card-secondary {
    height: 100%;
}

.devmap-lot-card-levels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.devmap-lot-card-level {
    display: grid;
    gap: 12px;
    min-width: 0;
    align-content: start;
}

.devmap-lot-card-plan-stage {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
    min-height: 100%;
    height: 100%;
}

.devmap-lot-card-plan-stage > .devmap-lot-card-plan-frame {
    height: 100%;
    min-height: 0;
}

.devmap-lot-card-secondary {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    min-width: 0;
}

.devmap-lot-card-secondary .devmap-lot-card-plan-frame {
    height: 100%;
    min-height: 0;
}

.devmap-lot-card-level-title {
    margin: 0;
    color: var(--devmap-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.devmap-lot-card-level-rooms {
    display: grid;
    gap: 8px;
}

.devmap-lot-card-plan-frame {
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border: 1px solid var(--devmap-panel-border);
    border-radius: calc(var(--devmap-panel-radius) - 2px);
    background: #fff;
}

.devmap-lot-card-main-top > .devmap-lot-card-plan-stage > .devmap-lot-card-plan-frame {
    min-height: 0;
}

.devmap-lot-card-plan-frame.is-compact {
    min-height: 220px;
}

.devmap-lot-card-level .devmap-lot-card-plan-frame {
    min-height: 320px;
    align-items: flex-start;
}

.devmap-lot-card-level .devmap-lot-card-plan-image {
    object-position: top center;
}

.devmap-lot-card-plan-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

.devmap-lot-card-plan-empty {
    color: var(--devmap-text-muted);
    font-size: 14px;
    text-align: center;
}

.devmap-lot-card-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.devmap-lot-card-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.devmap-lot-card-fact {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--devmap-panel-border);
    border-radius: calc(var(--devmap-panel-radius) - 4px);
    background: var(--devmap-surface-muted);
}

.devmap-lot-card-fact-label,
.devmap-lot-card-section-title {
    color: var(--devmap-text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.devmap-lot-card-fact-value {
    color: var(--devmap-text-primary);
    font-size: 16px;
    font-weight: 800;
}

.devmap-lot-card-section-title {
    margin: 0 0 10px;
}

.devmap-lot-card-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

.devmap-lot-card-detail-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid color-mix(in srgb, var(--devmap-panel-border) 70%, transparent);
}

.devmap-lot-card-detail-label {
    color: var(--devmap-text-muted);
    font-size: 14px;
    font-weight: 600;
}

.devmap-lot-card-detail-value {
    color: var(--devmap-text-primary);
    font-size: 14px;
    font-weight: 800;
    text-align: right;
    flex-shrink: 0;
}

.devmap-lot-card-note {
    padding: 14px 16px;
    border: 1px solid var(--devmap-panel-border);
    background: var(--devmap-surface-muted);
    color: var(--devmap-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.devmap-lot-card-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--devmap-panel-border);
}

.devmap-lot-card-contact-item {
    display: grid;
    gap: 4px;
}

.devmap-lot-card-contact-label {
    color: var(--devmap-text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.devmap-lot-card-contact-value {
    color: var(--devmap-text-primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}


@media (max-width: 720px) {

    .devmap-lokale-head-copy .devmap-lokale-title {
        font-size: var(--devmap-mobile-card-title-size, var(--devmap-card-title-size, 20px));
    }

    .devmap-lokale-head-copy .devmap-lokale-subtitle {
        font-size: var(--devmap-mobile-card-text-size, var(--devmap-card-text-size, 13px));
    }

    .devmap-lokale-grid {
        grid-template-columns: repeat(var(--devmap-lokale-grid-mobile, 1), minmax(0, 1fr));
    }

    .devmap-lokale-card {
        padding: var(--devmap-section-padding-mobile, 16px);
        gap: 14px;
    }

    .devmap-lot-card-sheet {
        padding: 18px;
        gap: 16px;
    }

    .devmap-lot-card-header {
        display: grid;
        gap: 12px;
    }

    .devmap-lot-card-header-meta {
        min-width: 0;
        text-align: left;
    }

    .devmap-lot-card-plan-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .devmap-lot-card-main-top,
    .devmap-lot-card-main-top.is-multi-level {
        grid-template-columns: 1fr;
    }

    .devmap-lot-card-levels {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .devmap-lot-card-plan-frame {
        min-height: 320px;
    }

    .devmap-lot-card-plan-frame.is-compact {
        min-height: 180px;
    }

    .devmap-lot-card-facts {
        grid-template-columns: 1fr 1fr;
    }

    .devmap-lot-card-detail-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .devmap-lokale-media,
    .devmap-lokale-media-empty {
        min-height: 180px;
        height: var(--devmap-lokale-media-height, 180px);
    }

    .devmap-lokale-head {
        display: grid;
        gap: 8px;
    }

    .devmap-lokale-price-block {
        text-align: center;
    }

    .devmap-lokale-facts {
        grid-template-columns: 1fr;
    }

    .devmap-lokale-details-list {
        grid-template-columns: 1fr;
    }

    .devmap-lokale-actions {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    body.devmap-lot-card-print-mode * {
        visibility: hidden !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-root,
    body.devmap-lot-card-print-mode .devmap-lot-card-root * {
        visibility: visible !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-root {
        position: static;
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
        background: #fff;
    }

    body.devmap-lot-card-print-mode {
        background: #fff !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-toolbar {
        display: none !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-page {
        gap: 0;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-sheet {
        box-shadow: none !important;
        border: 1px solid #b8c4b8;
        min-height: 0;
        height: 185mm;
        padding: 5mm;
        gap: 2.5mm;
        background: #fff !important;
        break-inside: avoid;
        overflow: hidden;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: start;
        gap: 3mm;
        padding-bottom: 2mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-header-meta {
        min-width: 0;
        text-align: right !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-main {
        display: grid !important;
        gap: 2.5mm;
        min-height: 0;
        overflow: hidden;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-main-top {
        display: grid !important;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(62mm, 0.8fr) !important;
        gap: 2.5mm;
        align-items: stretch;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-main-top.is-multi-level {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(60mm, 0.8fr) !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-levels {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 2mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-level {
        gap: 1.5mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-plan-stage {
        gap: 2mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-plan-bar {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(62mm, 0.8fr) !important;
        gap: 2.5mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-plan-bar.is-multi-level {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(60mm, 0.8fr) !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-plan-bar-item {
        background: #172033 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-secondary {
        grid-template-rows: auto minmax(0, 1fr);
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-level .devmap-lot-card-plan-frame {
        height: 52mm !important;
        max-height: 52mm !important;
        min-height: 0 !important;
        align-items: flex-start !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-plan-frame {
        min-height: 0 !important;
        height: 108mm !important;
        max-height: 108mm !important;
        padding: 1.5mm;
        background: #fff !important;
        overflow: hidden;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-plan-frame.is-compact {
        min-height: 0 !important;
        height: 34mm !important;
        max-height: 34mm !important;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-side {
        gap: 2mm;
        min-height: 0;
        overflow: hidden;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.5mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-fact {
        padding: 1.5mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-section-title {
        margin-bottom: 1mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-detail-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1mm 2mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-detail-row {
        padding-bottom: 0.6mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-footer {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 2mm;
        padding-top: 2mm;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-plan-image {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-title {
        font-size: 20pt;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-price {
        font-size: 16pt;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-kicker,
    body.devmap-lot-card-print-mode .devmap-lot-card-plan-bar-title,
    body.devmap-lot-card-print-mode .devmap-lot-card-plan-bar-area,
    body.devmap-lot-card-print-mode .devmap-lot-card-fact-label,
    body.devmap-lot-card-print-mode .devmap-lot-card-contact-label,
    body.devmap-lot-card-print-mode .devmap-lot-card-section-title {
        font-size: 8.5pt;
    }

    body.devmap-lot-card-print-mode .devmap-lot-card-subtitle,
    body.devmap-lot-card-print-mode .devmap-lot-card-project,
    body.devmap-lot-card-print-mode .devmap-lot-card-price-sub,
    body.devmap-lot-card-print-mode .devmap-lot-card-lowest,
    body.devmap-lot-card-print-mode .devmap-lot-card-detail-label,
    body.devmap-lot-card-print-mode .devmap-lot-card-detail-value,
    body.devmap-lot-card-print-mode .devmap-lot-card-contact-value {
        font-size: 8.5pt;
    }
}
