:root {
    --mopp-gap: clamp(1rem, 0.9rem + 0.2vw, 1.25rem);
    --mopp-radius: clamp(0.5rem, 0.65rem + 0.4vw, 1.7rem);
    --mopp-border-color: #e5e7eb;
    --mopp-hover-bg: #fafafa;
}

.mopp-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--mopp-gap);
}

.mopp-controls {
    display: flex;
    gap: var(--mopp-gap);
    align-items: stretch;
    margin-bottom: var(--mopp-gap);
    flex-wrap: wrap;
}

.mopp-search-bar {
    flex: 1;
    min-width: clamp(250px, 50vw, 300px);
    position: relative;
}

.mopp-search-bar img {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.mopp-search-bar input {
    width: 100%;
    padding: clamp(0.5rem, 0.8rem + 0.1vw, .25rem) clamp(1rem, 0.9rem + 0.2vw, 1.25rem) clamp(0.5rem, 0.8rem + 0.1vw, .25rem) clamp(2.5rem, 2.4rem + 0.35vw, 3.125rem);
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
    border: 2px solid var(--mopp-border-color);
    border-radius: var(--mopp-radius);
    background: white;
    transition: border-color 0.2s;
}

.mopp-search-bar input::placeholder {
    color: #d1d5db;
}

.mopp-search-bar input:focus {
    outline: none;
    border-color: #9ca3af;
}

.mopp-filter-dropdown {
    position: relative;
}

.mopp-filter-btn {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 0.4rem + 0.2vw, 0.625rem);
    padding: clamp(0.875rem, 0.8rem + 0.25vw, 1rem) clamp(1.25rem, 1.15rem + 0.2vw, 1.5rem);
    background: white;
    border: 2px solid var(--mopp-border-color);
    border-radius: var(--mopp-radius);
    cursor: pointer;
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
    font-weight: 500;
    color: var(--black-green);
    transition: all 0.2s;
    white-space: nowrap;
}

.mopp-filter-btn:hover {
    border-color: #9ca3af;
    background: var(--mopp-hover-bg);
}

.mopp-filter-btn.active {
    border-color: var(--sim-red);
}

.mopp-filter-btn img {
    transition: transform 0.2s;
}

.mopp-filter-btn.active img {
    transform: rotate(180deg);
}

.mopp-filter-count {
    background: var(--sim-red);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.mopp-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 2px solid var(--mopp-border-color);
    border-radius: var(--mopp-radius);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    padding: clamp(.5rem, .5rem + 0.2vw, .75rem);
    z-index: 1000;
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.mopp-filter-panel.open {
    display: block;
}

.mopp-filter-panel::-webkit-scrollbar {
    width: 6px;
}

.mopp-filter-panel::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.mopp-filter-list {
    display: flex;
    flex-direction: column;
    gap: clamp(0.25rem, 0.25rem + 0.2vw, 0.325rem);
}

.mopp-filter-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.15s;
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 0.9375rem);
    color: #374151;
    line-height: 1.1em;
}

.mopp-filter-list label:hover {
    background: #f3f4f6;
}

.mopp-filter-list input[type="checkbox"],
.mopp-filter-list input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--sim-red);
}

.mopp-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 0.4rem + 0.2vw, 0.625rem);
    margin-bottom: var(--mopp-gap);
}

.mopp-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--accent-green-100);
    color: var(--black-green);
    border-radius: 20px;
    font-size: clamp(0.8125rem, 0.74rem + 0.25vw, 0.875rem);
    font-weight: 600;
}

.mopp-filter-pill button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}

.mopp-filter-pill button:hover {
    background: rgba(0,0,0,0.1);
}

.mopp-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--mopp-gap);
    flex-wrap: wrap;
    gap: var(--mopp-gap);
}

.mopp-results-info {
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 0.9375rem);
    color: #6b7280;
    font-weight: 500;
}

.mopp-results-controls {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 0.9rem + 0.2vw, 1.5rem);
}

.mopp-sort-control,
.mopp-per-page {
    display: flex;
    align-items: center;
    gap: clamp(0.375rem, 0.3rem + 0.2vw, 0.5rem);
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 0.9375rem);
    color: #6b7280;
    text-wrap: nowrap;
}

.mopp-sort-control select,
.mopp-per-page select {
    border: none;
    background: none;
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    color: var(--black-green);
}

.mopp-sort-control select:focus,
.mopp-per-page select:focus {
    outline: none;
}

.mopp-cards {
    display: flex;
    flex-direction: column;
    gap: var(--mopp-gap);
    margin-bottom: clamp(1.5rem, 1.4rem + 0.3vw, 1.875rem);
}

.mopp-card {
    display: grid;
    grid-template-columns: 1fr clamp(320px, 30vw, 380px);
    gap: clamp(1.5rem, 1.4rem + 0.3vw, 1.875rem);
    background: white;
    border-radius: var(--mopp-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: clamp(1.5rem, 1.4rem + 0.3vw, 1.875rem);
    transition: transform 0.3s, box-shadow 0.3s;
}

.mopp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.mopp-card-content h2 {
    font-size: clamp(1.5rem, 1.35rem + 1.6vw, 2rem);
    font-weight: 700;
    color: var(--black-green);
    margin: 0 0 10px 0;
    line-height: 1;
    text-wrap: balance;
}

.mopp-card-location,
.mopp-card-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sim-red);
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
    font-weight: 600;
    margin-bottom: 5px;
}

.mopp-card-description {
    color: #4a5568;
    font-size: clamp(0.875rem, 0.8rem + 0.25vw, 1rem);
    line-height: 1.6;
    margin-bottom: var(--mopp-gap);
}

.mopp-card-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mopp-share {
    color: var(--black-green);
    background: var(--accent-green-100);
}

.mopp-card-map {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: clamp(240px, 20vw, 280px);
}

.mopp-card-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mopp-card-region-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--sim-red);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: clamp(0.8125rem, 0.74rem + 0.25vw, 0.875rem);
    font-weight: 600;
}

.mopp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: clamp(1.5rem, 1.4rem + 0.3vw, 1.875rem) 0;
}

.mopp-pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: clamp(0.8125rem, 0.74rem + 0.25vw, 0.875rem);
}

.mopp-pagination button:hover:not(:disabled) {
    border-color: var(--sim-red);
}

.mopp-pagination button.active {
    background: var(--sim-red);
    color: white;
    border-color: var(--sim-red);
}

.mopp-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mopp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    overflow-y: auto;
}

.mopp-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--mopp-gap);
}

.mopp-modal-content {
    background: white;
    border-radius: var(--mopp-radius);
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.mopp-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.mopp-modal-close:hover {
    background: #f3f4f6;
}

.mopp-modal-inner {
    padding: clamp(1.875rem, 1.75rem + 0.3vw, 2.5rem);
}

.mopp-modal-grid {
    display: grid;
    grid-template-columns: 1fr clamp(320px, 30vw, 380px);
    gap: clamp(1.875rem, 1.75rem + 0.3vw, 2.5rem);
}

.mopp-modal-map {
    border-radius: 8px;
    overflow: hidden;
    height: 300px;
    margin-bottom: var(--mopp-gap);
}

.mopp-modal-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mopp-modal-form {
    background: #f8f9fa;
    padding: clamp(1.5rem, 1.4rem + 0.3vw, 1.875rem);
    border-radius: 8px;
}

.mopp-modal-form h3 {
    font-size: clamp(1.25rem, 1.15rem + 0.6vw, 1.5rem);
    margin: 0 0 10px 0;
}

.mopp-modal-form .subtitle {
    color: var(--sim-red);
    font-size: clamp(1rem, 0.9rem + 0.35vw, 1.125rem);
    font-weight: 600;
    margin-bottom: var(--mopp-gap);
}

.mopp-form-group {
    margin-bottom: 15px;
}

.mopp-form-group input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    background: white;
    font-size: clamp(0.8125rem, 0.74rem + 0.25vw, 0.875rem);
}

.mopp-form-group input:focus {
    outline: none;
    border-color: var(--sim-red);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .mopp-controls {
        flex-direction: column;
        gap: clamp(0.625rem, 0.5rem + 0.2vw, 0.75rem);
    }
    
    .mopp-search-bar {
        min-width: 100%;
        order: -1; /* Keep search at top */
    }
    
    /* Compact filter buttons on mobile */
    .mopp-filter-dropdown {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: calc(50% - 0.5rem);
    }
    
    .mopp-filter-btn {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .mopp-filter-btn span {
        font-size: 0.875rem;
    }
    
    /* Full width filter panels on mobile */
    .mopp-filter-panel {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        min-width: 100%;
        max-height: 70vh;
        border-radius: var(--mopp-radius) var(--mopp-radius) 0 0;
        transform: translateY(100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .mopp-filter-panel.open {
        transform: translateY(0);
        box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    }
    
    /* Active filter pills - stack nicely */
    .mopp-active-filters {
        gap: 0.5rem;
    }
    
    .mopp-filter-pill {
        font-size: 0.8125rem;
        padding: 6px 12px;
    }
    
    /* Results bar stacks on mobile */
    .mopp-results-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .mopp-results-controls {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .mopp-sort-control,
    .mopp-per-page {
        font-size: 0.875rem;
    }

    /* Cards stack on mobile */
    .mopp-card {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .mopp-card-map {
        order: -1; /* Show map first on mobile */
        height: 220px;
    }
    
    .mopp-card-buttons {
        flex-direction: column;
    }
    
    .mopp-card-buttons button {
        width: 100%;
        justify-content: center;
    }

    /* Modal adjustments */
    .mopp-modal-grid {
        grid-template-columns: 1fr;
    }
    
    .mopp-modal-inner {
        padding: 1.5rem 1rem;
    }
}

/* Tablet range - 2 columns for filters */
@media (min-width: 769px) and (max-width: 1024px) {
    .mopp-filter-dropdown {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: calc(50% - 0.5rem);
    }
    
    .mopp-search-bar {
        flex: 1 1 100%;
    }
}

/* Loading and empty states */
.mopp-loading {
    text-align: center;
    padding: clamp(1.875rem, 1.75rem + 0.3vw, 2.5rem);
    font-size: clamp(1rem, 0.9rem + 0.35vw, 1.125rem);
    color: #666;
}

.mopp-no-results {
    text-align: center;
    padding: clamp(2.5rem, 2.25rem + 0.5vw, 3.75rem) var(--mopp-gap);
    font-size: clamp(1rem, 0.9rem + 0.35vw, 1.125rem);
    color: #666;
}

/* Admin Styles */
.mopp-admin-controls {
    margin: var(--mopp-gap) 0;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#mopp-admin-search {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
}

.mopp-admin-row.hidden-row {
    display: none;
}

#mopp-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

.mopp-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

#mopp-edit-modal .mopp-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: clamp(1.5rem, 1.4rem + 0.3vw, 1.875rem);
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.mopp-map-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.mopp-map-status.ok {
    background: #d4edda;
    color: #155724;
}

.mopp-map-status.error {
    background: #f8d7da;
    color: #721c24;
}

#mopp-image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    border: 1px solid #ddd;
}