/* ========================================
   Active Project Progress Component
   A compact, reusable funding progress display
   ======================================== */

.app-project {
    background: var(--surface-1);
    border: 1px solid var(--theme-border-color);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent on left border */
.app-project::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #10b981, #0ea5e9);
    border-radius: 3px 0 0 3px;
}

.app-project--funded::before {
    background: linear-gradient(180deg, #10b981, #34d399);
}

/* Header */
.app-project__header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.app-project__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(14, 165, 233, 0.1));
    border-radius: 8px;
    color: var(--theme-success);
}

.app-project--funded .app-project__icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.15));
}

.app-project__label {
    flex: 1;
    min-width: 0;
}

.app-project__eyebrow {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--theme-text-muted);
    margin-bottom: 0.125rem;
}

.app-project__title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.app-project__title:hover {
    color: var(--theme-primary);
}

/* Progress Bar */
.app-project__progress {
    margin-bottom: 0.75rem;
}

.app-project__track {
    height: 8px;
    background: var(--surface-3, rgba(0, 0, 0, 0.08));
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

[data-bs-theme="dark"] .app-project__track {
    background: rgba(255, 255, 255, 0.1);
}

.app-project__fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Shimmer effect for completed */
.app-project__shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
    border-radius: 999px;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Stats Row */
.app-project__stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.app-project__amount {
    font-size: 0.8125rem;
    color: var(--theme-text-secondary);
}

.app-project__raised {
    font-weight: 700;
    color: var(--theme-success);
}

.app-project__separator {
    margin: 0 0.25rem;
    color: var(--theme-text-muted);
}

.app-project__goal {
    color: var(--theme-text-secondary);
}

.app-project__percent {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--theme-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.app-project__percent--complete {
    color: var(--theme-success);
}

.app-project__check {
    color: var(--theme-success);
}

/* CTA Link */
.app-project__cta {
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--theme-border-color);
}

.app-project__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--theme-primary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.app-project__link:hover {
    gap: 0.5rem;
    color: var(--theme-primary-hover, var(--theme-primary));
}

.app-project__link svg {
    transition: transform 0.15s ease;
}

.app-project__link:hover svg {
    transform: translateX(2px);
}

/* Funded state link */
.app-project--funded .app-project__link {
    color: var(--theme-success);
}

/* ========================================
   Variant: Compact
   Smaller, no CTA, minimal padding
   ======================================== */

.app-project--compact {
    padding: 0.75rem;
}

.app-project--compact .app-project__header {
    margin-bottom: 0.625rem;
}

.app-project--compact .app-project__icon {
    width: 28px;
    height: 28px;
}

.app-project--compact .app-project__icon svg {
    width: 14px;
    height: 14px;
}

.app-project--compact .app-project__eyebrow {
    font-size: 0.625rem;
}

.app-project--compact .app-project__title {
    font-size: 0.8125rem;
}

.app-project--compact .app-project__track {
    height: 6px;
}

.app-project--compact .app-project__progress {
    margin-bottom: 0.5rem;
}

.app-project--compact .app-project__amount,
.app-project--compact .app-project__percent {
    font-size: 0.75rem;
}

/* ========================================
   Variant: Inline
   Horizontal layout for tight spaces
   ======================================== */

.app-project--inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
}

.app-project--inline::before {
    display: none;
}

.app-project--inline .app-project__header {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.app-project--inline .app-project__icon {
    width: 28px;
    height: 28px;
}

.app-project--inline .app-project__label {
    max-width: 140px;
}

.app-project--inline .app-project__eyebrow {
    display: none;
}

.app-project--inline .app-project__title {
    font-size: 0.8125rem;
}

.app-project--inline .app-project__progress {
    flex: 1;
    min-width: 80px;
    margin-bottom: 0;
}

.app-project--inline .app-project__track {
    height: 6px;
}

.app-project--inline .app-project__stats {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.app-project--inline .app-project__amount {
    font-size: 0.75rem;
}

.app-project--inline .app-project__percent {
    font-size: 0.6875rem;
}

.app-project--inline .app-project__cta {
    display: none;
}

/* ========================================
   Responsive adjustments
   ======================================== */

@media (max-width: 575px) {
    .app-project--inline {
        flex-wrap: wrap;
    }

    .app-project--inline .app-project__progress {
        flex: 1 0 100%;
        order: 3;
        margin-top: 0.5rem;
    }

    .app-project--inline .app-project__label {
        max-width: none;
        flex: 1;
    }
}
