/* ============================================================
   Straßenhunde Rumänien – Hundeübersicht Plugin CSS
   Theme-kompatibel: Nutzt CSS-Variablen & erbt vom Theme
   ============================================================ */

/* ---- CSS Variablen (überschreibbar per Theme) ---- */
:root {
    --shr-primary:        #c0392b;
    --shr-primary-dark:   #96281b;
    --shr-primary-light:  #e74c3c;
    --shr-accent:         #e67e22;
    --shr-bg:             #f8f8f6;
    --shr-card-bg:        #ffffff;
    --shr-text:           #2c2c2c;
    --shr-text-muted:     #6b6b6b;
    --shr-border:         #e2e2e2;
    --shr-radius:         12px;
    --shr-radius-sm:      8px;
    --shr-shadow:         0 2px 12px rgba(0,0,0,0.08);
    --shr-shadow-hover:   0 8px 28px rgba(0,0,0,0.14);
    --shr-transition:     0.22s ease;
    --shr-font:           inherit;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.shr-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: var(--shr-font);
    color: var(--shr-text);
    position: relative;
}

/* ============================================================
   FILTERLEISTE
   ============================================================ */
.shr-filter-bar {
    background: var(--shr-card-bg);
    border: 1px solid var(--shr-border);
    border-radius: var(--shr-radius);
    padding: 20px 24px;
    margin-bottom: 32px;
    box-shadow: var(--shr-shadow);
}

.shr-filter-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 14px;
}

.shr-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shr-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--shr-text-muted);
}

.shr-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shr-filter-btn {
    background: var(--shr-bg);
    color: var(--shr-text);
    border: 1.5px solid var(--shr-border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13.5px;
    cursor: pointer;
    transition: all var(--shr-transition);
    white-space: nowrap;
    line-height: 1.4;
    font-family: var(--shr-font);
}

.shr-filter-btn:hover {
    border-color: var(--shr-primary);
    color: var(--shr-primary);
    background: #fff5f5;
}

.shr-filter-btn.active {
    background: var(--shr-primary);
    color: #fff;
    border-color: var(--shr-primary);
    font-weight: 600;
}

.shr-filter-results-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--shr-text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--shr-border);
}

#shr-count {
    font-weight: 700;
    color: var(--shr-primary);
    font-size: 16px;
}

.shr-reset-all {
    background: none;
    border: none;
    color: var(--shr-primary);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background var(--shr-transition);
    font-family: var(--shr-font);
}
.shr-reset-all:hover {
    background: #ffe8e8;
}

/* ============================================================
   HUNDE-GRID
   ============================================================ */
.shr-hunde-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    min-height: 200px;
    transition: opacity 0.2s ease;
}

.shr-hunde-grid.loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ============================================================
   HUND-KARTE
   ============================================================ */
.shr-hund-card {
    background: var(--shr-card-bg);
    border-radius: var(--shr-radius);
    overflow: hidden;
    box-shadow: var(--shr-shadow);
    transition: transform var(--shr-transition), box-shadow var(--shr-transition);
    position: relative;
}

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

.shr-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Bild */
.shr-card-image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--shr-bg);
}

.shr-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

.shr-hund-card:hover .shr-card-image {
    transform: scale(1.05);
}

.shr-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* Status-Badge */
.shr-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}

.shr-status-sucht_zuhause {
    background: rgba(21, 101, 192, 0.9);
    color: #fff;
}
.shr-status-reserviert {
    background: rgba(245, 127, 23, 0.9);
    color: #fff;
}
.shr-status-vermittelt {
    background: rgba(46, 125, 50, 0.9);
    color: #fff;
}

/* Handicap-Badge */
.shr-handicap-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 13px;
}

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

.shr-card-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--shr-text);
    line-height: 1.3;
}

.shr-geschlecht-icon {
    font-size: 16px;
    font-weight: 700;
}
.shr-geschlecht-icon.shr-ruede   { color: #1565c0; }
.shr-geschlecht-icon.shr-huendin { color: #ad1457; }

.shr-card-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shr-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--shr-text-muted);
}

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

.shr-card-cta {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--shr-primary);
    margin-top: 4px;
    transition: gap var(--shr-transition);
}

.shr-hund-card:hover .shr-card-cta {
    letter-spacing: 0.03em;
}

/* Vermittelt-Karte ausgrauen */
.shr-hund-card.status-vermittelt {
    opacity: 0.65;
}
.shr-hund-card.status-vermittelt .shr-card-image {
    filter: grayscale(40%);
}

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

.shr-no-results-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
}

.shr-no-results a {
    color: var(--shr-primary);
}

/* ============================================================
   LOADING
   ============================================================ */
.shr-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.6);
    z-index: 10;
    border-radius: var(--shr-radius);
}

.shr-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--shr-border);
    border-top-color: var(--shr-primary);
    border-radius: 50%;
    animation: shr-spin 0.7s linear infinite;
}

@keyframes shr-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.shr-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--shr-border);
}

.shr-page-btn {
    background: var(--shr-card-bg);
    border: 1.5px solid var(--shr-border);
    color: var(--shr-text);
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--shr-transition);
    font-family: var(--shr-font);
}

.shr-page-btn:hover:not(:disabled) {
    border-color: var(--shr-primary);
    color: var(--shr-primary);
}

.shr-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.shr-page-info {
    font-size: 14px;
    color: var(--shr-text-muted);
}

/* ============================================================
   DETAILSEITE (single-hund)
   ============================================================ */
.shr-single-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    font-family: var(--shr-font);
    color: var(--shr-text);
}

.shr-breadcrumb {
    margin-bottom: 20px;
}

.shr-back-link {
    color: var(--shr-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--shr-transition);
}
.shr-back-link:hover { color: var(--shr-primary); }

.shr-single-hund {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Galerie */
.shr-galerie-section {
    position: sticky;
    top: 24px;
}

.shr-main-image-wrap {
    position: relative;
    border-radius: var(--shr-radius);
    overflow: hidden;
    background: var(--shr-bg);
    aspect-ratio: 4/3;
    margin-bottom: 10px;
    box-shadow: var(--shr-shadow);
}

.shr-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.shr-status-badge-large {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}
.shr-status-sucht  { background: rgba(21,101,192,0.9); color:#fff; }
.shr-status-reserviert { background: rgba(245,127,23,0.9); color:#fff; }
.shr-status-vermittelt { background: rgba(46,125,50,0.9); color:#fff; }

.shr-handicap-badge-large {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.shr-thumb-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.shr-thumb-btn {
    border: 2.5px solid transparent;
    border-radius: var(--shr-radius-sm);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    width: 72px;
    height: 72px;
    background: var(--shr-bg);
    flex-shrink: 0;
    transition: border-color var(--shr-transition);
}

.shr-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shr-thumb-btn.active,
.shr-thumb-btn:hover {
    border-color: var(--shr-primary);
}

.shr-no-image-placeholder {
    aspect-ratio: 4/3;
    background: var(--shr-bg);
    border-radius: var(--shr-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 48px;
    color: var(--shr-text-muted);
    gap: 8px;
}

/* Single Info */
.shr-single-info {
    padding-top: 8px;
}

.shr-single-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--shr-text);
    line-height: 1.2;
}

.shr-section-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--shr-text-muted);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--shr-primary);
    display: inline-block;
}

.shr-steckbrief {
    margin-bottom: 32px;
}

.shr-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
}

.shr-info-table th,
.shr-info-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--shr-border);
    vertical-align: top;
}

.shr-info-table th {
    color: var(--shr-text-muted);
    font-weight: 600;
    width: 40%;
    white-space: nowrap;
}

.shr-info-table td {
    color: var(--shr-text);
}

.shr-status-inline {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.shr-status-inline.shr-status-sucht     { background: #e3f2fd; color: #1565c0; }
.shr-status-inline.shr-status-reserviert{ background: #fff8e1; color: #f57f17; }
.shr-status-inline.shr-status-vermittelt{ background: #e8f5e9; color: #2e7d32; }

.shr-beschreibung {
    margin-bottom: 32px;
}

.shr-beschreibung-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--shr-text);
}

.shr-cta-box {
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    border: 1.5px solid #f5c6c6;
    border-radius: var(--shr-radius);
    padding: 20px 24px;
    text-align: center;
}

.shr-cta-box p {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    color: var(--shr-text);
}

.shr-btn-primary {
    display: inline-block;
    background: var(--shr-primary);
    color: #fff !important;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    transition: background var(--shr-transition), transform var(--shr-transition);
    box-shadow: 0 4px 14px rgba(192, 57, 43, 0.35);
}

.shr-btn-primary:hover {
    background: var(--shr-primary-dark);
    transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .shr-single-hund {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .shr-galerie-section {
        position: static;
    }
    .shr-single-name {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .shr-hunde-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
    .shr-filter-inner {
        gap: 14px;
    }
    .shr-filter-bar {
        padding: 14px;
    }
    .shr-filter-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
    .shr-card-name {
        font-size: 15px;
    }
}
