/* ============================================
   AUTHENTICATED HOME PAGE STYLES
   Used by Pages/Home/Home.razor
   
   Theme variables are defined in: themes/theme-variables.css
   ============================================ */

/* Import theme variables */
@import url('themes/theme-variables.css');

/* ============================================
   AUTHENTICATED PAGE CONTAINER
   ============================================ */
.authenticated-page,
.home-authenticated {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease;
}

/* ============================================
   THEME BACKGROUNDS
   ============================================ */
.home-authenticated.theme-cloud {
    background: var(--theme-page-bg);
}

.home-authenticated.theme-space {
    background: var(--theme-page-bg);
}

.home-authenticated.theme-winter {
    background: var(--theme-page-bg);
}

.home-authenticated.theme-nature {
    background: var(--theme-page-bg);
}

.home-authenticated.theme-ocean {
    background: var(--theme-page-bg);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.home-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.home-authenticated .hero-section {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 20px;
}

.home-authenticated .hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
    color: var(--theme-text-primary);
    text-shadow: var(--theme-title-shadow);
}

.home-authenticated .hero-subtitle {
    font-size: 1rem;
    margin: 0 0 20px;
    color: var(--theme-text-secondary);
    text-shadow: var(--theme-subtitle-shadow);
}

.home-authenticated .search-wrapper {
    max-width: 580px;
    margin: 0 auto;
}

/* ============================================
   QUICK STATS SECTION
   ============================================ */
.quick-stats-section {
    margin-bottom: 32px;
}

.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.quick-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--theme-card-bg, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--theme-card-border, rgba(255, 255, 255, 0.1));
}

.quick-stat-card:hover {
    transform: translateY(-2px);
    background: var(--theme-card-hover-bg, rgba(255, 255, 255, 0.15));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Theme-specific card backgrounds */
.theme-cloud .quick-stat-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(99, 102, 241, 0.1);
}

.theme-cloud .quick-stat-card:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.tasks-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.stat-icon.goals-icon {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.stat-icon.objectives-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-svg {
    width: 22px;
    height: 22px;
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--theme-text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--theme-text-secondary);
    white-space: nowrap;
}

/* ============================================
   TOOLS SECTION
   ============================================ */
.tools-section,
.categories-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--theme-text-primary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--theme-card-bg, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--theme-card-border, rgba(255, 255, 255, 0.1));
}

.tool-card:hover {
    transform: translateX(4px);
    background: var(--theme-card-hover-bg, rgba(255, 255, 255, 0.15));
}

.theme-cloud .tool-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(99, 102, 241, 0.1);
}

.theme-cloud .tool-card:hover {
    background: rgba(255, 255, 255, 0.9);
}

.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-icon-svg {
    width: 20px;
    height: 20px;
    color: white;
}

.tool-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tool-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--theme-text-primary);
}

.tool-desc {
    font-size: 0.8rem;
    color: var(--theme-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-arrow {
    width: 18px;
    height: 18px;
    opacity: 0;
    transition: all 0.2s ease;
    color: var(--theme-chip-color, #a855f7);
    flex-shrink: 0;
}

.tool-card:hover .tool-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--theme-chip-bg);
    color: var(--theme-chip-color);
    border: 1px solid var(--theme-chip-border);
}

.category-chip:hover {
    background: var(--theme-chip-hover-bg);
    transform: translateY(-1px);
}

.category-svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   FOOTER ACTIONS
   ============================================ */
.home-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 24px;
}

.theme-toggle-wrapper {
    /* Theme toggle positioned on left */
}

.dashboard-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    background: var(--theme-cta-gradient, linear-gradient(135deg, #6366f1, #a855f7));
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dashboard-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dashboard-svg {
    width: 18px;
    height: 18px;
}

.dashboard-link-btn .arrow {
    transition: transform 0.2s ease;
}

.dashboard-link-btn:hover .arrow {
    transform: translateX(4px);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .home-main {
        padding: 16px;
    }
    
    .home-authenticated .hero-title {
        font-size: 1.5rem;
    }
    
    .quick-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .home-footer-actions {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .dashboard-link-btn {
        justify-content: center;
    }
}

/* ============================================
   ACCESSIBILITY: FOCUS STATES
   ============================================ */
.quick-stat-card:focus-visible,
.tool-card:focus-visible,
.category-chip:focus-visible,
.dashboard-link-btn:focus-visible {
    outline: 2px solid var(--theme-chip-color, #a855f7);
    outline-offset: 2px;
}

/* ============================================
   ACCESSIBILITY: REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .quick-stat-card,
    .tool-card,
    .category-chip,
    .dashboard-link-btn,
    .tool-arrow {
        transition: none;
    }
    
    .quick-stat-card:hover,
    .tool-card:hover,
    .category-chip:hover,
    .dashboard-link-btn:hover {
        transform: none;
    }
}
