/**
 * Public Frontend Styles
 *
 * @package Planet_CR_Locations
 */

/* Map Container */
.pcr-map-container {
    margin: 20px 0;
    width: 100%;
}

.pcr-map {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Info Window Styles */
.pcr-info-window {
    max-width: 300px;
    padding: 15px;
}

.pcr-info-window h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.pcr-info-window p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.pcr-info-window a {
    color: #0073aa;
    text-decoration: none;
}

.pcr-info-window a:hover {
    text-decoration: underline;
}

.pcr-info-categories {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.pcr-info-category {
    display: inline-block;
    background: #f0f0f1;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 3px;
    font-size: 12px;
}

/* Table Container */
.pcr-table-container {
    margin: 20px 0;
    width: 100%;
}

.pcr-table-controls {
    margin-bottom: 20px;
}

.pcr-search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.pcr-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pcr-search-button {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.pcr-search-button:hover {
    background: #005a87;
}

/* Table Styles */
.pcr-table-responsive {
    overflow-x: auto;
}

.pcr-locations-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.pcr-locations-table thead {
    background: #f8f9fa;
}

.pcr-locations-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.pcr-locations-table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    color: #666;
}

.pcr-locations-table tbody tr:hover {
    background: #f8f9fa;
}

.pcr-locations-table tbody tr:last-child td {
    border-bottom: none;
}

.pcr-locations-table a {
    color: #0073aa;
    text-decoration: none;
}

.pcr-locations-table a:hover {
    text-decoration: underline;
}

/* Pagination */
.pcr-pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pcr-pagination a {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.pcr-pagination a:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}

.pcr-pagination-current {
    background: #0073aa !important;
    color: white !important;
    border-color: #0073aa !important;
}

/* No Locations Message */
.pcr-no-locations {
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
}
/* Street View Styles */
.pcr-streetview-container {
    margin: 10px 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pcr-streetview-image {
    width: 100%;
    height: auto;
    display: block;
    border: none;
}

.pcr-streetview-loading {
    padding: 20px;
    text-align: center;
    background: #f5f5f5;
    color: #666;
    font-style: italic;
}

.pcr-streetview-unavailable {
    padding: 20px;
    text-align: center;
    background: #f5f5f5;
    color: #999;
    font-style: italic;
    border-radius: 6px;
}

.pcr-streetview-panorama {
    width: 280px;
    height: 150px;
    margin: 10px 0;
    border-radius: 6px;
    overflow: hidden;
}
/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .pcr-search-form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .pcr-search-button {
        width: 100%;
    }
    
    /* Stack table on mobile */
    .pcr-locations-table {
        border: 0;
    }
    
    .pcr-locations-table thead {
        display: none;
    }
    
    .pcr-locations-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .pcr-locations-table td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #dee2e6;
    }
    
    .pcr-locations-table td:last-child {
        border-bottom: none;
    }
    
    .pcr-locations-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #333;
    }
    
    @media (prefers-color-scheme: dark) {
        .pcr-locations-table tr {
            border-color: #444;
        }
        
        .pcr-locations-table td::before {
            color: #f0f0f1;
        }
    }
}

@media screen and (max-width: 480px) {
    .pcr-map {
        border-radius: 4px;
    }
    
    .pcr-pagination {
        gap: 3px;
    }
    
    .pcr-pagination a {
        padding: 6px 10px;
        font-size: 14px;
    }
}