/* layout.css - Shared layout styles for all pages */

/* Modern CSS Reset & Base */
:root {
    --primary: #4285F4; /* Pale Blue */
    --primary-light: #E8F0FE;
    --primary-dark: #3367D6;
    --secondary: #5F6368;
    --accent: #34A853;
    --white: #FFFFFF;
    --light-bg: #F8F9FA;
    --card-bg: #FFFFFF;
    --border: #E0E0E0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-full: 50px;
    --radius-xl: 25px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: #202124;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    padding-bottom: 100px; /* Space for floating bottom nav */
}

/* Header - Top Bar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-light);
    z-index: 1000;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 22px;
    color: var(--primary);
}

.logo-icon {
    background-color: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: var(--light-bg);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
}

/* Main Content */
.main-content {
    margin-top: 60px;
    padding: 20px 16px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Container for centering on large screens */
.content-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    margin-bottom: 24px;
    width: 100%;
}

.welcome-text {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 700;
    margin-bottom: 8px;
    color: #202124;
    line-height: 1.2;
}

.welcome-subtext {
    font-size: clamp(14px, 3vw, 16px);
    color: var(--secondary);
    margin-bottom: 20px;
}

/* FLOATING BOTTOM NAVIGATION - Enhanced with modern styling */
.bottom-nav {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 600px;
    background-color: var(--white);
    border-radius: var(--radius-xl);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    height: 70px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Add a subtle glow effect on hover */
.bottom-nav:hover {
    box-shadow: 0 15px 35px rgba(66, 133, 244, 0.2);
}

/* Navigation items styling */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--secondary);
    transition: var(--transition);
    flex: 0.2;
    padding: 8px 0;
    position: relative;
    border-radius: var(--radius-sm);
}

.nav-item:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-item.active {
    color: var(--primary);
}

/* Active state indicator */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    width: 30px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* Navigation icons */
.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
    transition: var(--transition);
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
}

/* Navigation labels */
.nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: var(--transition);
}

.nav-item.active .nav-label {
    opacity: 1;
    font-weight: 700;
}

/* Center map button special styling */
.nav-item[data-nav="map"] {
    position: relative;
}

.nav-item[data-nav="map"]::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    top: -2px;
    right: 15px;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

/* Desktop-specific bottom nav styling */
@media (min-width: 768px) {
    .bottom-nav {
        height: 75px;
        padding: 12px 30px;
        border-radius: 30px;
        max-width: 700px;
    }
    
    .nav-item {
        padding: 10px 0;
    }
    
    .nav-icon {
        font-size: 22px;
    }
    
    .nav-label {
        font-size: 12px;
    }
    
    .nav-item.active::before {
        width: 35px;
        height: 4px;
        top: -10px;
    }
}

@media (min-width: 1024px) {
    .bottom-nav {
        max-width: 800px;
        padding: 12px 40px;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    .bottom-nav {
        width: 95%;
        padding: 8px 15px;
        height: 65px;
    }
    
    .nav-icon {
        font-size: 18px;
        margin-bottom: 3px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .nav-item.active::before {
        width: 25px;
        top: -6px;
    }
    
    .nav-item[data-nav="map"]::after {
        width: 6px;
        height: 6px;
        right: 10px;
    }
}

/* Add Property Button */
.add-property-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
}

.add-property-btn:hover {
    transform: scale(1.15) rotate(90deg);
    background-color: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .header, .main-content {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .add-property-btn {
        bottom: 110px;
        right: 30px;
        width: 60px;
        height: 60px;
        font-size: 26px;
    }
    
    body {
        padding-bottom: 110px; /* Increased for floating bottom nav */
    }
}

@media (min-width: 1024px) {
    .header, .main-content {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .add-property-btn {
        bottom: 120px;
        right: 40px;
    }
}

/* Fix for mobile overflow */
@media (max-width: 639px) {
    .header, .main-content {
        padding-left: 16px;
        padding-right: 16px;
        max-width: 100vw;
    }
    
    body, html {
        overflow-x: hidden;
        width: 100vw;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}