/**
 * Dental Care Search Widget Styles
 */

.dental-care-search-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.dental-search-container {
    width: 100%;
}

/* Search Form */
.search-form-wrapper {
    background: linear-gradient(135deg, #d946a6 0%, #7c3aed 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(217, 70, 166, 0.2);
}

.search-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-field {
    flex: 1;
    min-width: 200px;
}

.search-label {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.treatment-select,
.address-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s;
    outline: none;
}

.treatment-select:focus,
.address-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-button {
    padding: 12px 30px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.search-button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Results Section */
.results-wrapper {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.results-count span {
    color: #d946a6;
    font-size: 24px;
}

.show-map-toggle {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.show-map-toggle:hover {
    border-color: #d946a6;
    color: #d946a6;
    transform: translateY(-2px);
}

.show-map-toggle.active {
    background: #d946a6;
    color: white;
    border-color: #d946a6;
}

/* List View */
.results-list {
    display: grid;
    gap: 20px;
}

.clinic-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    gap: 20px;
}

.clinic-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.clinic-image {
    width: 200px;
    height: 180px;
    object-fit: cover;
    flex-shrink: 0;
}

.clinic-details {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.clinic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.clinic-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.clinic-address {
    color: #6b7280;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clinic-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
}

.service-icon {
    color: #f59e0b;
    font-size: 16px;
    font-weight: bold;
}

.clinic-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-visit,
.btn-book {
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    text-align: center;
}

.btn-visit {
    background: linear-gradient(135deg, #d946a6 0%, #7c3aed 100%);
    color: white;
}

.btn-book {
    background: #000;
    color: white;
}

.btn-visit:hover,
.btn-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Map View */
.results-map-view {
    display: flex;
    gap: 20px;
}

.map-list-container {
    width: 400px;
    max-height: 600px;
    overflow-y: auto;
    flex-shrink: 0;
    padding-right: 10px;
}

.map-list-container::-webkit-scrollbar {
    width: 8px;
}

.map-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.map-list-container::-webkit-scrollbar-thumb {
    background: #d946a6;
    border-radius: 4px;
}

.map-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.map-clinic-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.map-clinic-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.map-clinic-card.active {
    border: 2px solid #d946a6;
    box-shadow: 0 4px 16px rgba(217, 70, 166, 0.2);
}

.map-clinic-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.map-clinic-card .clinic-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.map-clinic-card .clinic-address {
    margin-bottom: 10px;
}

.map-clinic-card .btn-visit {
    width: 100%;
    margin-top: 10px;
}

.map-container {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#dental-care-map {
    width: 100%;
    height: 600px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.loading:after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .results-map-view {
        flex-direction: column;
    }

    .map-list-container {
        width: 100%;
        max-height: 400px;
    }

    #dental-care-map {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .dental-care-search-wrapper {
        padding: 15px;
    }

    .search-form-wrapper {
        padding: 20px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-field {
        width: 100%;
        min-width: auto;
    }

    .search-button {
        width: 100%;
    }

    .clinic-card {
        flex-direction: column;
    }

    .clinic-image {
        width: 100%;
        height: 200px;
    }

    .clinic-services {
        grid-template-columns: 1fr;
    }

    .clinic-actions {
        flex-direction: column;
    }

    .btn-visit,
    .btn-book {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .show-map-toggle {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .clinic-title {
        font-size: 18px;
    }

    .results-count {
        font-size: 16px;
    }

    .results-count span {
        font-size: 20px;
    }

    #dental-care-map {
        height: 400px;
    }
}