/* 
 * Property Analytica Theme CSS
 * This file contains all theme-specific styling to enable consistent branding
 * and facilitate future white labeling.
 */

/* Theme Color Variables - These can be customized for white labeling */
:root {
    --brand-primary: #5a2c82;         /* Primary purple */
    --brand-light: #7f49a5;           /* Light purple */
    --brand-dark: #4a2569;            /* Dark purple */
    --brand-secondary: #b69fd3;       /* Secondary purple */
    --text-on-brand: #ffffff;         /* Text color on brand backgrounds */
    --brand-primary-50: rgba(90, 44, 130, 0.5); /* 50% opacity of primary color */
}

/* Text Colors */
.text-purple, .text-brand {
    color: var(--brand-primary) !important;
}

.text-purple-50 {
    color: var(--brand-primary-50) !important;
}

/* Background Colors */
.bg-purple, .bg-brand {
    background-color: var(--brand-primary) !important;
    color: var(--text-on-brand) !important;
}

/* Gradient Background - this matches the Home page */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    color: var(--text-on-brand);
}

/* Button Styles */
.btn-purple, .btn-brand {
    background-color: var(--brand-primary);
    color: var(--text-on-brand);
    border-color: var(--brand-primary);
}

.btn-purple:hover, .btn-purple:focus, .btn-purple:active,
.btn-brand:hover, .btn-brand:focus, .btn-brand:active {
    background-color: var(--brand-dark);
    color: var(--text-on-brand);
    border-color: var(--brand-dark);
}

.btn-outline-purple, .btn-outline-brand {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background-color: transparent;
}

.btn-outline-purple:hover, .btn-outline-purple:focus, .btn-outline-purple:active,
.btn-outline-brand:hover, .btn-outline-brand:focus, .btn-outline-brand:active {
    background-color: var(--brand-primary);
    color: var(--text-on-brand);
    border-color: var(--brand-primary);
}

/* Form Switch Customization */
.custom-purple-switch:checked, .custom-brand-switch:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Card Styling */
.card .card-header.bg-purple, .card .card-header.bg-brand {
    background-color: var(--brand-primary);
    color: var(--text-on-brand);
}

/* Apply gradient to card headers with this class */
.card .card-header.bg-gradient-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-light) 100%);
    color: var(--text-on-brand);
}

/* Progress Bar */
.progress-bar.bg-purple, .progress-bar.bg-brand {
    background-color: var(--brand-primary);
}

/* Badge */
.badge.bg-purple, .badge.bg-brand {
    background-color: var(--brand-primary);
}

/* Border */
.border-purple, .border-brand {
    border-color: var(--brand-primary) !important;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--brand-dark) !important;
    background-image: none !important;
}

/* Tab Styling */
.nav-tabs .nav-link.active {
    color: var(--brand-primary);
    border-color: #dee2e6 #dee2e6 #fff;
    border-top: 3px solid var(--brand-primary);
}

/* Active Navigation Link */
.nav-link.active {
    background-color: rgba(90, 44, 130, 0.5) !important;
    color: white !important;
    border-radius: 0.25rem;
}

.nav-link.active .nav-icon {
    color: white;
}

/* Icon Styling in Navbar */
.nav-icon {
    display: inline-block;
    width: 1.5rem;
    margin-right: 0.5rem;
    text-align: center;
    color: var(--brand-secondary);
}

/* Section Headers in Navigation */
.nav-section-header {
    color: var(--brand-secondary);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Google Drive Integration */
.bg-gdrive {
    background-color: #4285F4;
}

.btn-gdrive {
    background-color: #4285F4;
    color: white;
    border-color: #4285F4;
}

.btn-gdrive:hover, .btn-gdrive:focus, .btn-gdrive:active {
    background-color: #2b73e5;
    color: white;
    border-color: #2b73e5;
}

.border-gdrive {
    border-color: #4285F4 !important;
}

/* Hover effects for cards */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Letter spacing utility */
.tracking-wide {
    letter-spacing: 2px;
}

/* Editable field styling */
.editable-field {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editable-field:hover {
    background-color: rgba(90, 44, 130, 0.1);
}

.editable-field::after {
    content: '\F4CA';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 0.8rem;
}

.editable-field:hover::after {
    opacity: 1;
}

/* Alert Styling Override - Use same cyan/info color for warnings */
.alert-warning {
    --bs-alert-color: #055160;
    --bs-alert-bg: #cff4fc;
    --bs-alert-border-color: #b6effb;
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* Download Hint Arrow Animation */
.results-header-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    margin-right: 1rem;
    gap: 1rem;
}

.download-hint-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0dcaf0;
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0;
    white-space: nowrap;
    margin-top: -0.5rem;
    margin-bottom: -0.5rem;
    animation: slideAcross 3s ease-in-out forwards;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.download-hint-arrow .hint-text {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.download-hint-arrow i {
    font-size: 1.7rem;
}

@keyframes slideAcross {
    0% {
        opacity: 0;
        transform: translateX(0);
    }
    15% {
        opacity: 1;
        transform: translateX(0);
    }
    75%, 100% {
        opacity: 0.9;
        transform: translateX(clamp(0px, calc(30vw - 350px), 250px));
    }
}
