/* ============================================
   GOALS LIST STYLES - Issue #57
   ============================================ */

/* Goals Grid */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    animation: fadeIn 0.3s ease;
}

/* Goal Card - Figma Design horizontal accent-bar style */
.goal-card { background:white; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.07); cursor:pointer; transition:all 0.2s ease; display:flex; align-items:stretch; overflow:hidden; padding:0; border:none; }
.goal-card:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,0.12); }
.goal-card-accent { width:6px; flex-shrink:0; }
.goal-card-body { flex:1; padding:16px 20px; display:flex; flex-direction:column; gap:8px; }
.goal-card-top { display:flex; justify-content:space-between; align-items:center; }
.goal-card-percent { font-size:14px; font-weight:700; color:#333; }
.goal-card-progress-bar { height:6px; background:#F0F0F0; border-radius:3px; overflow:hidden; }
.goal-card-progress-fill { height:100%; border-radius:3px; transition:width 0.3s ease; }
.goal-card-bottom { display:flex; align-items:center; }
.goal-card-time { font-size:13px; color:#999; }

/* Goal Header */
.goal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.goal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.goal-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-active {
    background: #D4EDDA;
    color: #28A745;
}

.status-paused {
    background: #FFF3CD;
    color: #856404;
}

.status-completed {
    background: #D1ECF1;
    color: #0C5460;
}

/* Goal Description */
.goal-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Progress Bar */
.goal-progress {
    margin-bottom: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-info span:first-child {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.progress-percentage {
    font-size: 14px;
    font-weight: 700;
    color: #4ECDC4;
}

.progress-bar {
    height: 8px;
    background: #F0F0F0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ECDC4 0%, #44A3D5 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Goal Meta */
.goal-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #F0F0F0;
}

.goal-deadline,
.goal-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.meta-icon {
    font-size: 16px;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.loading-state p {
    margin-top: 20px;
    color: #999;
    font-size: 16px;
}

.spinner-large {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4ECDC4;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/* Error State */
.error-state {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.error-state h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 12px 0;
}

.error-state p {
    font-size: 16px;
    color: #999;
    margin: 0 0 24px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .goals-grid {
        grid-template-columns: 1fr;
    }
    
    .goal-card {
        padding: 20px;
    }
    
    .goal-title {
        font-size: 18px;
    }
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
