/*
Theme Name:   Family Hub Theme
Theme URI:    https://familyhub.local
Description:  Custom Child Theme for Family Hub - A personalized family intranet based on BlankSlate
Author:       Family Hub Development
Author URI:   https://familyhub.local
Template:     blankslate
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  familyhub-theme
Tags:         family, intranet, dashboard, personalized
*/

/* Import parent theme styles */
@import url('../blankslate/style.css');

/* ===========================
   Family Hub Custom Styles
   =========================== */

/* Header Styles */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0;
    margin: 0;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.site-branding .custom-logo {
    height: 60px;
    width: auto;
    display: block;
}

.site-title-wrapper {
    min-width: 0;
}

.site-branding #site-title {
    margin: 0;
    padding: 0;
    font-size: 1.5em;
}

.site-branding #site-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.site-branding #site-title a:hover {
    color: #007bff;
}

.site-branding #site-description {
    margin: 5px 0 0 0;
    padding: 0;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

/* User Info Bar */
.site-user-bar {
    flex-shrink: 0;
}

.user-info-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-avatar {
    display: inline-block;
    flex-shrink: 0;
}

.user-avatar img {
    border-radius: 50%;
    display: block;
}

.user-greeting {
    color: #333;
    font-weight: 500;
}

.user-profile-link,
.user-login-link,
.user-register-link,
.user-logout-link {
    display: inline-block;
    padding: 8px 12px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background 0.3s;
}

.user-profile-link:hover,
.user-login-link:hover,
.user-register-link:hover,
.user-logout-link:hover {
    background: #0056b3;
}

.user-register-link {
    background: #28a745;
}

.user-register-link:hover {
    background: #218838;
}

/* Dashboard Layout */
.familyhub-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.familyhub-dashboard-header {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.familyhub-dashboard-header h1 {
    margin: 0 0 10px 0;
    color: #333;
}

.familyhub-dashboard-header p {
    margin: 0;
    color: #666;
}

/* Dashboard Content Container */
.familyhub-dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Dashboard Widgets */
.familyhub-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.familyhub-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.familyhub-widget h2 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.familyhub-widget-content {
    color: #555;
}

/* User Profile Section */
.familyhub-user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.familyhub-user-avatar {
    flex-shrink: 0;
}

.familyhub-user-info {
    flex-grow: 1;
}

/* Navigation */
/* Removed - using familyhub-bottom-nav as primary navigation */

/* Bottom Navigation Bar */
.familyhub-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #007bff;
    border-top: 1px solid #0056b3;
    z-index: 1000;
}

.familyhub-bottom-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.familyhub-bottom-nav li {
    flex: 0 1 auto;
}

.familyhub-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 0.8em;
    transition: background-color 0.3s;
    min-width: 60px;
}

.familyhub-bottom-nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* Icons for bottom nav items */
.familyhub-bottom-nav li:nth-child(1) a::before {
    content: "📊";
    display: block;
    font-size: 1.5em;
    margin-bottom: 4px;
}

.familyhub-bottom-nav li:nth-child(2) a::before {
    content: "📅";
    display: block;
    font-size: 1.5em;
    margin-bottom: 4px;
}

.familyhub-bottom-nav li:nth-child(3) a::before {
    content: "📁";
    display: block;
    font-size: 1.5em;
    margin-bottom: 4px;
}

.familyhub-bottom-nav li:nth-child(4) a::before {
    content: "🎁";
    display: block;
    font-size: 1.5em;
    margin-bottom: 4px;
}

.familyhub-bottom-nav li:nth-child(5) a::before {
    content: "👤";
    display: block;
    font-size: 1.5em;
    margin-bottom: 4px;
}

/* Sidebar Navigation */
.familyhub-sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 60px;
}

.familyhub-sidebar.active {
    left: 0;
}

.familyhub-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.familyhub-sidebar li {
    margin: 0;
    border-bottom: 1px solid #eee;
}

.familyhub-sidebar a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.familyhub-sidebar a:hover {
    background: #f0f0f0;
}

/* Sidebar Toggle Button */
.familyhub-sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #007bff;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 998;
    transition: background 0.3s;
}

.familyhub-sidebar-toggle:hover {
    background: #0056b3;
}

.familyhub-sidebar-toggle.active {
    background: #dc3545;
}

/* Overlay for sidebar */
.familyhub-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 997;
    display: none;
}

.familyhub-sidebar-overlay.active {
    display: block;
}

/* Dashboard Modules */
.familyhub-modules {
    margin-top: 30px;
}

.familyhub-module {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.familyhub-module h2 {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
    color: #333;
}

/* Quick Actions in Widgets */
.familyhub-widget-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.familyhub-widget-content ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.familyhub-widget-content ul li:last-child {
    border-bottom: none;
}

.familyhub-widget-content a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.familyhub-widget-content a:hover {
    color: #0056b3;
}

/* Login Required Message */
.familyhub-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 40px auto;
    max-width: 500px;
}

.familyhub-login-required h2 {
    margin-bottom: 15px;
    color: #333;
}

.familyhub-login-required p {
    margin-bottom: 25px;
    color: #666;
}

.familyhub-login-required .button {
    display: inline-block;
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.familyhub-login-required .button:hover {
    background: #0056b3;
}

/* Loading State */
.familyhub-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.familyhub-loading::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error State */
.familyhub-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* Success State */
.familyhub-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1024px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-user-bar {
        width: 100%;
    }
    
    .familyhub-sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .site-header-inner {
        padding: 15px;
        gap: 15px;
    }
    
    .site-branding {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-branding .custom-logo {
        height: 50px;
    }
    
    .site-branding #site-title {
        font-size: 1.2em;
    }
    
    .user-info-wrapper {
        width: 100%;
        justify-content: flex-start;
    }
    
    .user-greeting {
        display: none;
    }
    
    .familyhub-widgets {
        grid-template-columns: 1fr;
    }
    
    .familyhub-dashboard {
        padding: 15px;
        padding-bottom: 80px;
    }
    
    .familyhub-dashboard-header {
        padding: 20px;
    }
    
    .familyhub-sidebar-toggle {
        display: flex;
    }
    
    .familyhub-bottom-nav {
        display: block;
    }
}

@media (max-width: 480px) {
    .site-header-inner {
        padding: 10px;
    }
    
    .site-branding #site-title {
        font-size: 1.1em;
    }
    
    .site-branding #site-description {
        font-size: 0.8em;
    }
    
    .user-profile-link,
    .user-login-link,
    .user-register-link,
    .user-logout-link {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .familyhub-widget {
        padding: 15px;
    }
    
    .familyhub-widget h2 {
        font-size: 1em;
    }
    
    .familyhub-dashboard-header {
        padding: 15px;
    }
    
    .familyhub-dashboard {
        padding: 10px;
        padding-bottom: 80px;
    }
    
    .familyhub-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .familyhub-bottom-nav ul {
        flex-direction: column;
    }
}
