/* Custom styles for Veeteq Solar */

/* Custom color variables */
:root {
    --solar-blue: #1e40af;
    --solar-green: #059669;
    --solar-orange: #ea580c;
    --solar-yellow: #eab308;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse-hover:hover {
    animation: pulse 0.3s ease-in-out;
}

/* Custom button styles */
.btn-solar {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.btn-solar-primary {
    background-color: #2563eb;
    color: white;
}

.btn-solar-primary:hover {
    background-color: #1d4ed8;
}

.btn-solar-primary:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.btn-solar-secondary {
    background-color: white;
    color: #2563eb;
    border-color: #2563eb;
}

.btn-solar-secondary:hover {
    background-color: #eff6ff;
}

.btn-solar-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

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

.card-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-0.25rem);
}

/* Custom gradient backgrounds */
.gradient-solar {
    background: linear-gradient(135deg, var(--solar-blue) 0%, var(--solar-green) 100%);
}

.gradient-solar-warm {
    background: linear-gradient(135deg, var(--solar-orange) 0%, var(--solar-yellow) 100%);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid var(--solar-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Form enhancements */
.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: colors 0.2s ease;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Alert styles */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Mobile menu styles */
.mobile-menu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

/* Navigation enhancements */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* Logo animation */
@keyframes logoGlow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(234, 88, 12, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(234, 88, 12, 0.6);
    }
}

.logo-container:hover .logo-icon {
    animation: logoGlow 2s infinite;
}

/* Active page indicator */
.nav-link.active {
    color: var(--solar-blue);
    background-color: rgba(30, 64, 175, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--solar-blue), var(--solar-green));
    border-radius: 1px;
}

.mobile-menu.show {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

/* Mobile menu button animation */
.mobile-menu-btn {
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

.mobile-menu-btn i {
    transition: transform 0.3s ease;
}

.mobile-menu-btn:active i {
    transform: scale(0.9);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 9999px;
    height: 0.5rem;
}

.progress-fill {
    background-color: #2563eb;
    height: 0.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Tooltip styles */
.tooltip {
    position: absolute;
    z-index: 10;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: white;
    background-color: #111827;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tooltip.show {
    opacity: 1;
}

/* Quote calculator specific styles */
.calculator-result {
    background: linear-gradient(to right, #eff6ff, #f0fdf4);
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.calculator-metric {
    text-align: center;
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.calculator-metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.calculator-metric-label {
    font-size: 0.875rem;
    color: #4b5563;
}

/* Admin dashboard specific styles */
.admin-sidebar {
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-height: 100vh;
    width: 16rem;
    position: fixed;
    left: 0;
    top: 4rem;
    z-index: 40;
}

.admin-content {
    margin-left: 16rem;
    padding: 2rem;
}

.admin-card {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.admin-table {
    min-width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    color: #111827;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-completed {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
    }
}

/* Profile Settings Enhanced Styles */
.form-input-enhanced {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input-enhanced:focus {
    border-color: var(--solar-blue);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    transform: translateY(-1px);
}

.form-group {
    position: relative;
    transition: all 0.3s ease;
}

.form-group.focused label {
    color: var(--solar-blue);
    transform: translateY(-2px);
}

.form-group.valid .form-input-enhanced {
    border-color: var(--solar-green);
    background-color: rgba(5, 150, 105, 0.05);
}

.form-group.invalid .form-input-enhanced {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.form-group.valid::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--solar-green);
    font-weight: bold;
    font-size: 1.2em;
}

.form-group.invalid::after {
    content: '✗';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ef4444;
    font-weight: bold;
    font-size: 1.2em;
}

/* Tab animations */
.tab-content {
    transition: all 0.3s ease-out;
}

.profile-tab {
    position: relative;
    overflow: hidden;
}

.profile-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.profile-tab:hover::before {
    left: 100%;
}

/* Enhanced button styles */
.btn-solar {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-solar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-solar:hover::before {
    width: 300px;
    height: 300px;
}

/* Card hover effects for profile */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.card-hover:hover::before {
    opacity: 1;
}

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

/* Account action cards */
.account-action-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.account-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.account-action-card:hover::before {
    left: 100%;
}

.account-action-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Loading spinner for buttons */
.btn-solar .fa-spinner {
    animation: spin 1s linear infinite;
}

/* Notification styles */
.notification {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .form-input-enhanced {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .profile-tab {
        font-size: 0.875rem;
        padding: 0.75rem 0.5rem;
    }
    
    .btn-solar {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
}
