/**
 * Aqua Theme for Watchtower Resource Dashboard
 * Inspired by the creative grid's glass morphism and aqua styling
 */

:root {
    /* Aqua theme color variables */
    --aqua-primary: #0FB8B8;
    --aqua-secondary: #1AFFD5;
    --aqua-accent: #00E6CC;
    --aqua-dark: #145F5F;
    --aqua-light: #A7FFF6;
    
    /* Background gradients */
    --gradient-aqua: linear-gradient(135deg, #0FB8B8, #1AFFD5);
    --gradient-dark-aqua: linear-gradient(135deg, #0A7878, #00C2A2);
    --gradient-blue-aqua: linear-gradient(135deg, #6e45e2, #88d3ce);
    
    /* Glass effect variables */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* Override base variables with aqua theme */
    --primary-color: var(--aqua-primary);
    --secondary-color: var(--aqua-secondary);
    --success-color: var(--aqua-accent);
}

/* Background styling */
body.aqua-theme {
    background: linear-gradient(135deg, #05333a 0%, #072c42 100%);
    color: white;
    position: relative;
}

body.aqua-theme::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(15, 184, 184, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(26, 255, 213, 0.2) 0%, transparent 30%);
    z-index: -1;
}

/* Glass morphism for cards and containers */
body.aqua-theme .sidebar,
body.aqua-theme .main-content {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

body.aqua-theme .resource-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 15px;
    overflow: hidden;
    padding: 1.5rem;
    height: 100%;
    transition: box-shadow 0.3s ease;
    border-left: none;
    position: relative;
    margin-bottom: 10px;
    min-height: 200px;
}

body.aqua-theme .resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 184, 184, 0.05) 0%, rgba(26, 255, 213, 0.05) 100%);
    border-radius: 15px;
    z-index: -1;
}

body.aqua-theme .resource-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

body.aqua-theme .resource-card:hover::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--aqua-primary), var(--aqua-secondary));
    border-radius: 17px;
    z-index: -2;
    opacity: 0.2;
    filter: blur(8px);
    transition: opacity 0.3s ease;
}

/* Resource card animation for aqua theme - REPLACED WITH HOVER EFFECTS ONLY */
body.aqua-theme .resource-card-container {
    /* Remove animation: float 5s ease-in-out infinite; */
    /* Remove animation-delay: calc(var(--animation-order, 0) * 0.1s); */
    margin-bottom: 25px;
    padding: 0 10px;
    /* Add transition for hover effects */
    transition: transform 0.3s ease-out;
}

/* Replace float animation with hover transform */
body.aqua-theme .resource-card-container:hover {
    transform: translateY(-5px);
}

/* Remove animation keyframes that are no longer needed */
/* 
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}
*/

/* Remove animation order classes since they're no longer needed */
/*
body.aqua-theme .resource-card-container:nth-child(3n+1) {
    --animation-order: 1;
}

body.aqua-theme .resource-card-container:nth-child(3n+2) {
    --animation-order: 2;
}

body.aqua-theme .resource-card-container:nth-child(3n+3) {
    --animation-order: 3;
}
*/

/* Stats cards */
body.aqua-theme .stats-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 15px;
    overflow: hidden;
    padding: 1.5rem;
    border-left: none;
    position: relative;
    transition: all 0.3s ease;
    min-height: 150px;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    height: 100%;
    min-height: 120px;
    margin-bottom: 0;
    animation: none;
    transform: none;
}

body.aqua-theme .stats-card .stats-icon {
    position: absolute;
    right: 20px;
    font-size: 3rem;
    opacity: 0.2;
    transition: all 0.3s ease;
}

body.aqua-theme .stats-card .stats-info {
    position: relative;
    z-index: 2;
}

body.aqua-theme .stats-card .stats-info h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(90deg, var(--aqua-primary) 0%, var(--aqua-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

body.aqua-theme .stats-card .stats-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0;
}

body.aqua-theme .stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

body.aqua-theme .stats-card:hover .stats-icon {
    opacity: 0.3;
    transform: scale(1.1);
}

body.aqua-theme .stats-card.total {
    background: linear-gradient(135deg, rgba(15, 184, 184, 0.3), rgba(15, 184, 184, 0.1));
}

body.aqua-theme .stats-card.images {
    background: linear-gradient(135deg, rgba(26, 255, 213, 0.3), rgba(26, 255, 213, 0.1));
}

body.aqua-theme .stats-card.documents {
    background: linear-gradient(135deg, rgba(20, 95, 95, 0.3), rgba(20, 95, 95, 0.1));
}

body.aqua-theme .stats-card.links {
    background: linear-gradient(135deg, rgba(167, 255, 246, 0.3), rgba(167, 255, 246, 0.1));
}

/* Glow effects for stats cards */
body.aqua-theme .stats-card.total::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: radial-gradient(circle at center, rgba(15, 184, 184, 0.5), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

body.aqua-theme .stats-card.images::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: radial-gradient(circle at center, rgba(26, 255, 213, 0.5), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

body.aqua-theme .stats-card.documents::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: radial-gradient(circle at center, rgba(20, 95, 95, 0.5), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

body.aqua-theme .stats-card.links::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: radial-gradient(circle at center, rgba(167, 255, 246, 0.5), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

body.aqua-theme .stats-card::after {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}

body.aqua-theme .stats-card:hover::after {
    opacity: 0.5 !important;
}

/* Text and typography */
body.aqua-theme h1, 
body.aqua-theme h2, 
body.aqua-theme h3, 
body.aqua-theme h4, 
body.aqua-theme h5, 
body.aqua-theme h6 {
    color: #ffffff;
}

body.aqua-theme .main-content h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    background: linear-gradient(90deg, var(--aqua-primary) 0%, var(--aqua-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Sidebar styling */
body.aqua-theme .sidebar .filter-title {
    color: var(--aqua-secondary);
    font-weight: 600;
}

body.aqua-theme .sidebar .filter-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    padding-bottom: 20px;
}

body.aqua-theme .form-check-label {
    color: rgba(255, 255, 255, 0.8);
}

body.aqua-theme .form-check-input:checked {
    background-color: var(--aqua-primary);
    border-color: var(--aqua-primary);
}

/* Form controls */
body.aqua-theme .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

body.aqua-theme .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--aqua-primary);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(15, 184, 184, 0.25);
}

body.aqua-theme .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
body.aqua-theme .btn-primary {
    background: var(--gradient-aqua);
    border: none;
}

body.aqua-theme .btn-outline-primary {
    color: var(--aqua-primary);
    border-color: var(--aqua-primary);
}

body.aqua-theme .btn-outline-primary:hover {
    background: var(--gradient-aqua);
    border-color: transparent;
}

body.aqua-theme .btn-danger {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    border: none;
}

/* Resource card specific styling */
body.aqua-theme .resource-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

body.aqua-theme .resource-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 184, 184, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 18px;
}

body.aqua-theme .resource-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

body.aqua-theme .resource-content {
    margin: 20px 0;
    padding: 5px;
    color: rgba(255, 255, 255, 0.9);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

body.aqua-theme .resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

body.aqua-theme .tag-badge {
    background: rgba(15, 184, 184, 0.3);
    color: white;
    border: 1px solid rgba(26, 255, 213, 0.3);
    transition: all 0.2s ease;
}

body.aqua-theme .tag-badge:hover {
    background: rgba(15, 184, 184, 0.5);
    transform: translateY(-2px);
}

/* Modals */
body.aqua-theme .modal-content {
    background: rgba(7, 44, 66, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    color: white;
}

body.aqua-theme .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.aqua-theme .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.aqua-theme .btn-close {
    color: white;
    filter: invert(1) brightness(200%);
}

/* Custom scrollbar */
body.aqua-theme ::-webkit-scrollbar {
    width: 10px;
}

body.aqua-theme ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body.aqua-theme ::-webkit-scrollbar-thumb {
    background: rgba(15, 184, 184, 0.3);
    border-radius: 10px;
}

body.aqua-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 184, 184, 0.5);
}

/* Empty state */
body.aqua-theme .empty-state {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Stats card row */
body.aqua-theme .main-content .row.mb-4 {
    margin-bottom: 2rem !important;
}

/* Resources container */
body.aqua-theme #resourcesContainer {
    margin-top: 2rem !important;
}

/* Resource tags container */
body.aqua-theme .resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 5px;
}

/* Action buttons container */
body.aqua-theme .action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

/* Sidebar with better padding */
body.aqua-theme .sidebar {
    padding: 25px 15px;
}

/* Main content with better padding */
body.aqua-theme .main-content {
    padding: 25px 20px;
}

/* Resources grid with more spacing */
body.aqua-theme .resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
    body.aqua-theme .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    body.aqua-theme .resource-card {
        min-height: 180px;
    }
    
    body.aqua-theme .stats-card {
        margin-bottom: 15px;
    }
}

/* Header spacing */
body.aqua-theme .main-content .d-flex.justify-content-between {
    margin-bottom: 25px;
    padding-bottom: 15px;
}

/* Resource header with better spacing */
body.aqua-theme .resource-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal spacing improvements */
body.aqua-theme .modal-body {
    padding: 20px;
}

body.aqua-theme .modal-header {
    padding: 15px 20px;
}

body.aqua-theme .modal-footer {
    padding: 15px 20px;
}

/* Form group spacing */
body.aqua-theme .mb-3 {
    margin-bottom: 20px !important;
}

/* Database badge spacing */
body.aqua-theme .db-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

/* Container fluid with padding */
body.aqua-theme .container-fluid {
    padding: 30px 25px;
}

/* Improved spacing for resource cards in the grid */
body.aqua-theme .resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* Deactivate floating animation for mobile to prevent overlap */
@media (max-width: 992px) {
    body.aqua-theme .resource-card-container {
        margin-bottom: 15px;
    }
    
    body.aqua-theme .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Disable hover effect on mobile */
body.aqua-theme .resource-card-container:hover {
    transform: none;
}

/* Better sidebar and main content dimensions */
@media (min-width: 992px) {
    body.aqua-theme .sidebar {
        height: calc(100vh - 120px);
    }
    
    body.aqua-theme .main-content {
        height: calc(100vh - 120px);
    }
}

/* Stats cards row with better spacing */
body.aqua-theme .row.mb-4 {
    margin-bottom: 2.5rem !important;
    row-gap: 25px;
}

/* Adjust stats card spacing for mobile */
@media (max-width: 768px) {
    body.aqua-theme .stats-card {
        margin-bottom: 20px;
    }
}

/* Button styles with better spacing */
body.aqua-theme .btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Improve content wrapping in resource cards */
body.aqua-theme .resource-content {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-height: 300px;
    overflow-y: auto;
}

/* Fix for overflow in pre tags */
body.aqua-theme pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
} 