/* Inkgdom - Cozy theme styles */

/* Tracking timeline */
.tracking-step {
    position: relative;
    padding-left: 2rem;
}
.tracking-step::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 1.5rem;
    bottom: -0.5rem;
    width: 2px;
    background: #e6d7b0;
}
.tracking-step:last-child::before {
    display: none;
}
.tracking-step .step-dot {
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid #d9c28d;
    background: #fdfaf2;
}
.tracking-step.active .step-dot {
    background: #5a8a5a;
    border-color: #3d6b3d;
}
.tracking-step.completed .step-dot {
    background: #8bb88a;
    border-color: #5a8a5a;
}

/* Character card rarity borders (cozy palette) */
.rarity-common { border-color: #d9c28d; }
.rarity-uncommon { border-color: #8abbd1; }
.rarity-rare { border-color: #d68a8a; }
.rarity-legendary { border-color: #c48a3d; box-shadow: 0 0 16px rgba(196,138,61,0.2); }

/* Letter compose textarea */
.letter-compose {
    background: linear-gradient(180deg, #fdfaf2, #f9f3e3);
    border: 2px solid #e6d7b0;
    color: #4a3728;
    resize: vertical;
    min-height: 220px;
    border-radius: 14px;
    padding: 1rem 1.25rem;
}
.letter-compose:focus {
    outline: none;
    border-color: #8bb88a;
    box-shadow: 0 0 0 3px rgba(139,184,138,0.2);
}

/* Reusable cozy components (fallbacks if layout-level styles absent) */
.cozy-card {
    background: linear-gradient(145deg, #fffcf5, #f9f3e3);
    border: 2px solid #e6d7b0;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(120,90,50,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
}
.wood-frame {
    background: linear-gradient(145deg, #fffcf5, #f9f3e3);
    border: 4px solid #a88968;
    border-radius: 20px;
    box-shadow: 0 3px 12px rgba(74,55,40,0.12);
}
.meadow-bg {
    background: linear-gradient(180deg, #f9f3e3 0%, #f0e6cc 40%, #d9ead1 85%, #8bb88a 100%);
}

/* Avatar sizes */
.avatar-xs { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.avatar-md { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 40px; }
.avatar-xl { width: 112px; height: 112px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 52px; }

.avatar-common { background: #f9f3e3; border: 2px solid #d9c28d; }
.avatar-uncommon { background: #d9e8f0; border: 2px solid #8abbd1; }
.avatar-rare { background: #f3e0e6; border: 2px solid #d68a8a; }
.avatar-legendary { background: #f0d9a0; border: 2px solid #c48a3d; box-shadow: 0 0 12px rgba(196,138,61,0.3); }

/* Ink color text utilities */
.ink-walnut { color: #3e2a14; }
.ink-sepia  { color: #6b4423; }
.ink-blood  { color: #7a1f1f; }
.ink-royal  { color: #1e3a5f; }
.ink-forest { color: #1f4a2e; }
.ink-violet { color: #4a1f5c; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.4s ease-out; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }

@keyframes envelopeOpen {
    0% { transform: rotateX(0deg) scale(1); }
    40% { transform: rotateX(-180deg) scale(1.05); }
    100% { transform: rotateX(-180deg) scale(1); }
}
.animate-envelope-open { animation: envelopeOpen 0.9s ease-in-out forwards; transform-origin: top; }

@keyframes sendFly {
    0% { transform: translate(0,0) rotate(0); opacity: 1; }
    60% { transform: translate(60%, -40%) rotate(-10deg); opacity: 0.9; }
    100% { transform: translate(140%, -120%) rotate(-18deg); opacity: 0; }
}
.animate-send { animation: sendFly 1.1s ease-in forwards; }

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e6d7b0;
    background: #f9f3e3;
    color: #6b4f35;
}
