﻿/* File: wwwroot/css/tenant-styles.css */

/**
 * Tenant Context Indicator Styles
 * Provides visual cues for the current tenant context
 */

/* Base tenant indicator styles */

.tenant-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    z-index: 1050;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

    .tenant-indicator:hover {
        transform: translateY(-3px);
        box-shadow: 0 7px 30px rgba(0, 0, 0, 0.2);
    }

.tenant-indicator-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin-right: 8px;
}

/* Tenant-specific theme classes */
.tenant-theme-system {
    --tenant-primary: #42424a;
    --tenant-secondary: #191919;
    --tenant-accent: #e91e63;
}

.tenant-theme-partner {
    --tenant-primary: #256c52;
    --tenant-secondary: #47c13f;
    --tenant-accent: #019b00;
}

.tenant-theme-business {
    --tenant-primary: #43A047;
    --tenant-secondary: #66BB6A;
    --tenant-accent: #004d40;
}

.tenant-theme-individual {
    --tenant-primary: #D81B60;
    --tenant-secondary: #EC407A;
    --tenant-accent: #880e4f;
}

/* Dynamic tenant header and navigation bar styles */
.tenant-theme-system .sidenav {
    background: linear-gradient(195deg, var(--tenant-primary), var(--tenant-secondary));
}

.tenant-theme-partner .sidenav {
    background: linear-gradient(195deg, var(--tenant-secondary), var(--tenant-primary));
}

.tenant-theme-business .sidenav {
    background: linear-gradient(195deg, var(--tenant-secondary), var(--tenant-primary));
}

.tenant-theme-individual .sidenav {
    background: linear-gradient(195deg, var(--tenant-secondary), var(--tenant-primary));
}

/* Tenant cards with tenant-specific styling */
.tenant-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14);
    transition: all 0.3s ease;
}

    .tenant-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

.tenant-card-header {
    padding: 15px;
    color: white;
    position: relative;
    overflow: hidden;
}

    .tenant-card-header::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, rgba(255,255,255,0.15), transparent);
        z-index: 1;
    }

.tenant-card-body {
    padding: 20px;
    background-color: white;
}

/* Tenant-specific card headers */
.tenant-theme-system .tenant-card-header {
    background: linear-gradient(195deg, var(--tenant-primary), var(--tenant-secondary));
}

.tenant-theme-partner .tenant-card-header {
    background: linear-gradient(195deg, var(--tenant-secondary), var(--tenant-primary));
}

.tenant-theme-business .tenant-card-header {
    background: linear-gradient(195deg, var(--tenant-secondary), var(--tenant-primary));
}

.tenant-theme-individual .tenant-card-header {
    background: linear-gradient(195deg, var(--tenant-secondary), var(--tenant-primary));
}

/* Custom tenant badge styles */
.tenant-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: white;
    margin: 0 0.25rem;
}

/* Pulse animation for tenant switching */
@keyframes tenant-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.tenant-switch-pulse {
    animation: tenant-pulse 2s infinite;
}

/* Tenant context highlight */
.tenant-context-highlight {
    position: relative;
}

    .tenant-context-highlight::after {
        content: attr(data-tenant-name);
        position: absolute;
        top: -10px;
        right: -10px;
        font-size: 10px;
        background: var(--tenant-primary, #256c52);
        color: white;
        padding: 2px 8px;
        border-radius: 10px;
        opacity: 0.8;
    }
/* Theme preset cards */
.theme-preset-card {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

.theme-preset-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.theme-preset-preview {
    height: 80px;
    width: 100%;
}

.theme-preset-title {
    padding: 8px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: white;
}

/* Theme switcher styles */
.theme-switcher .color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

/* Theme preview */
.theme-preview-actions {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.theme-preview-section {
    margin-bottom: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 15px;
}

.theme-preview-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 10px;
}

/* For dark mode */
.dark-mode .theme-preset-title {
    background-color: #2d2d2d;
    color: #f8f9fa;
}

.dark-mode .theme-preview-section {
    border-top-color: rgba(255,255,255,0.1);
}


/* Base theme colors */
:root {
    --primary-color: #256c52;
    --secondary-color: #6c757d;
    --accent-color: #ff9800;
    --text-color: #212529;
    --background-color: #ffffff;
    --font-family: 'Roboto', sans-serif;
    --button-radius: 5px;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --header-height: 80px;
}

/* Tenant-specific customizations */
body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
}

/* Brand colors */
.tenant-primary {
    color: var(--primary-color) !important;
}

.tenant-secondary {
    color: var(--secondary-color) !important;
}

.bg-tenant-primary {
    background-color: var(--primary-color) !important;
}

.bg-tenant-secondary {
    background-color: var(--secondary-color) !important;
}

/* Button styles */
.btn-tenant-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-radius: var(--button-radius) !important;
}

.btn-tenant-secondary {
    background-color: var(--secondary-color) !important;
    color: white !important;
    border-radius: var(--button-radius) !important;
}

/* Card styles */
.card {
    box-shadow: var(--card-shadow);
    border-radius: 8px;
}

/* Sidebar customization */
.sidenav {
    background: linear-gradient(195deg, var(--secondary-color), var(--primary-color));
    z-index:1050;
}

/* Dark mode support */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

    body.dark-mode .card {
        background-color: #1e1e1e;
        border-color: #333;
    }

    body.dark-mode .bg-white,
    body.dark-mode .bg-gray-100 {
        background-color: #1e1e1e !important;
    }

    body.dark-mode .text-dark {
        color: #e0e0e0 !important;
    }

    body.dark-mode .text-secondary {
        color: #adb5bd !important;
    }

    body.dark-mode .border-bottom {
        border-color: #333 !important;
    }

    body.dark-mode .form-control,
    body.dark-mode .input-group-outline .form-control {
        background-color: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }

    body.dark-mode .dropdown-menu {
        background-color: #2d2d2d;
        border-color: #444;
    }

    body.dark-mode .dropdown-item {
        color: #e0e0e0;
    }

    body.dark-mode .dropdown-item:hover {
        background-color: #3d3d3d;
    }

/* Area-specific themes */
.tenant-theme-admin .sidenav {
    background: linear-gradient(195deg, #42424a, #191919);
}

.tenant-theme-partner .sidenav {
    background: linear-gradient(195deg, #1a437a, #0c2340);
}

.tenant-theme-business .sidenav {
    background: linear-gradient(195deg, #2e7d32, #1b5e20);
}

.tenant-theme-individual .sidenav {
    background: linear-gradient(195deg, #6a1b9a, #4a148c);
}

/* Theme preview styling */
.theme-preview {
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    margin-right: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}