/* === CSS VARIABLES (set from PHP inline) === */ 

:root { --lmp-btn-bg: #1a73e8;
	--lmp-btn-color: #ffffff; }

/* === Unique Wrapper === */
.lmp-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f7f8fa;
    padding: 16px;
    font-family: Arial, sans-serif;
}

/* === Top Search Bar === */
.lmp-search-bar {
    display: flex;
    flex-wrap: wrap; /* IMPORTANT for mobile */
    gap: 12px;
    margin-bottom: 16px;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    align-items: flex-end;
}

.lmp-search-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 140px;
}

.lmp-search-group label {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
    white-space: nowrap;
}

.lmp-search-group input,
.lmp-search-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

/* Range input polish */
.lmp-search-group input[type="range"] {
    padding: 0;
    height: 36px;
}

/* === Buttons === */
.lmp-search-btn {
    padding: 10px 16px;
    background: var(--lmp-btn-bg);
    color: var(--lmp-btn-color) !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Hover for search + pagination buttons */
.lmp-search-btn:hover {
    opacity: .9;
    background: var(--lmp-btn-bg);
    transform: translateY(-1px);
}

.lmp-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background: var(--lmp-btn-bg);
    color: var(--lmp-btn-color) !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.lmp-btn:hover {
    opacity: .9;
    background: var(--lmp-btn-bg);
    transform: translateY(-1px);
}

/* === Layout === */
.lmp-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lmp-map {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.lmp-sidebar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
    max-height: 500px;
}

/* === List Items === */
.lmp-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.lmp-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.lmp-item strong {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
    color: #111;
}

.lmp-item a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
}

.lmp-item a:hover {
    text-decoration: underline;
}

/* === States === */
.lmp-no-result {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    font-style: italic;
}

.lmp-item-nearest {
    border: 2px solid #ff5733;
    box-shadow: 0 4px 12px rgba(255,87,51,0.2);
    background: #fffbe6;
}

/* === Pagination Buttons === */
.lmp-pager button {
    padding: 8px 14px;
    background: var(--lmp-btn-bg);
    color: var(--lmp-btn-color) !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 2px;
    font-size: 14px;
    font-weight: 500;
    transition: opacity .15s ease, transform .15s ease;
}

.lmp-pager button:hover {
    opacity: .9;
    background: var(--lmp-btn-bg);
    transform: translateY(-1px);
}

.lmp-pager button:disabled {
    opacity: .6;
    cursor: default;
    transform: none;
}

/* === Mobile (phones) === */
@media (max-width: 767px) {

    .lmp-search-group {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .lmp-search-btn {
        width: 100%;
        flex: 1 1 100%;
    }
}

/* === Tablet === */
@media (min-width: 768px) and (max-width: 1024px) {

    .lmp-search-group {
        flex: 1 1 calc(50% - 12px);
        min-width: 200px;
    }

    .lmp-search-btn {
        flex: 1 1 100%;
    }
}

/* === Desktop === */
@media (min-width: 768px) {
    .lmp-bottom {
        flex-direction: row;
        gap: 16px;
    }

    .lmp-sidebar {
        width: 38%;
        max-height: 600px;
    }

    .lmp-map {
        width: 62%;
        height: 600px;
    }
}
