/**
 * Pets list — /pets
 * Global stylesheet (loaded via _Master.cshtml).
 * Phase 1: front-end modernization of the pets table.
 */

.rx-pets {
    --rx-pets-radius: 14px;
    --rx-pets-border: 1px solid #e8edf3;
    --rx-pets-ink: #1a2a3a;
    --rx-pets-muted: #64748b;
    --rx-pets-faint: #94a3b8;
}

/* —— Filter bar —— */
.rx-pets-filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border: var(--rx-pets-border);
    border-radius: var(--rx-pets-radius);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(26, 42, 58, 0.04);
}

.rx-pets-filterbar .rx-pets-search {
    flex: 1 1 280px;
    min-width: 220px;
}

.rx-pets-filterbar .rx-pets-filter {
    flex: 0 1 170px;
    min-width: 140px;
}

.rx-pets-filterbar .rx-pets-clear {
    margin-left: auto;
    text-transform: none;
    flex-shrink: 0;
}

/* —— Card wrapper around the table —— */
.rx-pets-card {
    background: #ffffff;
    border: var(--rx-pets-border);
    border-radius: var(--rx-pets-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(26, 42, 58, 0.04);
}

/* —— Table —— */
.rx-pets-table .mud-table-head th {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--rx-pets-muted);
    background: #f8fafc;
    border-bottom: 1px solid #e8edf3;
    white-space: nowrap;
}

.rx-pets-table .mud-table-row:hover {
    background: #f8fafc !important;
}

.rx-pets-table td {
    font-size: 0.8125rem;
    color: var(--rx-pets-ink);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Name cell */
.rx-pets-name {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.rx-pets-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e8edf3;
    flex-shrink: 0;
    background: #f1f5f9;
}

.rx-pets-avatar--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffe6de, #fff5f2);
    color: #ff8a6f;
}

.rx-pets-name__name {
    font-weight: 600;
    color: var(--rx-pets-ink);
    line-height: 1.2;
}

.rx-pets-name__id {
    font-size: 0.6875rem;
    color: var(--rx-pets-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    line-height: 1.3;
}

/* Owner cell */
.rx-pets-owner__name {
    font-weight: 500;
    line-height: 1.2;
}

.rx-pets-owner__phone {
    font-size: 0.6875rem;
    color: var(--rx-pets-faint);
    line-height: 1.3;
}

/* DOB cell */
.rx-pets-dob__date {
    line-height: 1.2;
}

.rx-pets-dob__age {
    font-size: 0.6875rem;
    color: var(--rx-pets-faint);
    line-height: 1.3;
}

/* Gender cell */
.rx-pets-gender {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.rx-pets-gender .mud-icon-root {
    font-size: 1.05rem;
}

/* Status chip */
.rx-pets-status {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
}

.rx-pets-status--active {
    background: #dcfce7;
    color: #15803d;
}

.rx-pets-status--inactive {
    background: #f1f5f9;
    color: #64748b;
}

.rx-pets-muted {
    color: var(--rx-pets-faint);
}

/* Actions cell */
.rx-pets-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
}

.rx-pets-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 54px;
    padding: 0.3rem 0.35rem;
    border: none;
    background: transparent;
    color: var(--rx-pets-muted);
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
    font: inherit;
}

.rx-pets-action span {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

.rx-pets-action .mud-icon-root {
    font-size: 1.15rem;
}

.rx-pets-action:hover {
    background: #eef4ff;
    color: #2563eb;
}

.rx-pets-action--danger:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* Pager */
.rx-pets-table .mud-table-pagination {
    border-top: 1px solid #e8edf3;
}

@media (max-width: 700px) {
    .rx-pets-filterbar .rx-pets-clear {
        margin-left: 0;
    }
}
