/* IntraAct Therapeuten Datenbank - Frontend Styles */

.itdb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters */
.itdb-filters {
    margin-bottom: 3rem;
    display: flex;
    gap: 1rem;
}

.itdb-filters h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.filter-group {}

.filter-sort {
    margin-left: auto;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 16px;
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    box-sizing: border-box;
}

.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #ce0e16;
    box-shadow: 0 0 0 2px rgba(206, 14, 22, 0.1);
}

/* Filter Actions */
.filter-actions {
    display: flex;
    flex-direction: column;
    justify-content: end;
    text-align: right;
}

/* Buttons */
.itdb-btn-primary,
.itdb-btn-secondary,
.itdb-btn-toggle {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.itdb-btn-primary {
    background: #ce0e16;
    color: white;
}

.itdb-btn-primary:hover {
    background: #005a87;
}

.itdb-btn-secondary {
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
}

.itdb-btn-secondary:hover {
    background: #e9e9ea;
}

.itdb-btn-toggle {
    background: #fff;
    color: #ce0e16;
    border: 1px solid #ce0e16;
}

.itdb-btn-toggle.active {
    background: #ce0e16;
    color: white;
}

.itdb-btn-toggle:hover {
    background: #e9e9ea;
}

.itdb-btn-toggle.active:hover {
    background: #b60c13;
}

/* View Toggle */
.itdb-view-toggle {
    margin-bottom: 20px;
}

/* Map */
.itdb-map {
    margin-bottom: 30px;
}

#map-container {
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

/* Grid Layout */
.itdb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Cards */
.itdb-card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    font-size: 16px;
    display: flex;
    flex-direction: column;
}

.itdb-card-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
    margin: 20px;

}

.itdb-card-title {
    font-size: 20px;
    margin: 0 0 2px 0;
    font-weight: 600;
    color: #ce0e16;
}

.itdb-practice {
    line-height: 1.25;
    margin-top: 0;
}

.itdb-profession {
    font-weight: bold;
}

.itdb-card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-inline: 20px;
}

.itdb-expertise {
    margin-top: 15px;
}

.itdb-qualifications {
    padding-block: 20px;
    border-radius: 3px;
    margin-top: auto;
    border-top: 1px solid #ddd;
}

.itdb-tag-qualification {}

.itdb-tag {
    display: inline-block;
    padding: 3px 6px;
    margin: 3px 1px;
    font-size: 14px;
    border-radius: 6px;
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid;
}

.itdb-tag-expertise {
    background: #fff;
    color: #ce0e16;
    border-color: #ce0e16;
}

/* Description */
.itdb-description p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

/* Contact Information */
.itdb-contact {
    margin-bottom: 15px;
}

.itdb-contact>div:last-child {
    margin-bottom: 0;
}

.itdb-contact strong {
    display: inline-block;
    min-width: 80px;
    color: #333;
    font-weight: 600;
}

.itdb-contact a {
    color: #ce0e16;
    text-decoration: none;
}

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

/* Loading and No Results */
.itdb-loading,
.itdb-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.itdb-loading {
    font-style: italic;
}

.itdb-no-results p {
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .itdb-container {
        padding: 15px;
    }

    .itdb-filters {
        padding: 15px;
    }

    .itdb-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .itdb-card {
        padding: 15px;
    }

    .filter-group select {
        max-width: 100%;
    }

    .itdb-btn-primary,
    .itdb-btn-secondary,
    .itdb-btn-toggle {
        margin-bottom: 10px;
        margin-right: 5px;
    }

    .itdb-view-toggle {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .itdb-container {
        padding: 10px;
    }

    .itdb-filters {
        padding: 10px;
    }

    .itdb-card {
        padding: 12px;
    }

    .itdb-card-title {
        font-size: 18px;
    }

    .itdb-contact strong {
        display: block;
        margin-bottom: 2px;
        min-width: auto;
    }
}

/* Pagination */
.itdb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 5px;
}

.itdb-pagination-info {
    text-align: center;
    margin: 15px 0;
    color: #666;
    font-size: 14px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.pagination-btn:hover {
    background: #f0f0f1;
    border-color: #999;
}

.pagination-btn.active {
    background: #ce0e16;
    color: white;
    border-color: #ce0e16;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-dots {
    padding: 8px 4px;
    color: #999;
}

/* API Key Error Message */
.itdb-map-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    margin: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.itdb-map-error p {
    margin: 0 0 10px 0;
}

.itdb-map-error p:last-child {
    margin-bottom: 0;
}

.itdb-map-error strong {
    font-weight: 600;
}

/* Print Styles */
@media print {

    .itdb-filters,
    .itdb-view-toggle,
    .itdb-map,
    .itdb-pagination,
    .itdb-pagination-info,
    .itdb-map-error {
        display: none !important;
    }

    .itdb-card {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}