/*
 * Hypha Energy Brand Styles
 * Aligned with https://www.hypha.energy/
 * 
 * Brand Identity:
 * - Modern, clean design
 * - Energy sustainability focus
 * - Green/teal color scheme
 * - Professional and accessible
 */

:root {
    /* ============================================
       HYPHA ENERGY BRAND COLORS
       ============================================ */
    
    /* Primary Brand Colors */
    --hypha-primary: #28a745;        /* Vibrant green - main brand color */
    --hypha-primary-dark: #218838;   /* Darker green for hover states */
    --hypha-primary-light: #4caf50;  /* Lighter green for accents */
    
    /* Secondary Colors */
    --hypha-secondary: #20c997;      /* Teal - energy theme */
    --hypha-secondary-dark: #1ba37f; /* Dark teal */
    --hypha-secondary-light: #5ce1c5; /* Light teal */
    
    /* Accent Colors */
    --hypha-accent: #00bfa5;         /* Bright teal accent */
    --hypha-accent-energy: #76ff03;  /* Bright energy green */
    
    /* Neutral Colors */
    --hypha-dark: #212529;           /* Almost black text */
    --hypha-gray-dark: #495057;      /* Dark gray */
    --hypha-gray: #6c757d;           /* Medium gray */
    --hypha-gray-light: #adb5bd;     /* Light gray */
    --hypha-light: #f8f9fa;          /* Very light gray background */
    --hypha-white: #ffffff;          /* Pure white */
    
    /* Semantic Colors */
    --hypha-success: #28a745;        /* Success green */
    --hypha-info: #17a2b8;           /* Info blue-teal */
    --hypha-warning: #ffc107;        /* Warning amber */
    --hypha-danger: #dc3545;         /* Danger red */
    
    /* Background Colors */
    --hypha-bg-primary: #ffffff;
    --hypha-bg-secondary: #f8f9fa;
    --hypha-bg-dark: #212529;
    
    /* Gradient */
    --hypha-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --hypha-gradient-hero: linear-gradient(135deg, #218838 0%, #1ba37f 50%, #00bfa5 100%);
    
    /* ============================================
       TYPOGRAPHY
       ============================================ */
    
    /* Fonts - Modern sans-serif stack */
    --hypha-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                         "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", 
                         "Segoe UI Emoji", "Segoe UI Symbol";
    --hypha-font-headings: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
                           "Helvetica Neue", Arial, sans-serif;
    
    /* Font Sizes */
    --hypha-font-size-base: 1rem;
    --hypha-font-size-lg: 1.125rem;
    --hypha-font-size-sm: 0.875rem;
    --hypha-font-size-xs: 0.75rem;
    
    /* Heading Sizes */
    --hypha-h1: 2.5rem;
    --hypha-h2: 2rem;
    --hypha-h3: 1.75rem;
    --hypha-h4: 1.5rem;
    --hypha-h5: 1.25rem;
    --hypha-h6: 1rem;
    
    /* Font Weights */
    --hypha-font-weight-light: 300;
    --hypha-font-weight-normal: 400;
    --hypha-font-weight-medium: 500;
    --hypha-font-weight-semibold: 600;
    --hypha-font-weight-bold: 700;
    
    /* Line Heights */
    --hypha-line-height-base: 1.6;
    --hypha-line-height-heading: 1.2;
    
    /* ============================================
       SPACING
       ============================================ */
    
    --hypha-spacing-xs: 0.25rem;
    --hypha-spacing-sm: 0.5rem;
    --hypha-spacing-md: 1rem;
    --hypha-spacing-lg: 1.5rem;
    --hypha-spacing-xl: 2rem;
    --hypha-spacing-xxl: 3rem;
    
    /* ============================================
       BORDERS & SHADOWS
       ============================================ */
    
    --hypha-border-radius: 0.5rem;
    --hypha-border-radius-sm: 0.25rem;
    --hypha-border-radius-lg: 1rem;
    
    --hypha-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --hypha-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hypha-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    
    /* ============================================
       TRANSITIONS
       ============================================ */
    
    --hypha-transition: all 0.3s ease;
    --hypha-transition-fast: all 0.15s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */

body {
    font-family: var(--hypha-font-family);
    font-size: var(--hypha-font-size-base);
    line-height: var(--hypha-line-height-base);
    color: var(--hypha-dark);
    background-color: var(--hypha-light);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--hypha-font-headings);
    font-weight: var(--hypha-font-weight-bold);
    line-height: var(--hypha-line-height-heading);
    color: var(--hypha-dark);
    margin-bottom: var(--hypha-spacing-md);
}

h1 { font-size: var(--hypha-h1); }
h2 { font-size: var(--hypha-h2); }
h3 { font-size: var(--hypha-h3); }
h4 { font-size: var(--hypha-h4); }
h5 { font-size: var(--hypha-h5); }
h6 { font-size: var(--hypha-h6); }

p {
    margin-bottom: var(--hypha-spacing-md);
    color: var(--hypha-gray-dark);
}

a {
    color: var(--hypha-primary);
    text-decoration: none;
    transition: var(--hypha-transition-fast);
}

a:hover {
    color: var(--hypha-primary-dark);
    text-decoration: underline;
}

/* ============================================
   BUTTONS - HYPHA BRAND STYLE
   ============================================ */

.btn-primary,
.btn.btn-primary {
    background: var(--hypha-gradient);
    border: none;
    color: var(--hypha-white);
    font-weight: var(--hypha-font-weight-semibold);
    transition: var(--hypha-transition);
    box-shadow: var(--hypha-shadow-sm);
}

.btn-primary:hover,
.btn.btn-primary:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #17a085 100%);
    transform: translateY(-2px);
    box-shadow: var(--hypha-shadow-md);
    color: var(--hypha-white);
}

.btn-success {
    background-color: var(--hypha-primary);
    border-color: var(--hypha-primary);
    color: var(--hypha-white);
    font-weight: var(--hypha-font-weight-semibold);
}

.btn-success:hover {
    background-color: var(--hypha-primary-dark);
    border-color: var(--hypha-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--hypha-shadow-sm);
}

.btn-outline-primary {
    border-color: var(--hypha-primary);
    color: var(--hypha-primary);
}

.btn-outline-primary:hover {
    background-color: var(--hypha-primary);
    border-color: var(--hypha-primary);
    color: var(--hypha-white);
}

/* ============================================
   HERO SECTIONS
   ============================================ */

.hero-section {
    background: var(--hypha-gradient-hero);
    color: var(--hypha-white);
    padding: var(--hypha-spacing-xxl) var(--hypha-spacing-xl);
    border-radius: var(--hypha-border-radius-lg);
    box-shadow: var(--hypha-shadow-lg);
}

.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section .lead {
    color: var(--hypha-white);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--hypha-white);
    border: 1px solid #e0e0e0;
    border-radius: var(--hypha-border-radius);
    box-shadow: var(--hypha-shadow-sm);
    transition: var(--hypha-transition);
}

.card:hover {
    box-shadow: var(--hypha-shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--hypha-light);
    border-bottom: 1px solid #e0e0e0;
    color: var(--hypha-dark);
    font-weight: var(--hypha-font-weight-semibold);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.custom-header {
    background: var(--hypha-white);
    border-bottom: 3px solid var(--hypha-primary);
}

.logo-section img {
    transition: var(--hypha-transition);
}

.logo-section img:hover {
    transform: scale(1.05);
}

.title-section fluent-label {
    color: var(--hypha-primary) !important;
}

.external-link {
    color: var(--hypha-primary);
}

.external-link:hover {
    background: rgba(40, 167, 69, 0.1);
    color: var(--hypha-primary-dark);
}

/* ============================================
   FEATURE CARDS
   ============================================ */

.feature-card {
    background: var(--hypha-white);
    border: 1px solid #e0e0e0;
    transition: var(--hypha-transition);
}

.feature-card:hover {
    border-color: var(--hypha-primary);
    box-shadow: 0 8px 16px rgba(40, 167, 69, 0.2);
}

.feature-icon {
    color: var(--hypha-primary);
}

/* ============================================
   FORMS
   ============================================ */

.form-control:focus,
.form-select:focus {
    border-color: var(--hypha-primary);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-label {
    color: var(--hypha-dark);
    font-weight: var(--hypha-font-weight-medium);
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: var(--hypha-primary);
    color: var(--hypha-primary-dark);
}

.alert-info {
    background-color: rgba(32, 201, 151, 0.1);
    border-color: var(--hypha-secondary);
    color: var(--hypha-secondary-dark);
}

/* ============================================
   METRIC CARDS
   ============================================ */

.metric-card {
    background: var(--hypha-white);
    border-left: 4px solid var(--hypha-primary);
    transition: var(--hypha-transition);
}

.metric-card:hover {
    box-shadow: var(--hypha-shadow-md);
    border-left-color: var(--hypha-primary-dark);
}

.metric-value {
    color: var(--hypha-primary);
    font-weight: var(--hypha-font-weight-bold);
}

/* ============================================
   TABLES
   ============================================ */

.table thead th {
    background-color: var(--hypha-light);
    color: var(--hypha-dark);
    font-weight: var(--hypha-font-weight-semibold);
    border-bottom: 2px solid var(--hypha-primary);
}

.table-hover tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.05);
}

/* ============================================
   BADGES
   ============================================ */

.badge-primary {
    background-color: var(--hypha-primary);
}

.badge-success {
    background-color: var(--hypha-primary);
}

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress-bar {
    background: var(--hypha-gradient);
}

/* ============================================
   STEP PROGRESS
   ============================================ */

.step-progress {
    background: var(--hypha-light);
    border-left: 4px solid var(--hypha-primary);
}

.step-progress .step-active {
    color: var(--hypha-primary);
    font-weight: var(--hypha-font-weight-bold);
}

/* ============================================
   HOUSEHOLD CARDS
   ============================================ */

.household-card {
    border-left: 4px solid var(--hypha-secondary);
}

.household-header {
    border-bottom: 2px solid var(--hypha-light);
}

.household-header h4 {
    color: var(--hypha-dark);
}

/* ============================================
   OWNERSHIP VALIDATION
   ============================================ */

.ownership-validation.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border-color: var(--hypha-primary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--hypha-dark);
    color: var(--hypha-gray-light);
    padding: var(--hypha-spacing-xl);
}

.footer a {
    color: var(--hypha-primary-light);
}

.footer a:hover {
    color: var(--hypha-white);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.spinner-border {
    color: var(--hypha-primary);
}

/* ============================================
   PWA INSTALL PROMPT - HYPHA BRAND
   ============================================ */

.pwa-install-prompt .pwa-install-content {
    border-top: 4px solid var(--hypha-primary);
}

.pwa-install-icon svg path {
    fill: var(--hypha-primary);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--hypha-light);
}

::-webkit-scrollbar-thumb {
    background: var(--hypha-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hypha-primary-dark);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 767.98px) {
    :root {
        --hypha-h1: 2rem;
        --hypha-h2: 1.75rem;
        --hypha-h3: 1.5rem;
        --hypha-h4: 1.25rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-hypha-primary {
    color: var(--hypha-primary) !important;
}

.text-hypha-secondary {
    color: var(--hypha-secondary) !important;
}

.bg-hypha-primary {
    background-color: var(--hypha-primary) !important;
}

.bg-hypha-gradient {
    background: var(--hypha-gradient) !important;
}

.border-hypha-primary {
    border-color: var(--hypha-primary) !important;
}
