/* Layout */
.main-content {
    background: var(--surface-page, #f5f6f8);
}

.navbar-collapse--bordered {
    border-left: 1px solid rgba(0, 0, 0, 0.12);
}

.card:not(.card-modern) {
    padding: 1.25rem 1.5rem;
    border-radius: var(--card-radius, 0.5rem);
    box-shadow: var(--card-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
}

.center{
    text-align: center;
}

.footer {
    background-color: #fff;
    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.04);
    box-shadow: 0 2px 4px rgba(0,0,0,.04);
    height: 55px;
    position: absolute;
    width: 100%;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-brand {
    font-weight: 600;
    color: var(--brand-primary, #0e7490);
    margin-right: 0.35em;
}

@media (max-width: 767px) {
    .footer {
        height: auto;
        min-height: 48px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}

main{
    padding: 40px 0 100px 0 !important;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1280px !important;
    }
}

.home-card {
    padding: 3rem 2rem;
    color: #111827;
    border-radius: var(--card-radius, 0.5rem);
    box-shadow: var(--card-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
    background: var(--surface-card, #fff);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.home-card:hover {
    box-shadow: var(--card-shadow-hover, 0 4px 12px rgba(0, 0, 0, 0.1));
    color: var(--brand-primary, #0e7490);
}

.home-card:hover i {
    color: var(--brand-primary, #0e7490) !important;
}

.home-main-card{
    position: relative;
}

.home-main-card i{
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    text-align: center;
    top: 70px;
    font-size: 30px;
    color: black;
}

#app{
    position: relative;
    min-height: 100vh;
}

.map-embed {
    width: 100%;
    min-height: 200px;
}

#mapAll,
#map {
    height: 400px;
    margin: 0;
}

.table-panel .card-body.p-0 .map-embed,
.page-list .map-embed {
    border-radius: 0;
}

.table-panel .card-body.p-0 + .card-body {
    border-top: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
}

/* Search page */
.search-page .card-modern .card-body {
    padding: 1rem 1.25rem;
}

.search-control-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.25rem;
}

.search-map-label {
    min-height: 1.25em;
}

.search-radius-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.search-radius-input {
    width: 8.5rem;
    max-width: 100%;
}

.search-radius-input::-webkit-outer-spin-button,
.search-radius-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.search-radius-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.search-radius-unit {
    font-size: 0.8125rem;
    color: var(--muted-text, #6c757d);
}

.search-radius-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.search-radius-chip {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--brand-primary, #0e7490);
    background: transparent;
    border: 1px solid rgba(14, 116, 144, 0.35);
    border-radius: 0.35rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.search-radius-chip:hover {
    background: var(--brand-subtle, rgba(14, 116, 144, 0.06));
    border-color: var(--brand-primary, #0e7490);
}

.search-radius-chip:focus-visible {
    outline: 2px solid var(--brand-primary, #0e7490);
    outline-offset: 2px;
}

.search-radius-helper {
    font-size: 0.8125rem;
}

.search-map-card .card-body.p-0 {
    padding: 0 !important;
}

.search-map-container,
#mapSearch {
    height: 560px;
    width: 100%;
    border-radius: 0 0 0.5rem 0.5rem;
}

.search-table-card .card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.search-table-wrapper {
    margin: 0;
}

.search-table-wrapper .dataTables_wrapper {
    font-size: 0.9rem;
}

.search-table-wrapper thead th {
    background: #f1f3f5;
    font-weight: 600;
    font-size: 0.8125rem;
}

.search-table-card--porez { border-left: 3px solid #e8b923; }
.search-table-card--rgz { border-left: 3px solid #5a9fd4; }

#mapSingle {
    height: 200px;
    margin: 0;
}

.map-single{
    display: none;
}

.single .card-body .form-group {
    margin-bottom: 0.75rem;
}

.single .card-body .form-group label {
    font-weight: 500;
    color: var(--field-label-color, #374151);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    display: block;
}

input#lat,input#lon{
    pointer-events: none;
}

table.dataTable tbody th,
table.dataTable tbody td {
    font-size: 0.875rem;
}

table.dataTable thead th,
table.dataTable tfoot th {
    font-size: 0.8125rem;
}

.table-panel .dataTables_wrapper {
    font-size: 0.9rem;
}

b.mapTable{
    width: 120px !important;
    display: inline-block;
    margin: 2px 0;
}

.link-button,
a.link-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: var(--card-radius, 0.5rem);
    background: var(--accent, #2563eb) !important;
    border: 1px solid var(--accent, #2563eb);
    color: #fff !important;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.link-button:hover,
a.link-button:hover {
    background: var(--accent-hover, #1d4ed8) !important;
    border-color: var(--accent-hover, #1d4ed8);
    color: #fff !important;
    text-decoration: none;
}

.navbar-brand.brand-name {
    font-size: 1.25rem;
}

.small-nav li {
    margin: 0 17px;
}

.small-nav li a {
    color: rgba(0, 0, 0, 0.61);
}

.small-nav li a:hover,
.small-nav li a.active {
    color: var(--brand-primary, #0e7490);
}

.small-nav li a.active {
    font-weight: 600;
}

.navbar-nav.ml-auto .nav-link {
    color: rgba(0, 0, 0, 0.7);
}

.navbar-nav.ml-auto .nav-link:hover {
    color: var(--brand-primary, #0e7490);
}

/* ========== Responsive: Prevent horizontal overflow ========== */
@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    #app {
        overflow-x: hidden;
    }
}

/* ========== Responsive: Page container & main ========== */
@media (max-width: 991px) {
    .main-content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (max-width: 767px) {
    main.main-content {
        padding: 1.25rem 0.75rem 5rem 0.75rem !important;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        max-width: 100%;
    }

    .container .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .container .row [class^="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ========== Responsive: Navbar ========== */
@media (max-width: 767px) {
    .navbar-collapse--bordered {
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .navbar .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .small-nav {
        margin-bottom: 0.5rem;
    }

    .small-nav li {
        margin: 0 0.5rem 0 0;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0.25rem;
    }

    .navbar-nav.ml-auto .nav-item {
        margin-top: 0.25rem;
    }
}

/* ========== Responsive: Maps ========== */
@media (max-width: 991px) {
    #mapAll,
    #map {
        height: 320px;
    }

    .search-map-container,
    #mapSearch {
        height: 420px;
    }

    #mapSingle {
        height: 180px;
    }
}

@media (max-width: 767px) {
    .map-embed {
        min-height: 180px;
    }

    #mapAll,
    #map {
        height: 280px;
    }

    .search-map-container,
    #mapSearch {
        height: 320px;
    }

    #mapSingle {
        height: 200px;
    }
}

/* ========== Responsive: DataTables ========== */
@media (max-width: 767px) {
    .search-table-wrapper,
    .table-panel .card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .search-table-wrapper .dataTable,
    .table-panel .dataTable {
        min-width: 600px;
    }

    .search-table-wrapper .dataTables_wrapper,
    .table-panel .dataTables_wrapper {
        font-size: 0.8125rem;
    }
}

/* ========== Responsive: Home / group cards ========== */
@media (max-width: 991px) {
    .page-home .home-main-card {
        margin-bottom: 1rem;
    }

    .home-card {
        padding: 2rem 1.5rem;
    }

    .home-main-card i {
        top: 50px;
        font-size: 26px;
    }
}

@media (max-width: 767px) {
    .page-home .row {
        flex-direction: column;
        align-items: stretch;
    }

    .page-home .home-main-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0.75rem;
    }

    .home-card {
        padding: 1.75rem 1rem;
    }

    .home-main-card i {
        top: 40px;
        font-size: 22px;
    }
}

/* ========== Responsive: Search page ========== */
@media (max-width: 767px) {
    .search-page .search-controls-card .card-body {
        padding: 0.85rem 1rem;
    }

    .search-page .search-controls-card .row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-page .search-controls-card .col-auto {
        margin-bottom: 0.5rem;
    }

    .search-page .search-controls-card .form-control {
        width: 100% !important;
        max-width: 100%;
    }

    .search-page .search-radius-wrap {
        width: 100%;
    }

    .search-page .search-radius-input {
        width: 100%;
    }

    .search-page .search-map-label {
        margin-bottom: 0.5rem;
    }
}