/**
 * GoGreen Directory AI — Public Styles
 * Inspired by modern directory UIs with card-based layouts
 */

/* === Variables === */
:root {
    --ggd-primary: #4285F4;
    --ggd-primary-dark: #3367D6;
    --ggd-success: #34A853;
    --ggd-warning: #FBBC05;
    --ggd-danger: #EA4335;
    --ggd-purple: #7B61FF;
    --ggd-text: #333;
    --ggd-text-light: #666;
    --ggd-text-muted: #999;
    --ggd-border: #e0e0e0;
    --ggd-bg: #f8f9fa;
    --ggd-white: #fff;
    --ggd-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --ggd-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --ggd-radius: 8px;
    --ggd-radius-sm: 4px;
    --ggd-transition: 0.2s ease;
}

/* === Directory Wrapper === */
.ggd-directory-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* === Logo === */
.ggd-logo-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.ggd-logo-wrapper img.ggd-logo {
    max-width: 50% !important;
    width: 50%;
    height: auto;
}

@media (max-width: 768px) {
    .ggd-logo-wrapper img.ggd-logo {
        max-width: 70% !important;
        width: 70%;
    }
}

/* === Submit Listing Form === */
.ggd-submit-form-wrap {
    max-width: 740px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ggd-submit-form-wrap > .ggd-notice {
    padding: 20px;
    border-radius: var(--ggd-radius);
    font-size: 16px;
    text-align: center;
}

.ggd-submit-form {
    background: var(--ggd-white);
    border: 1px solid var(--ggd-border);
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    position: relative;
}

.ggd-submit-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2e7d32, #4CAF50, #81C784);
    border-radius: 12px 12px 0 0;
}

.ggd-submit-form label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ggd-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.ggd-submit-form input[type="text"],
.ggd-submit-form input[type="tel"],
.ggd-submit-form input[type="email"],
.ggd-submit-form input[type="url"],
.ggd-submit-form textarea,
.ggd-submit-form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fafafa;
    transition: all 0.2s ease;
    color: var(--ggd-text);
}

.ggd-submit-form input:hover,
.ggd-submit-form textarea:hover,
.ggd-submit-form select:hover {
    border-color: #ccc;
    background: #fff;
}

.ggd-submit-form input:focus,
.ggd-submit-form textarea:focus,
.ggd-submit-form select:focus {
    border-color: #4CAF50;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.ggd-submit-form textarea {
    resize: vertical;
    min-height: 100px;
}

.ggd-submit-form p {
    margin: 0 0 4px;
}

.ggd-submit-form .ggd-search-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 12px;
    background: linear-gradient(135deg, #2e7d32 0%, #4CAF50 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}

.ggd-submit-form .ggd-search-btn:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #388E3C 100%);
    box-shadow: 0 4px 12px rgba(46,125,50,0.4);
    transform: translateY(-1px);
}

.ggd-submit-form div[style*="flex"] {
    margin-bottom: 4px;
    gap: 12px !important;
}

/* Category checkboxes — uses WordPress wp_terms_checklist output */
.ggd-category-checkboxes {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8faf8;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* Style WordPress's checklist UL output */
.ggd-cat-checklist,
.ggd-cat-checklist ul.children,
.ggd-category-checkboxes ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ggd-cat-checklist > li,
.ggd-category-checkboxes > ul > li {
    margin-bottom: 2px !important;
}

.ggd-cat-checklist li label,
.ggd-category-checkboxes li label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 0 !important;
}

/* Top-level parents — bold */
.ggd-cat-checklist > li > label,
.ggd-category-checkboxes > ul > li > label {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #333;
}

.ggd-cat-checklist li label:hover,
.ggd-category-checkboxes li label:hover {
    background: #e8f5e9;
}

/* Checkboxes */
.ggd-cat-checklist input[type="checkbox"],
.ggd-category-checkboxes input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    accent-color: #4CAF50;
    flex-shrink: 0;
}

/* Children — indented with border */
.ggd-cat-checklist ul.children,
.ggd-category-checkboxes ul ul {
    padding-left: 20px !important;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
    border-left: 2px solid #e0e0e0;
    margin-left: 8px !important;
}

.ggd-cat-checklist ul.children li label,
.ggd-category-checkboxes ul ul li label {
    font-size: 12px !important;
    color: #555;
}

/* Two columns on wide screens */
@media (min-width: 600px) {
    .ggd-cat-checklist,
    .ggd-category-checkboxes > ul {
        columns: 2;
        column-gap: 20px;
    }
    .ggd-cat-checklist > li,
    .ggd-category-checkboxes > ul > li {
        break-inside: avoid;
    }
}

/* Section dividers in form */
.ggd-submit-form hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 24px 0;
}

/* Section titles */
.ggd-form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e8f5e9;
}

/* Hint text under fields */
.ggd-form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-top: 4px;
    text-transform: none;
    letter-spacing: 0;
}

/* File input styling */
.ggd-submit-form input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    box-sizing: border-box;
}

.ggd-submit-form input[type="file"]:hover {
    border-color: #4CAF50;
    background: #f5fff5;
}

/* Business Hours Grid */
.ggd-hours-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ggd-hours-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eee;
}

.ggd-hours-day {
    width: 90px;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.ggd-hours-time {
    padding: 6px 8px !important;
    font-size: 13px !important;
    width: 110px !important;
    min-width: 0 !important;
    background: #fff !important;
    margin-top: 0 !important;
}

.ggd-hours-sep {
    font-size: 12px;
    color: #999;
}

.ggd-hours-closed-label {
    display: flex !important;
    align-items: center;
    gap: 4px;
    font-size: 12px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #999;
    margin-bottom: 0 !important;
    margin-left: auto;
    white-space: nowrap;
}

.ggd-hours-closed-label input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .ggd-hours-row {
        flex-wrap: wrap;
    }
    .ggd-hours-day {
        width: 100%;
    }
    .ggd-hours-time {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .ggd-submit-form {
        padding: 24px 18px;
    }
    .ggd-submit-form div[style*="flex"] {
        flex-direction: column !important;
    }
    .ggd-submit-form div[style*="flex"] p {
        flex: 1 1 100% !important;
    }
}

/* === Dashboard === */
.ggd-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.ggd-dashboard h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--ggd-text);
}

.ggd-dashboard-table {
    background: var(--ggd-white);
    border: 1px solid var(--ggd-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ggd-dashboard-table thead tr {
    background: #f8f9fa;
}

.ggd-dashboard-table th,
.ggd-dashboard-table td {
    padding: 12px 16px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* === Search Form === */
.ggd-search-form {
    margin-bottom: 20px;
}

.ggd-search-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.ggd-search-input {
    flex: 2;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    font-size: 15px;
    transition: border-color var(--ggd-transition);
}

.ggd-search-input:focus {
    border-color: var(--ggd-primary);
    outline: none;
}

.ggd-search-select {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border: 2px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    font-size: 14px;
    background: var(--ggd-white);
    cursor: pointer;
}

.ggd-search-zip {
    width: 100px;
    padding: 10px 14px;
    border: 2px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    font-size: 14px;
}

.ggd-search-btn {
    padding: 10px 16px;
    background: var(--ggd-primary);
    color: white;
    border: none;
    border-radius: var(--ggd-radius);
    cursor: pointer;
    font-size: 16px;
    transition: background var(--ggd-transition);
}

.ggd-search-btn:hover {
    background: var(--ggd-primary-dark);
}

/* View Toggle */
.ggd-view-toggle {
    display: flex;
    border: 2px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    overflow: hidden;
}

.ggd-view-btn {
    padding: 8px 12px;
    background: var(--ggd-white);
    border: none;
    cursor: pointer;
    color: var(--ggd-text-muted);
    transition: all var(--ggd-transition);
}

.ggd-view-btn.active {
    background: var(--ggd-primary);
    color: white;
}

/* === Results Info === */
.ggd-results-info {
    margin-bottom: 16px;
    color: var(--ggd-text-light);
    font-size: 14px;
}

/* === Listing Grid === */
.ggd-listing-grid {
    display: grid;
    gap: 20px;
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.ggd-view-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.ggd-view-list {
    grid-template-columns: 1fr;
}

/* === Business Card === */
.ggd-business-card {
    background: var(--ggd-white);
    border: 1px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    overflow: hidden;
    transition: box-shadow var(--ggd-transition), transform var(--ggd-transition);
    will-change: transform;
}

.ggd-business-card:hover {
    box-shadow: var(--ggd-shadow-hover);
    transform: translateY(-2px);
}

.ggd-card-featured {
    border-color: var(--ggd-primary);
    border-width: 2px;
}

/* Card Header (Image/Avatar) */
.ggd-card-header {
    position: relative;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ggd-bg);
    overflow: hidden;
}

.ggd-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ggd-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
}

/* Badges */
.ggd-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ggd-card-header .ggd-badge {
    position: absolute;
    z-index: 2;
}

.ggd-badge-featured {
    background: var(--ggd-primary);
    color: white;
    top: 10px;
    right: 10px;
}

.ggd-badge-open {
    background: var(--ggd-success);
    color: white;
    bottom: 10px;
    left: 10px;
}

.ggd-badge-closed {
    background: var(--ggd-danger);
    color: white;
    bottom: 10px;
    left: 10px;
}

/* Card Body */
.ggd-card-body {
    padding: 16px;
}

.ggd-card-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
}

.ggd-card-title a {
    color: var(--ggd-text);
    text-decoration: none;
}

.ggd-card-title a:hover {
    color: var(--ggd-primary);
}

.ggd-verified-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: var(--ggd-primary);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    vertical-align: middle;
    margin-left: 4px;
}

.ggd-card-category {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f0fe;
    color: var(--ggd-primary);
    border-radius: var(--ggd-radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    margin-bottom: 8px;
}

/* Rating */
.ggd-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 13px;
}

.ggd-star {
    color: #ddd;
    font-size: 16px;
}

.ggd-star-filled {
    color: var(--ggd-warning);
}

/* Card description snippet */
.ggd-card-desc {
    font-size: 13px;
    color: var(--ggd-text-light);
    margin: 8px 0;
    line-height: 1.4;
}

/* View Details button */
.ggd-card-details-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: var(--ggd-primary);
    color: white;
    border-radius: var(--ggd-radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background var(--ggd-transition);
}

.ggd-card-details-btn:hover {
    background: var(--ggd-primary-dark);
    color: white;
}

.ggd-rating-text {
    color: var(--ggd-text-light);
}

.ggd-price-range {
    color: var(--ggd-success);
    font-weight: 600;
    margin-left: 8px;
}

/* Contact Items */
.ggd-card-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ggd-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--ggd-text-light);
    line-height: 1.4;
}

.ggd-contact-item a {
    color: var(--ggd-primary);
    text-decoration: none;
}

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

.ggd-icon {
    flex-shrink: 0;
    font-size: 14px;
}

/* List View overrides */
.ggd-view-list .ggd-business-card {
    display: flex;
    flex-direction: row;
}

.ggd-view-list .ggd-card-header {
    width: 200px;
    height: auto;
    min-height: 160px;
    flex-shrink: 0;
}

.ggd-view-list .ggd-card-body {
    flex: 1;
}

/* === No Results === */
.ggd-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--ggd-text-muted);
    grid-column: 1 / -1;
}

/* === Pagination — Sliding Window === */
.ggd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 40px auto 20px;
    padding: 0;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: fit-content;
    overflow: hidden;
}

.ggd-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border: none;
    border-right: 1px solid #e2e8f0;
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
}

.ggd-page-btn:last-of-type {
    border-right: none;
}

.ggd-page-btn:hover {
    background: #eef2ff;
    color: var(--ggd-primary, #2563eb);
}

.ggd-page-btn.ggd-page-active {
    background: var(--ggd-primary, #2563eb);
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.ggd-page-btn.ggd-page-nav {
    min-width: 46px;
    padding: 0;
    color: #1e293b;
    font-weight: 600;
    background: #fff;
}

.ggd-page-btn.ggd-page-nav:hover {
    background: #eef2ff;
    color: var(--ggd-primary, #2563eb);
}

.ggd-page-btn.ggd-page-disabled {
    pointer-events: none;
    cursor: default;
}

.ggd-page-btn svg {
    display: block;
}

.ggd-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 46px;
    color: #cbd5e1;
    font-size: 14px;
    letter-spacing: 3px;
    user-select: none;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

.ggd-page-info {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    background: #fff;
    border-left: 1px solid #e2e8f0;
}

.ggd-total-listings {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}

@media (max-width: 640px) {
    .ggd-pagination {
        border-radius: 10px;
        margin: 24px auto 16px;
    }

    .ggd-page-btn {
        min-width: 38px;
        height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }

    .ggd-page-btn.ggd-page-nav {
        min-width: 38px;
    }

    .ggd-page-ellipsis {
        min-width: 28px;
        height: 40px;
    }

    .ggd-page-info {
        height: 40px;
        padding: 0 12px;
        font-size: 12px;
    }
}

/* === Categories Grid === */
.ggd-categories-grid {
    display: grid;
    grid-template-columns: repeat(var(--ggd-cols, 4), 1fr);
    gap: 16px;
}

.ggd-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--ggd-white);
    border: 1px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    text-decoration: none;
    color: var(--ggd-text);
    transition: all var(--ggd-transition);
    text-align: center;
}

.ggd-category-card:hover {
    box-shadow: var(--ggd-shadow-hover);
    transform: translateY(-2px);
    border-color: var(--ggd-primary);
}

.ggd-category-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.ggd-category-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}

.ggd-category-count {
    font-size: 12px;
    color: var(--ggd-text-muted);
}

/* === Single Listing === */
.ggd-single-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ggd-single-header {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.ggd-single-hero {
    flex-shrink: 0;
}

.ggd-single-image {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--ggd-radius);
}

.ggd-single-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: 700;
}

.ggd-single-title {
    margin: 0 0 8px;
    font-size: 28px;
}

.ggd-single-tagline {
    color: var(--ggd-text-light);
    font-size: 16px;
    margin: 0 0 12px;
}

.ggd-single-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ggd-single-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
}

.ggd-single-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.ggd-section {
    margin-bottom: 30px;
}

.ggd-section h2 {
    font-size: 20px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ggd-border);
}

/* Hours Table */
.ggd-hours-table {
    width: 100%;
    border-collapse: collapse;
}

.ggd-hours-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--ggd-border);
}

.ggd-hours-table .ggd-today {
    background: #e8f5e9;
    font-weight: 600;
}

/* Sidebar */
.ggd-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ggd-sidebar-card {
    background: var(--ggd-white);
    border: 1px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    padding: 20px;
}

.ggd-sidebar-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.ggd-sidebar-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.ggd-sidebar-item a {
    color: var(--ggd-primary);
    text-decoration: none;
}

.ggd-mini-map {
    width: 100%;
    height: 200px;
    border-radius: var(--ggd-radius-sm);
    background: var(--ggd-bg);
}

.ggd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ggd-tag {
    padding: 4px 10px;
    background: var(--ggd-bg);
    border-radius: 20px;
    font-size: 12px;
    color: var(--ggd-text-light);
}

.ggd-social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ggd-social-link {
    padding: 4px 10px;
    background: var(--ggd-bg);
    border-radius: var(--ggd-radius-sm);
    font-size: 12px;
    color: var(--ggd-text-light);
    text-decoration: none;
}

.ggd-social-link:hover {
    background: var(--ggd-primary);
    color: white;
}

/* === AI Chat Widget === */
.ggd-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ggd-chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ggd-primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
    transition: transform var(--ggd-transition);
}

.ggd-chat-toggle:hover {
    transform: scale(1.1);
}

.ggd-chat-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: var(--ggd-white);
    border-radius: var(--ggd-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ggd-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--ggd-primary);
    color: white;
}

.ggd-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.ggd-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 250px;
    max-height: 350px;
}

.ggd-chat-msg {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: var(--ggd-radius);
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
}

.ggd-chat-bot {
    background: var(--ggd-bg);
    color: var(--ggd-text);
    margin-right: auto;
}

.ggd-chat-user {
    background: var(--ggd-primary);
    color: white;
    margin-left: auto;
}

.ggd-chat-input-row {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--ggd-border);
    gap: 8px;
}

.ggd-chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--ggd-border);
    border-radius: var(--ggd-radius);
    font-size: 14px;
}

/* Rich data cards in chat */
.ggd-rich-card {
    background: var(--ggd-white);
    border: 1px solid var(--ggd-border);
    border-radius: 8px;
    padding: 12px;
    margin-top: 4px;
    font-size: 13px;
}

.ggd-rich-header {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--ggd-text);
}

.ggd-rich-table {
    border-collapse: collapse;
    width: 100%;
}

.ggd-rich-table td, .ggd-rich-table th {
    padding: 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
    text-align: left;
}

.ggd-rich-review {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ggd-rich-review:last-child {
    border-bottom: none;
}

.ggd-rich-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0;
    font-size: 12px;
}

.ggd-rich-contact a {
    color: var(--ggd-primary);
    text-decoration: none;
}

.ggd-rich-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background: var(--ggd-primary);
    color: white !important;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.ggd-rich-btn:hover {
    background: var(--ggd-primary-dark);
}

.ggd-rich-detail {
    border-left: 3px solid var(--ggd-primary);
}

/* Chat message formatting */
.ggd-chat-bot {
    line-height: 1.6;
}

.ggd-chat-bot strong {
    color: var(--ggd-text);
}

.ggd-chat-bot a {
    color: var(--ggd-primary);
    text-decoration: underline;
}

.ggd-chat-bot br + br {
    display: block;
    margin-top: 4px;
    content: '';
}

.ggd-chat-num {
    font-weight: 600;
    color: var(--ggd-primary);
}

.ggd-chat-bullet {
    color: var(--ggd-primary);
    margin-right: 4px;
}

/* Chat listing cards */
.ggd-chat-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.ggd-chat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--ggd-white);
    border: 1px solid var(--ggd-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--ggd-text);
    transition: all 0.15s ease;
}

.ggd-chat-card:hover {
    border-color: var(--ggd-primary);
    box-shadow: 0 2px 6px rgba(66,133,244,0.15);
}

.ggd-chat-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ggd-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.ggd-chat-card-info {
    flex: 1;
    font-size: 12px;
    line-height: 1.4;
}

.ggd-chat-card-info strong {
    font-size: 13px;
}

.ggd-chat-card-cat {
    display: inline-block;
    padding: 1px 6px;
    background: #e8f0fe;
    color: var(--ggd-primary);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.ggd-chat-card-open {
    display: inline-block;
    padding: 1px 6px;
    background: #e8f5e9;
    color: var(--ggd-success);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.ggd-chat-card-info small {
    color: var(--ggd-text-muted);
}

/* Mic button */
.ggd-chat-mic {
    width: 36px;
    height: 36px;
    border: 1px solid var(--ggd-border);
    border-radius: 50%;
    background: var(--ggd-white);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ggd-transition);
    flex-shrink: 0;
}

.ggd-chat-mic:hover {
    background: #f0f0f0;
}

.ggd-chat-mic.ggd-mic-active {
    background: var(--ggd-danger);
    color: white;
    border-color: var(--ggd-danger);
    animation: ggd-pulse 1.5s infinite;
}

@keyframes ggd-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(234, 67, 53, 0); }
}

.ggd-chat-send {
    padding: 8px 16px;
    background: var(--ggd-primary);
    color: white;
    border: none;
    border-radius: var(--ggd-radius);
    cursor: pointer;
    font-size: 14px;
}

/* === Map === */
.ggd-map {
    width: 100%;
    border-radius: var(--ggd-radius);
    background: var(--ggd-bg);
}

/* === Notices === */
.ggd-notice {
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--ggd-radius-sm);
    color: #856404;
}

.ggd-loading {
    text-align: center;
    color: var(--ggd-text-muted);
    padding: 20px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .ggd-search-row {
        flex-direction: column;
    }

    .ggd-search-input,
    .ggd-search-select,
    .ggd-search-zip {
        width: 100%;
        min-width: unset;
    }

    .ggd-view-grid {
        grid-template-columns: 1fr;
    }

    .ggd-view-list .ggd-business-card {
        flex-direction: column;
    }

    .ggd-view-list .ggd-card-header {
        width: 100%;
        height: 160px;
    }

    .ggd-single-header {
        flex-direction: column;
    }

    .ggd-single-image {
        width: 100%;
    }

    .ggd-single-content {
        grid-template-columns: 1fr;
    }

    .ggd-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ggd-chat-panel {
        width: calc(100vw - 40px);
        right: -10px;
    }

    .ggd-location-bar {
        font-size: 13px;
        padding: 8px 12px;
    }

    .ggd-radius-select {
        max-width: none;
        width: 100%;
    }

    .ggd-near-me-btn {
        width: 100%;
    }
}

/* === Geolocation — Location Bar === */
.ggd-location-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #e8f0fe 0%, #e8f5e9 100%);
    border: 1px solid #c8d8f0;
    border-radius: var(--ggd-radius);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--ggd-text);
    flex-wrap: wrap;
}

.ggd-location-bar-icon {
    font-size: 18px;
    flex-shrink: 0;
}

#ggd-location-bar-text {
    flex: 1;
    font-weight: 500;
    min-width: 200px;
}

.ggd-location-bar-btn {
    padding: 4px 12px;
    border: 1px solid var(--ggd-primary);
    border-radius: var(--ggd-radius-sm);
    background: var(--ggd-white);
    color: var(--ggd-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--ggd-transition);
}

.ggd-location-bar-btn:hover {
    background: var(--ggd-primary);
    color: var(--ggd-white);
}

.ggd-location-bar-btn-clear {
    border-color: var(--ggd-danger);
    color: var(--ggd-danger);
}

.ggd-location-bar-btn-clear:hover {
    background: var(--ggd-danger);
    color: var(--ggd-white);
}

/* Geolocation — Near Me Button */
.ggd-near-me-btn {
    background: var(--ggd-success);
    white-space: nowrap;
}

.ggd-near-me-btn:hover {
    background: #2d9249;
}

.ggd-near-me-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Geolocation — Radius Selector */
.ggd-radius-select {
    max-width: 130px;
}

/* === Pricing Page === */
.ggd-pricing-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ggd-pricing-header {
    text-align: center;
    margin-bottom: 40px;
}

.ggd-pricing-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--ggd-text);
    margin: 0 0 8px;
}

.ggd-pricing-header p {
    font-size: 16px;
    color: var(--ggd-text-light);
    margin: 0;
}

.ggd-pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: start;
}

.ggd-pricing-card {
    position: relative;
    background: var(--ggd-white);
    border: 2px solid var(--ggd-border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all var(--ggd-transition);
    box-shadow: var(--ggd-shadow);
}

.ggd-pricing-card:hover {
    box-shadow: var(--ggd-shadow-hover);
    transform: translateY(-4px);
}

.ggd-pricing-recommended {
    border-color: #4CAF50;
    border-width: 3px;
    position: relative;
    z-index: 1;
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
}

.ggd-pricing-recommended:hover {
    transform: scale(1.05) translateY(-4px);
}

.ggd-pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2e7d32 0%, #4CAF50 100%);
    color: white;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ggd-pricing-current-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ggd-primary);
    color: white;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ggd-pricing-current {
    border-color: var(--ggd-primary);
}

.ggd-pricing-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--ggd-text);
    margin: 8px 0 16px;
}

.ggd-pricing-price {
    margin-bottom: 24px;
    line-height: 1;
}

.ggd-pricing-currency {
    font-size: 24px;
    font-weight: 700;
    color: var(--ggd-text);
    vertical-align: super;
}

.ggd-pricing-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--ggd-text);
    letter-spacing: -1px;
}

.ggd-pricing-interval {
    font-size: 16px;
    color: var(--ggd-text-muted);
    font-weight: 400;
}

.ggd-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    text-align: left;
}

.ggd-pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--ggd-text-light);
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ggd-pricing-features li:last-child {
    border-bottom: none;
}

.ggd-pricing-check {
    color: #4CAF50;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 16px;
}

.ggd-pricing-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.ggd-pricing-btn-primary {
    background: linear-gradient(135deg, #2e7d32 0%, #4CAF50 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.ggd-pricing-btn-primary:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #388E3C 100%);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
    transform: translateY(-1px);
    color: white;
}

.ggd-pricing-btn-outline {
    background: transparent;
    color: #2e7d32;
    border: 2px solid #4CAF50;
}

.ggd-pricing-btn-outline:hover {
    background: #e8f5e9;
    color: #2e7d32;
}

.ggd-pricing-btn-current {
    background: #f0f0f0;
    color: var(--ggd-text-muted);
    cursor: default;
    border-color: transparent;
}

.ggd-pricing-btn.ggd-pricing-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Payment Result Pages */
.ggd-payment-result {
    max-width: 560px;
    margin: 60px auto;
    text-align: center;
    padding: 48px 32px;
    background: var(--ggd-white);
    border-radius: 16px;
    box-shadow: var(--ggd-shadow);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ggd-payment-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
}

.ggd-payment-success .ggd-payment-icon {
    background: #e8f5e9;
    color: #2e7d32;
}

.ggd-payment-cancel .ggd-payment-icon {
    background: #fce4ec;
    color: #c62828;
}

.ggd-payment-result h2 {
    font-size: 24px;
    margin: 0 0 12px;
    color: var(--ggd-text);
}

.ggd-payment-result p {
    color: var(--ggd-text-light);
    margin: 0 0 24px;
    font-size: 16px;
}

/* Dashboard Upgrade Button */
.ggd-dashboard-upgrade-btn {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg, #2e7d32, #4CAF50);
    color: white !important;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ggd-dashboard-upgrade-btn:hover {
    background: linear-gradient(135deg, #1b5e20, #388E3C);
    color: white !important;
}

/* Plan Badges on Business Cards */
.ggd-badge-plan {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ggd-badge-plan-basic {
    background: #e3f2fd;
    color: #1565c0;
}

.ggd-badge-plan-premium {
    background: #fff3e0;
    color: #e65100;
}

.ggd-badge-plan-featured {
    background: var(--ggd-primary);
    color: white;
}

/* Pricing Responsive — Tablet */
@media (max-width: 1024px) {
    .ggd-pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ggd-pricing-recommended {
        transform: none;
    }

    .ggd-pricing-recommended:hover {
        transform: translateY(-4px);
    }
}

/* Pricing Responsive — Mobile */
@media (max-width: 640px) {
    .ggd-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .ggd-pricing-header h2 {
        font-size: 24px;
    }

    .ggd-pricing-amount {
        font-size: 40px;
    }

    .ggd-pricing-wrapper {
        padding: 20px 12px;
    }
}

/* === Clearbit Logo on Cards === */
.ggd-card-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}

.ggd-card-avatar .ggd-card-initials-fallback {
    display: none;
}

.ggd-card-avatar.ggd-logo-failed .ggd-card-initials-fallback {
    display: block;
}

.ggd-card-avatar.ggd-logo-failed .ggd-card-logo {
    display: none;
}

/* Single business page logo */
.ggd-single-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ggd-single-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 6px;
}

/* === Plan-Locked Fields === */
.ggd-plan-locked {
    opacity: 0.6;
}

.ggd-locked-text {
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

.ggd-locked-text .dashicons {
    color: #cbd5e1;
    vertical-align: middle;
    margin-right: 2px;
}

/* === Font Display Optimization === */
/* Ensure any @font-face declarations use swap to prevent FOIT */
@font-face {
    font-family: 'GoGreen Icons';
    font-display: swap;
    src: local('GoGreen Icons');
}
