﻿/**
 * UI COMPONENTS
 * =============
 * 
 * Cards, Alerts, Badges, Lists, and Other UI Elements
 * These components provide consistent styling for common UI patterns
 * and automatically adapt to the active theme colors.
 */

/* Base section card styling */
.section-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 4px solid var(--primary); /* Theme-colored left border */
}

    /* Individual theme colors for section cards */
    .section-card.card-nature {
        border-left: 4px solid #4caf50;
    }

        .section-card.card-nature .heading-primary {
            color: #2e7d32;
        }

        .section-card.card-nature .section-label {
            color: #4caf50;
        }

    .section-card.card-sky {
        border-left: 4px solid #2196f3;
    }

        .section-card.card-sky .heading-primary {
            color: #1565c0;
        }

        .section-card.card-sky .section-label {
            color: #2196f3;
        }

    .section-card.card-sunset {
        border-left: 4px solid #ff7043;
    }

        .section-card.card-sunset .heading-primary {
            color: #d84315;
        }

        .section-card.card-sunset .section-label {
            color: #ff7043;
        }

    .section-card.card-mystical {
        border-left: 4px solid #7e57c2;
    }

        .section-card.card-mystical .heading-primary {
            color: #512da8;
        }

        .section-card.card-mystical .section-label {
            color: #7e57c2;
        }

/* Section Number Badges */
.section-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    font-family: "gelica", sans-serif;
}

.section-number-nature {
    background: linear-gradient(135deg, #4caf50, #81c784);
    border: 3px solid #2e7d32;
}

.section-number-sky {
    background: linear-gradient(135deg, #2196f3, #64b5f6);
    border: 3px solid #1565c0;
}

.section-number-mystical {
    background: linear-gradient(135deg, #7e57c2, #9e8cc2);
    border: 3px solid #512da8;
}

.section-number-sunset {
    background: linear-gradient(135deg, #ff7043, #ff8a65);
    border: 3px solid #d84315;
}

.card-link:hover .section-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.card-link:focus .section-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.card-link:active .section-number {
    transform: scale(0.95);
}

/* UI Cards */
.ui-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

    .ui-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.ui-card-themed {
    border-left: 4px solid var(--primary);
}

.ui-card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.ui-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* Alert Components */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #15803d;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.alert-info {
    background: var(--bg-tint);
    border-color: var(--primary);
    color: var(--text-primary);
}

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-secondary {
    background: var(--bg-tint);
    color: var(--text-primary);
}

.badge-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Styled Lists */
.styled-list {
    list-style: none;
    padding: 0;
}

.styled-list-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

    .styled-list-item:last-child {
        border-bottom: none;
    }

.styled-list-icon {
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    margin-top: 0.525rem;
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* Avatar Components */
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.avatar-large {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
}

.avatar-small {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

/* Profile avatar enhancements */
.profile-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    font-family: "gelica", sans-serif;
    border: 3px solid var(--bg-tint);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
