/* Bark Services Plugin Styles */

/* Reset and Base Styles */
.bark-service-categories,
.bark-services-grid,
.bark-filter-results,
.bark-providers-list {
    box-sizing: border-box;
}

.bark-service-categories *,
.bark-services-grid *,
.bark-filter-results *,
.bark-providers-list * {
    box-sizing: inherit;
}

/* Service Categories Grid */
.bark-service-categories {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.bark-service-categories[data-columns="1"] {
    grid-template-columns: 1fr;
}

.bark-service-categories[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.bark-service-categories[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.bark-service-categories[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .bark-service-categories {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .bark-service-categories[data-columns="3"],
    .bark-service-categories[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Category Cards */
.bark-category-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.bark-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.bark-category-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bark-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bark-category-icon {
    font-size: 48px;
    color: #fff;
    opacity: 0.9;
}

.bark-category-content {
    padding: 20px;
}

.bark-category-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.bark-category-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.bark-category-title a:hover {
    color: #667eea;
}

.bark-category-excerpt {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bark-services-count {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.bark-view-services-btn {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.bark-view-services-btn:hover {
    background: #5a67d8;
    color: #fff;
}

/* Services Grid */
.bark-services-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.bark-services-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.bark-services-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.bark-services-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.bark-services-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .bark-services-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .bark-services-grid[data-columns="3"],
    .bark-services-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Service Cards */
.bark-service-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.bark-service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.bark-service-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bark-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bark-service-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
}

.bark-service-content {
    padding: 20px;
}

.bark-service-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.bark-service-excerpt {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bark-get-quotes-btn {
    width: 100%;
    background: #48bb78;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.95rem;
}

.bark-get-quotes-btn:hover {
    background: #38a169;
}

/* Modal Styles */
.bark-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bark-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.bark-modal-header {
    position: relative;
}

.bark-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    border: none;
    padding: 0;
    line-height: 1;
    background: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.bark-modal-close:hover {
    color: #333;
}

/* Banner Image in Modal */
.bark-modal-banner {
    background-size: cover;
    background-position: center;
    height: 200px;
    margin: -20px -20px 20px -20px;
    border-radius: 8px 8px 0 0;
}

/* Quit Confirmation Modal */
.bark-quit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
}

.bark-quit-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.bark-quit-modal h3 {
    color: #1a365d;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.bark-quit-modal p {
    color: #1a365d;
    margin-bottom: 25px;
    line-height: 1.5;
}

.bark-quit-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.bark-quit-actions .bark-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    min-width: 80px;
}

.bark-quit-actions .bark-btn-secondary {
    background: white;
    color: #1a365d;
    border: 1px solid #e2e8f0;
}

.bark-quit-actions .bark-btn-primary {
    background: #3182ce;
    color: white;
}

/* Loader Styles */
.bark-loader-modal {
    text-align: center;
    padding: 40px 20px;
}

.bark-loader-content h3 {
    color: #1a365d;
    margin-top: 20px;
    font-size: 1.2em;
}

.bark-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Popup Styles */
.bark-success-popup {
    text-align: center;
    padding: 30px 20px;
}

.bark-success-icon {
    width: 60px;
    height: 60px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.bark-success-popup h3 {
    color: #1a365d;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.bark-success-popup p {
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.5;
}

.bark-success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.bark-success-actions .bark-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    min-width: 100px;
}

.bark-success-actions .bark-btn-secondary {
    background: white;
    color: #1a365d;
    border: 1px solid #e2e8f0;
}

.bark-success-actions .bark-btn-primary {
    background: #3182ce;
    color: white;
}

/* No Providers Popup Styles */
.bark-no-providers-popup {
    text-align: center;
    padding: 30px 20px;
}

.bark-no-providers-icon {
    width: 60px;
    height: 60px;
    background: #f56565;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    margin: 0 auto 20px;
}

.bark-no-providers-popup h3 {
    color: #1a365d;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.bark-no-providers-popup p {
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.5;
}

.bark-no-providers-actions .bark-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    background: #3182ce;
    color: white;
}

.bark-modal-content {
    padding: 20px;
}

body.bark-modal-open {
    overflow: hidden;
}

/* Question Styles */
.bark-question-container {
    max-width: 100%;
}

.bark-question-container .bark-question-actions .bark-btn.bark-prev-btn {
    background: transparent;
    border: 1px solid var(--e-global-color-44aa462);
    box-shadow: none;
    color: var(--e-global-color-44aa462);
}

.bark-question-header {
    margin-bottom: 30px;
}

.bark-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.bark-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.bark-step-counter {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.bark-question-content {
    margin-bottom: 30px;
}

.bark-question-text {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.bark-question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bark-option-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.bark-option-label:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.bark-option-label input[type="radio"],
.bark-option-label input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.bark-option-label input[type="radio"]:checked + .bark-option-text,
.bark-option-label input[type="checkbox"]:checked + .bark-option-text {
    font-weight: 600;
    color: #667eea;
}

.bark-option-label:has(input:checked) {
    border-color: #667eea;
    background: #edf2f7;
}

.bark-option-text {
    flex: 1;
    font-size: 1rem;
    color: #333;
}

.bark-text-input,
.bark-textarea-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.bark-text-input:focus,
.bark-textarea-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bark-required-note {
    margin: 10px 0 0 0;
    color: #e53e3e;
    font-size: 0.9rem;
    font-style: italic;
}

.bark-validation-error {
    background: #fed7d7;
    color: #c53030;
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 0.9rem;
    border-left: 4px solid #e53e3e;
}

.bark-question-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.bark-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.bark-btn-primary {
    background: #667eea;
    color: #fff;
}

.bark-btn-primary:hover {
    background: #5a67d8;
}

.bark-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.bark-btn-secondary:hover {
    background: #cbd5e0;
}

/* Filter Results */
.bark-filter-results {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.bark-filters-sidebar {
    flex: 0 0 250px;
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.bark-filters-sidebar h3 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    color: #333;
}

.bark-filter-group {
    margin-bottom: 20px;
}

.bark-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.bark-filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.bark-providers-list {
    flex: 1;
    display: grid;
    gap: 20px;
}

.bark-providers-list[data-columns="1"] {
    grid-template-columns: 1fr;
}

.bark-providers-list[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .bark-filter-results {
        flex-direction: column;
    }
    
    .bark-filters-sidebar {
        flex: none;
    }
    
    .bark-providers-list {
        grid-template-columns: 1fr !important;
    }
}

/* Provider Cards */
.bark-provider-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bark-provider-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.bark-provider-image {
    height: 120px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bark-provider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bark-provider-avatar {
    color: #fff;
    font-size: 36px;
}

.bark-provider-content {
    padding: 20px;
}

.bark-provider-name {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.bark-provider-location {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bark-provider-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bark-stars {
    display: flex;
    gap: 2px;
}

.bark-star {
    font-size: 16px;
}

.bark-star-full {
    color: #f6e05e;
}

.bark-star-half {
    color: #f6e05e;
}

.bark-star-empty {
    color: #e2e8f0;
}

.bark-rating-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.bark-provider-rate {
    margin: 0 0 10px 0;
    color: #48bb78;
    font-size: 1rem;
}

.bark-provider-excerpt {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.bark-provider-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bark-contact-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.bark-email-btn {
    background: #4299e1;
    color: #fff;
}

.bark-email-btn:hover {
    background: #3182ce;
    color: #fff;
}

.bark-phone-btn {
    background: #48bb78;
    color: #fff;
}

.bark-phone-btn:hover {
    background: #38a169;
    color: #fff;
}

.bark-message-btn {
    background: #ed8936;
    color: #fff;
}

.bark-message-btn:hover {
    background: #dd6b20;
}

/* Message Form */
.bark-message-form {
    max-width: 500px;
    margin: 0 auto;
}

.bark-message-form h3 {
    margin: 0 0 20px 0;
    text-align: center;
    color: #333;
}

.bark-form-group {
    margin-bottom: 20px;
}

.bark-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4a5568;
}

.bark-form-group input,
.bark-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.bark-form-group input:focus,
.bark-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bark-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Loading and Error States */
.bark-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
}

.bark-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: bark-spin 1s linear infinite;
    margin-left: 10px;
}

.bark-error {
    background: #fed7d7;
    color: #c53030;
    padding: 15px 20px;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid #e53e3e;
}

@keyframes bark-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .bark-modal {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .bark-question-actions {
        flex-direction: column;
    }
    
    .bark-btn {
        width: 100%;
    }
    
    .bark-provider-actions {
        flex-direction: column;
    }
    
    .bark-contact-btn {
        width: 100%;
    }
}

/* Accessibility */
.bark-option-label:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.bark-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* User Info Popup Styles */
.bark-user-info-popup {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.bark-user-info-popup .bark-popup-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.bark-step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.bark-step {
    flex: 1;
    padding: 10px 15px;
    margin: 0 5px;
    background-color: #f0f0f0;
    border-radius: 20px;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
}

.bark-step.active {
    background-color: #0073aa;
    color: white;
}

.bark-step.completed {
    background-color: #28a745;
    color: white;
}

.bark-form-step {
    display: none;
    text-align: left;
}

.bark-form-step.active {
    display: block;
}

.bark-form-step h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.bark-form-step input,
.bark-form-step textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.bark-form-step input:focus,
.bark-form-step textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.bark-form-step textarea {
    height: 100px;
    resize: vertical;
}

.bark-step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.bark-step-buttons .bark-btn {
    flex: 0 0 auto;
}

/* Print Styles */
@media print {
    .bark-modal-overlay,
    .bark-filters-sidebar,
    .bark-provider-actions {
        display: none !important;
    }
}

/* Responsive adjustments for user info popup */
@media (max-width: 768px) {
    .bark-user-info-popup .bark-popup-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }
    
    .bark-step-indicator {
        padding: 0 10px;
    }
    
    .bark-step {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .bark-step-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .bark-step-buttons .bark-btn {
        width: 100%;
    }
}
