/**
 * Day Planner - Custom Styles
 */

/* Root variables */
:root {
    --dp-primary: #0d6efd;
    --dp-success: #198754;
    --dp-warning: #ffc107;
    --dp-danger: #dc3545;
    --dp-info: #0dcaf0;
}

/* Body */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.075);
}

/* Stats cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Progress rings */
.progress-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring .progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Kid avatars */
.kid-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.kid-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.kid-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

/* Goal cards */
.goal-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.goal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.goal-card.completed {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.goal-card.completed .card-body {
    text-decoration: line-through;
}

/* Reward cards */
.reward-card {
    transition: transform 0.2s ease;
}

.reward-card:hover {
    transform: scale(1.02);
}

.reward-card .reward-cost {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Job cards */
.job-card {
    border-left: 4px solid var(--dp-primary);
}

.job-card.claimed {
    border-left-color: var(--dp-warning);
}

.job-card.completed {
    border-left-color: var(--dp-success);
}

/* Transaction list */
.transaction-list .transaction-item {
    border-left: 3px solid transparent;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.transaction-list .transaction-item.positive {
    border-left-color: var(--dp-success);
}

.transaction-list .transaction-item.negative {
    border-left-color: var(--dp-danger);
}

/* Health module */
.meal-card {
    border-left: 4px solid #dee2e6;
}

.meal-card.breakfast { border-left-color: #ffc107; }
.meal-card.lunch { border-left-color: #20c997; }
.meal-card.dinner { border-left-color: #6f42c1; }
.meal-card.snack { border-left-color: #fd7e14; }

.calorie-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calorie-indicator.under-target {
    color: var(--dp-success);
}

.calorie-indicator.over-target {
    color: var(--dp-danger);
}

/* Weight chart placeholder */
.weight-chart {
    min-height: 200px;
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.1) 0%, transparent 100%);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Leaderboard */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.leaderboard-item:nth-child(1) {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.2) 0%, transparent 100%);
}

.leaderboard-item:nth-child(2) {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.2) 0%, transparent 100%);
}

.leaderboard-item:nth-child(3) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.2) 0%, transparent 100%);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    width: 40px;
    text-align: center;
}

/* Toast notifications */
.toast-container {
    z-index: 1100;
}

/* Form enhancements */
.form-floating > label {
    color: #6c757d;
}

/* Quick action buttons */
.quick-action {
    padding: 1.5rem;
    text-align: center;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.quick-action i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 2rem;
    }

    .kid-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Badges */
.badge-points {
    background-color: var(--dp-info);
    color: white;
}

.badge-cash {
    background-color: var(--dp-success);
    color: white;
}

/* Animation for completed goals */
@keyframes goalComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.goal-completed-animation {
    animation: goalComplete 0.5s ease;
}

/* Sidebar navigation for portals */
.portal-sidebar {
    position: sticky;
    top: 80px;
}

.portal-sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.portal-sidebar .nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.portal-sidebar .nav-link.active {
    background-color: var(--dp-primary);
    color: white;
}

/* Ingredient categories */
.ingredient-category {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.ingredient-category.protein { background-color: #dc3545; color: white; }
.ingredient-category.vegetable { background-color: #198754; color: white; }
.ingredient-category.fruit { background-color: #fd7e14; color: white; }
.ingredient-category.grain { background-color: #ffc107; color: black; }
.ingredient-category.dairy { background-color: #0dcaf0; color: black; }
.ingredient-category.spice { background-color: #6f42c1; color: white; }
.ingredient-category.other { background-color: #6c757d; color: white; }
