/* StellarEdge Custom Styles */

/* CSS Variables */
:root {
    --color-primary: #8b5cf6;
    --color-secondary: #16a34a;
    --color-accent: #2563eb;
}

/* Base Styles */
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
}

/* Custom Border Radius */
.rounded-custom {
    border-radius: 0.5rem;
}

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

/* Focus States */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Custom Button Styles */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-primary);
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Navigation Styles */
.nav-link {
    color: #6b7280;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: color 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link.active {
    color: var(--color-primary);
}

/* Mobile Menu Animation */
.mobile-menu {
    transition: all 0.3s ease;
}

.mobile-menu.hidden {
    max-height: 0;
    overflow: hidden;
}

.mobile-menu:not(.hidden) {
    max-height: 500px;
}

/* Accordion Styles */
.accordion-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.accordion-content.hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.accordion-content:not(.hidden) {
    max-height: 500px;
}

.accordion-header[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Hero Section Styles */
.hero-overlay {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(37, 99, 235, 0.8));
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.border-custom {
    border-color: var(--color-primary);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--color-secondary), #059669);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .mobile-center {
        text-align: center;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-stack {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here if implemented */
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Selection Styles */
::selection {
    background-color: var(--color-primary);
    color: white;
}

::-moz-selection {
    background-color: var(--color-primary);
    color: white;
}

/* Custom Table Styles */
.table-custom {
    border-collapse: collapse;
    width: 100%;
}

.table-custom th,
.table-custom td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.table-custom th {
    background-color: #f9fafb;
    font-weight: 600;
}

.table-custom tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Cookie Banner Specific Styles */
#cookie-banner {
    backdrop-filter: blur(10px);
}

#cookie-modal {
    backdrop-filter: blur(5px);
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible Support */
.focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Custom Error States */
.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success States */
.success {
    border-color: var(--color-secondary) !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1) !important;
}

.success-message {
    color: var(--color-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}
/* Cookie banner visibility — independent of Tailwind */
#cookie-banner.hidden, #cookie-consent-banner.hidden { display: none !important; }
#cookie-banner:not(.hidden), #cookie-consent-banner:not(.hidden) { display: block !important; }
#cookie-modal.hidden { display: none !important; }
