.gorilladash-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
}

.gorilladash-form .gorilladash-form-row {
    margin-bottom: 15px;
}

.gorilladash-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.gorilladash-form input[type="text"],
.gorilladash-form input[type="email"],
.gorilladash-form input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.gorilladash-form input[type="text"]:focus,
.gorilladash-form input[type="email"]:focus,
.gorilladash-form input[type="tel"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gorilladash-form input[type="checkbox"] {
    margin-right: 8px;
}

.gorilladash-form button[type="submit"] {
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.gorilladash-form button[type="submit"]:hover {
    background: #005a87;
}

.gorilladash-form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#gorilladash-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 3px;
    display: none;
}

#gorilladash-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#gorilladash-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Google Map search widget styles */
.gorilladash-map-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

.gorilladash-map-search-panel {
    flex: 0 0 300px;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 5px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.gorilladash-map-search-panel h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 15px;
    flex-shrink: 0;
    font-size: 18px;
}

.gorilladash-search-fields {
    flex-shrink: 0;
    margin-bottom: 30px;
}

.gorilladash-map-display-panel {
    flex: 1;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #ddd;
    min-height: 500px;
}

.gorilladash-search-field {
    margin-bottom: 20px;
}

.gorilladash-search-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.gorilladash-search-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.gorilladash-search-field input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

#gorilladash-search-address-button,
#gorilladash-clear-search-button {
    background: #0073aa;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 8px 8px 8px 0;
    transition: background-color 0.3s;
}

#gorilladash-search-address-button:hover {
    background: #005a87;
}

#gorilladash-clear-search-button {
    background: #666;
}

#gorilladash-clear-search-button:hover {
    background: #444;
}

.gorilladash-store-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s;
}

.gorilladash-store-item:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gorilladash-store-item h5 {
    margin: 0 0 8px 0;
    color: #0073aa;
    font-size: 16px;
}

.gorilladash-store-item p {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.gorilladash-store-item button {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
}

.gorilladash-store-item button:hover {
    background: #218838;
}

#gorilladash-map-canvas {
    border-radius: 5px;
    display: none;
}

#gorilladash-map-loading-indicator {
    border-radius: 5px;
    font-size: 16px;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .gorilladash-map-container {
        flex-direction: column;
    }

    .gorilladash-map-search-panel {
        flex: none;
        order: 2;
        padding: 20px;
    }

    .gorilladash-map-search-panel h3 {
        margin-bottom: 20px;
        padding-bottom: 12px;
        font-size: 16px;
    }

    .gorilladash-search-fields {
        margin-bottom: 20px;
    }

    .gorilladash-search-field {
        margin-bottom: 16px;
    }

    .gorilladash-search-field input {
        padding: 9px 11px;
        margin-bottom: 10px;
    }

    #gorilladash-search-address-button,
    #gorilladash-clear-search-button {
        padding: 9px 16px;
        margin: 6px 6px 6px 0;
        font-size: 13px;
    }

    .gorilladash-map-display-panel {
        order: 1;
        margin-bottom: 20px;
    }

    #gorilladash-map-canvas {
        height: 300px !important;
    }
}

/* Tribes search results styles */
.gorilladash-tribes-results {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0 auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
}

.gorilladash-tribes-results h4 {
    background: #0073aa !important;
    color: white !important;
    margin: 0;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
}

.gorilladash-tribes-list {
    padding: 0;
    max-height: 600px;
    overflow-y: auto;
}

/* List item styles */
.gorilladash-tribe-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    transition: background-color 0.3s ease;
    min-height: 60px;
}

.gorilladash-tribe-list-item:last-child {
    border-bottom: none;
}

.gorilladash-tribe-list-item:hover {
    background-color: #f8f9fa;
}

.gorilladash-tribe-list-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #0073aa;
}

.gorilladash-tribe-info {
    flex: 1;
    min-width: 0;
}

/* Add padding only for selected tribe display */
.gorilladash-selected-tribe .gorilladash-tribe-info {
    padding: 15px 20px;
}

.gorilladash-tribe-name {
    font-size: 16px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 4px;
    line-height: 1.3;
}

.gorilladash-tribe-address {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    word-wrap: break-word;
}

.gorilladash-tribe-actions {
    flex-shrink: 0;
    margin-left: 15px;
}

.gorilladash-tribe-select-btn {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 70px;
}

.gorilladash-tribe-select-btn:hover {
    background: #005a87;
}

.gorilladash-tribe-select-btn:active {
    background: #004c73;
}

/* Legacy card styles for backwards compatibility */
.gorilladash-tribe-result-card {
    border-bottom: 1px solid #eee;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.gorilladash-tribe-result-card:last-child {
    border-bottom: none;
}

.gorilladash-tribe-result-card:hover {
    background-color: #f8f9fa;
}

.gorilladash-tribe-result-card h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 18px;
    font-weight: bold;
}

.gorilladash-tribe-description {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    font-style: italic;
}

.gorilladash-tribe-distance,
.gorilladash-tribe-slug,
.gorilladash-tribe-coordinates,
.gorilladash-tribe-global-id,
.gorilladash-tribe-org-id,
.gorilladash-tribe-phone,
.gorilladash-tribe-email,
.gorilladash-tribe-website {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.gorilladash-tribe-address strong,
.gorilladash-tribe-phone strong,
.gorilladash-tribe-email strong,
.gorilladash-tribe-website strong,
.gorilladash-tribe-distance strong,
.gorilladash-tribe-slug strong,
.gorilladash-tribe-coordinates strong,
.gorilladash-tribe-global-id strong,
.gorilladash-tribe-org-id strong {
    color: #333;
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

.gorilladash-tribe-website a {
    color: #0073aa;
    text-decoration: none;
}

.gorilladash-tribe-website a:hover {
    text-decoration: underline;
}

.gorilladash-tribe-raw-data {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.gorilladash-tribe-raw-data details {
    cursor: pointer;
}

.gorilladash-tribe-raw-data summary {
    color: #666;
    font-size: 13px;
    padding: 5px 0;
    outline: none;
    user-select: none;
}

.gorilladash-tribe-raw-data summary:hover {
    color: #0073aa;
}

.gorilladash-tribe-raw-data pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px;
    margin: 10px 0 0 0;
    font-size: 11px;
    color: #333;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Block-level error styles (legacy for large error messages) */
.gorilladash-tribe-error {
    padding: 20px;
    text-align: center;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px;
}

.gorilladash-tribe-error h4 {
    margin: 0 0 10px 0;
    color: #721c24;
}

/* No results message */
.gorilladash-tribes-results p {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Responsive adjustments for tribes results */
@media (max-width: 768px) {
    .gorilladash-map-container {
        flex-direction: column;
    }

    .gorilladash-tribe-list-item {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 15px;
        min-height: auto;
    }

    .gorilladash-tribe-info {
        margin-bottom: 10px;
    }

    .gorilladash-tribe-name {
        font-size: 15px;
    }

    .gorilladash-tribe-address {
        font-size: 13px;
    }

    .gorilladash-tribe-actions {
        margin-left: 0;
        text-align: center;
    }

    .gorilladash-tribe-select-btn {
        width: 100%;
        max-width: 120px;
    }

    .gorilladash-tribe-result-card {
        padding: 15px;
    }

    .gorilladash-tribe-result-card h4 {
        font-size: 16px;
    }

    .gorilladash-tribe-address strong,
    .gorilladash-tribe-phone strong,
    .gorilladash-tribe-email strong,
    .gorilladash-tribe-website strong,
    .gorilladash-tribe-distance strong,
    .gorilladash-tribe-slug strong,
    .gorilladash-tribe-coordinates strong,
    .gorilladash-tribe-global-id strong,
    .gorilladash-tribe-org-id strong {
        min-width: 70px;
        font-size: 13px;
    }

    .gorilladash-tribe-raw-data pre {
        font-size: 10px;
    }
}

.api-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

.api-status.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.api-status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* GorillaDash Enquiry Component Styles */
.gorilladash-enquiry-component {
    max-width: 800px;
    margin: 20px auto;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gorilladash-search-section,
.gorilladash-form-section {
    padding: 30px;
}

.gorilladash-search-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.gorilladash-search-section h3,
.gorilladash-form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Address Search Styles */
.gorilladash-address-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: stretch;
}

.gorilladash-address-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #fff;
}

.gorilladash-address-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.gorilladash-search-btn {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.gorilladash-search-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.gorilladash-search-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.gorilladash-loading {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.gorilladash-no-results {
    padding: 30px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.gorilladash-tribe-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-left: 4px solid transparent;
}

.gorilladash-tribe-item:last-child {
    border-bottom: none;
}

.gorilladash-tribe-item:hover {
    background-color: #f8f9fa;
}

.gorilladash-tribe-item.selected {
    background-color: #e3f2fd;
    border-left-color: #0073aa;
}

/* Selected Tribe Styles */
.gorilladash-selected-tribe {
    margin-top: 20px;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.gorilladash-selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #4caf50;
    position: relative;
}

.gorilladash-selected-tribe h4 {
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.gorilladash-selected-name {
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 5px;
}

.gorilladash-selected-address {
    font-size: 14px;
    color: #4caf50;
    margin-bottom: 15px;
}

.gorilladash-clear-btn.gorilladash-close-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
}

.gorilladash-clear-btn.gorilladash-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.gorilladash-close-icon {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

/* Form Styles */
.gorilladash-enquiry-form {
    display: grid;
    gap: 20px;
}

.gorilladash-enquiry-form .gorilladash-form-row {
    display: flex;
    flex-direction: column;
}

.gorilladash-enquiry-form .gorilladash-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gorilladash-enquiry-form .gorilladash-form-row input[type="text"],
.gorilladash-enquiry-form .gorilladash-form-row input[type="email"],
.gorilladash-enquiry-form .gorilladash-form-row input[type="tel"],
.gorilladash-enquiry-form .gorilladash-form-row input[type="url"],
.gorilladash-enquiry-form .gorilladash-form-row textarea,
.gorilladash-enquiry-form .gorilladash-form-row select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.gorilladash-enquiry-form .gorilladash-form-row input[type="text"]:focus,
.gorilladash-enquiry-form .gorilladash-form-row input[type="email"]:focus,
.gorilladash-enquiry-form .gorilladash-form-row input[type="tel"]:focus,
.gorilladash-enquiry-form .gorilladash-form-row input[type="url"]:focus,
.gorilladash-enquiry-form .gorilladash-form-row textarea:focus,
.gorilladash-enquiry-form .gorilladash-form-row select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.gorilladash-enquiry-form .gorilladash-form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.gorilladash-enquiry-form .gorilladash-form-row input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.gorilladash-submit-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.gorilladash-submit-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.gorilladash-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Message Styles */
.gorilladash-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
}

.gorilladash-message.gorilladash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gorilladash-message.gorilladash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gorilladash-message.gorilladash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Opening Hours Styles */
.gorilladash-opening-hours-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gorilladash-opening-hours-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    line-height: 1.6;
}

.gorilladash-opening-hours-list li:last-child {
    border-bottom: none;
}

.gorilladash-opening-hours-list li strong {
    display: inline-block;
    min-width: 100px;
    color: #333;
    font-weight: 600;
}

.gorilladash-opening-hours-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gorilladash-enquiry-component {
        margin: 10px;
        border-radius: 6px;
    }

    .gorilladash-search-section,
    .gorilladash-form-section {
        padding: 20px;
    }

    .gorilladash-search-section h3,
    .gorilladash-form-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .gorilladash-address-search {
        flex-direction: column;
        gap: 12px;
    }

    .gorilladash-search-btn {
        padding: 12px 20px;
        font-size: 16px;
    }

    .gorilladash-tribe-item {
        padding: 12px 15px;
    }

    .gorilladash-form-row input {
        padding: 10px 14px;
        font-size: 16px;
    }

    .gorilladash-submit-btn {
        padding: 12px 24px;
        font-size: 16px;
    }

}

/* Additional utility styles for dynamic content */

/* Map containers with default CSS variables */
.gorilladash-map-container,
.gorilladash-store-map-container {
    --map-height: 500px;
    --map-width: 100%;
}

/* Map containers with dynamic dimensions using CSS variables */
#gorilladash-map {
    height: var(--map-height);
    width: var(--map-width);
}

#gorilladash-store-map {
    height: var(--map-height);
    width: var(--map-width);
    display: none;
}

/* Loading state styles */
#gorilladash-map-loading,
#gorilladash-store-map-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: var(--map-height);
    background: #f0f0f0;
}

/* Hidden state utility classes */
.gorilladash-hidden,
#gorilladash-tribes-results-container:not(.gorilladash-visible),
.gorilladash-tribes-results:not(.gorilladash-visible),
.gorilladash-selected-tribe:not(.gorilladash-visible),
#gorilladash-selected-tribe:not(.gorilladash-visible),
.gorilladash-message:not(.gorilladash-visible),
#gorilladash-enquiry-message:not(.gorilladash-visible) {
    display: none;
}

/* Google Maps API Error Message Styles */
.gorilladash-map-error {
    color: #c62828;
    padding: 20px;
    text-align: center;
}

.gorilladash-map-error h4 {
    margin: 0 0 15px 0;
    color: #c62828;
    font-size: 18px;
    font-weight: 600;
}

.gorilladash-map-error p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

.gorilladash-map-error ul {
    text-align: left;
    margin: 15px auto;
    padding-left: 20px;
    max-width: 500px;
    line-height: 1.8;
}

.gorilladash-map-error li {
    margin-bottom: 8px;
    font-size: 14px;
}

/* Debug output styles */
.gorilladash-debug-output {
    background: #f5f5f5;
    padding: 15px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}
