/**
 * GBP Categories Styling
 * Styles for displaying Google Business Profile categories
 */

/* Admin styling for GBP categories field */
.gbp-synced-field .acf-repeater.gbp-categories {
    margin-top: 10px;
}

.gbp-synced-field .acf-repeater.gbp-categories .acf-table {
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gbp-synced-field .acf-repeater.gbp-categories .acf-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
}

.gbp-synced-field .acf-repeater.gbp-categories .acf-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.gbp-synced-field .acf-repeater.gbp-categories .acf-table tr:last-child td {
    border-bottom: none;
}

/* Primary category highlighting in admin */
.gbp-synced-field .acf-repeater.gbp-categories tr.is-primary {
    background-color: #fff2cc;
}

.gbp-synced-field .acf-repeater.gbp-categories tr.is-primary td {
    border-color: #d4a017;
}

/* Frontend styling for GBP categories */
.gbp-categories-wrapper {
    margin: 10px 0;
}

.gbp-categories-wrapper .gbp-categories-label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.gbp-category {
    display: inline-block;
    background-color: #f0f0f0;
    color: #555;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
    border: 1px solid #ddd;
    transition: background-color 0.2s ease;
}

.gbp-category:hover {
    background-color: #e0e0e0;
}

.gbp-category.primary-category {
    background-color: #0073aa;
    color: #fff;
    border-color: #005a87;
    font-weight: 600;
}

.gbp-category.primary-category:hover {
    background-color: #005a87;
}

/* Specific category type styling */
.gbp-category[data-type="dentist"] {
    background-color: #e8f4fd;
    color: #0073aa;
    border-color: #0073aa;
}

.gbp-category[data-type="health"] {
    background-color: #f0f9ff;
    color: #0369a1;
    border-color: #0369a1;
}

.gbp-category[data-type="doctor"] {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #059669;
}

.gbp-category[data-type="establishment"] {
    background-color: #fef3c7;
    color: #d97706;
    border-color: #d97706;
}

/* Clinic listing styling */
.clinic-card .gbp-categories {
    margin-top: 8px;
}

.clinic-card .gbp-category {
    font-size: 11px;
    padding: 3px 6px;
}

/* Single clinic page styling */
.single-clinic .gbp-categories-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

.single-clinic .gbp-categories-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.single-clinic .gbp-category {
    font-size: 13px;
    padding: 6px 10px;
    margin: 3px 6px 3px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gbp-category {
        font-size: 11px;
        padding: 3px 6px;
        margin: 2px 3px 2px 0;
    }
    
    .single-clinic .gbp-category {
        font-size: 12px;
        padding: 5px 8px;
    }
}

/* WordPress admin list table styling */
.wp-admin .column-gbp_categories .gbp-category {
    font-size: 11px;
    padding: 2px 6px;
    margin: 1px 2px 1px 0;
    white-space: nowrap;
}

/* Filter dropdown styling (if implemented) */
.gbp-categories-filter {
    margin: 10px 0;
}

.gbp-categories-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.gbp-categories-filter label {
    font-weight: 600;
    margin-right: 8px;
    color: #333;
}
