/* ==========================================================================
   PawPrint Valley Pet Sanctuary & Companions System Stylesheet (css/pets.css)
   ========================================================================== */

/* 1. Modal Container & Glassmorphic Shell */
.pet-sanctuary-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10005;
}

.pet-sanctuary-card {
    width: 680px;
    max-width: 95vw;
    max-height: 88vh;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.15);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 2. Modal Header */
.pet-sanctuary-card .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pet-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pet-header-title h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pet-badge-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

/* 3. Navigation Tabs */
.pet-nav-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 16px;
    gap: 8px;
}

.pet-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-tab:hover {
    color: #f1f5f9;
}

.pet-tab.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
}

/* 4. Body Content Container */
.pet-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* 5. Care Tab Layout */
.pet-care-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .pet-care-grid {
        grid-template-columns: 1fr;
    }
}

.pet-preview-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pet-avatar-hero {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.pet-preview-box h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 800;
}

.pet-breed-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 4px 0 14px 0;
}

.pet-rename-row {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}

.pet-rename-row input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.85rem;
    outline: none;
}

.pet-rename-row input:focus {
    border-color: #f59e0b;
}

.pet-rename-row button {
    padding: 6px 12px;
    font-size: 0.82rem;
}

/* Collar & Charm Customization */
.pet-collar-swatches {
    width: 100%;
    margin-top: 12px;
    text-align: left;
}

.pet-collar-swatches label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.collar-swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.collar-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease;
}

.collar-swatch:hover {
    transform: scale(1.15);
}

.collar-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.pet-charm-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.charm-btn {
    flex: 1;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.charm-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
}

.charm-btn.active {
    background: rgba(245, 158, 11, 0.3);
    border-color: #f59e0b;
}

/* Motives Panel */
.pet-motives-panel {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.pet-motives-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pet-motives-panel h4 {
    margin: 0;
    color: #f59e0b;
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pet-state-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.pet-motive-bar-wrap {
    margin-bottom: 10px;
}

.motive-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.motive-track {
    width: 100%;
    height: 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.motive-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.fill-hunger { background: linear-gradient(90deg, #ef4444, #f59e0b); }
.fill-energy { background: linear-gradient(90deg, #0ea5e9, #06b6d4); }
.fill-affection { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.fill-fun { background: linear-gradient(90deg, #10b981, #34d399); }

/* Quick Action Buttons */
.pet-actions-quick-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pet-actions-quick-row button {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

/* Stats Footer */
.pet-stats-box {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

.pet-stats-box strong {
    display: block;
    font-size: 0.95rem;
    color: #f59e0b;
    margin-top: 2px;
}

/* 6. Tricks Tab */
.trick-level-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.trick-level-banner h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fbbf24;
}

.trick-level-banner p {
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.trick-xp-badge {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
}

.tricks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.trick-card.unlocked {
    border-color: rgba(245, 158, 11, 0.25);
}

.trick-card.locked {
    opacity: 0.55;
    background: rgba(15, 23, 42, 0.3);
}

.trick-icon {
    font-size: 2rem;
    line-height: 1;
}

.trick-info {
    flex: 1;
}

.trick-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trick-req-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.trick-card.unlocked .trick-req-pill {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.trick-info p {
    margin: 4px 0 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.trick-action-col {
    display: flex;
    align-items: center;
}

/* 7. Adoption Grid */
.pet-adopt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.adopt-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.adopt-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.4);
}

.adopt-card.current-pet {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.adopt-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 6px;
}

.adopt-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 800;
}

.adopt-breed {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.adopt-desc {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

.adopt-food {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0 0 12px 0;
}

.adopt-actions {
    width: 100%;
    margin-top: auto;
}

.adopt-actions button {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.active-pet-tag {
    display: inline-block;
    color: #10b981;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.adopt-free-switch-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.adopt-free-switch-btn:hover {
    background: rgba(59, 130, 246, 0.35);
}

.pet-adopt-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    display: none;
}

.pet-adopt-feedback.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.pet-adopt-feedback.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #86efac;
}
