/* Azure Updates Dashboard Styles - Dark Purple Theme with Light Mode Toggle */

/* Font Awesome Icons - Using Unicode characters */
.fas::before, .far::before, .fab::before {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.fa-microsoft::before { content: "☁️"; }
.fa-newspaper::before { content: "🎉"; }
.fa-rss::before { content: "✅"; }
.fa-clock::before { content: "🕐"; }
.fa-sync-alt::before { content: "🔄"; }
.fa-calendar::before { content: "📅"; }
.fa-github::before { content: "⭐️"; }
.fa-sun::before { content: "☀️"; }
.fa-moon::before { content: "🌙"; }

/* Basic Reset */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Dark Theme (Default) */
body {
    background: linear-gradient(135deg, #1a0d2e, #16213e);
    background-attachment: fixed;
    color: #e8e6ff;
}

/* Light Theme */
body.light-mode {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    background-attachment: fixed;
    color: #1e293b;
}

/* Header */
.header {
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

/* Dark theme header */
.header {
    background: linear-gradient(135deg, #6f3096, #4c1d95, #312e81);
    box-shadow: 0 4px 20px rgba(111, 48, 150, 0.3);
}

/* Light theme header */
body.light-mode .header {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8, #1e40af);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Container & Grid */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1140px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-md-9, .col-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Responsive columns */
@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .text-md-end { text-align: right; }
}

.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Update Cards - Dark Theme */
.update-card {
    transition: all 0.3s ease;
    border-left: 4px solid #8b5cf6;
    border: 1px solid #4c1d95;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, #2d1b69, #1e1440);
    margin-bottom: 1rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}

/* Update Cards - Light Theme */
body.light-mode .update-card {
    border-left: 4px solid #3b82f6;
    border: 1px solid #e2e8f0;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.update-card:hover {
    transform: translateY(-4px);
}

/* Dark theme hover */
.update-card:hover {
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
    border-left-color: #a855f7;
}

/* Light theme hover */
body.light-mode .update-card:hover {
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
    border-left-color: #2563eb;
}

.card-body {
    padding: 1.5rem;
}

.card-body h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body h5 a {
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Dark theme text */
.card-body h5 a {
    color: #e8e6ff;
}

.card-body h5 a:hover {
    color: #c4b5fd;
}

.card-body p {
    color: #a8a6c1;
}

/* Light theme text */
body.light-mode .card-body h5 a {
    color: #1e293b;
}

body.light-mode .card-body h5 a:hover {
    color: #3b82f6;
}

body.light-mode .card-body p {
    color: #64748b;
}

.card-body p {
    margin: 0;
    line-height: 1.5;
}

/* Source Badges */
.source-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 1rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.azure-updates {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.azure-architecture {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.azure-status {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.azure-blog {
    background: linear-gradient(45deg, #0ea5e9, #0284c7);
    color: white;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.microsoft-365 {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.security {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

/* Filter Section - Dark Theme */
.filter-section {
    background: linear-gradient(145deg, #2d1b69, #1e1440);
    border: 1px solid #4c1d95;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(10px);
}

/* Filter Section - Light Theme */
body.light-mode .filter-section {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.search-box {
    border-radius: 2rem;
    padding: 0.7rem 1.2rem;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Dark theme search box */
.search-box {
    border: 2px solid #4c1d95;
    background: rgba(45, 27, 105, 0.5);
    color: #e8e6ff;
}

.search-box:focus {
    border-color: #8b5cf6;
    outline: none;
    box-shadow: 0 0 0 0.3rem rgba(139, 92, 246, 0.2);
    background: rgba(45, 27, 105, 0.8);
}

.search-box::placeholder {
    color: #a8a6c1;
}

/* Light theme search box */
body.light-mode .search-box {
    border: 2px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b;
}

body.light-mode .search-box:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.3rem rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 1);
}

body.light-mode .search-box::placeholder {
    color: #64748b;
}

/* Stats Cards - Dark Theme */
.stats-card {
    background: linear-gradient(145deg, #6f3096, #4c1d95);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid #7c3aed;
    box-shadow: 0 4px 20px rgba(111, 48, 150, 0.3);
    transition: transform 0.2s ease;
}

/* Stats Cards - Light Theme */
body.light-mode .stats-card {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    border: 1px solid #2563eb;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.stats-card:hover {
    transform: translateY(-2px);
}

/* Dark theme stats hover */
.stats-card:hover {
    box-shadow: 0 6px 25px rgba(111, 48, 150, 0.4);
}

/* Light theme stats hover */
body.light-mode .stats-card:hover {
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

.stats-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.stats-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stats-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Form Controls - Dark Theme */
.form-control, .form-select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.8rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #e8e6ff;
    background: rgba(45, 27, 105, 0.5);
    border: 2px solid #4c1d95;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    color: #e8e6ff;
    background: rgba(45, 27, 105, 0.8);
    border-color: #8b5cf6;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(139, 92, 246, 0.2);
}

/* Form Controls - Light Theme */
body.light-mode .form-control, 
body.light-mode .form-select {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e2e8f0;
}

body.light-mode .form-control:focus, 
body.light-mode .form-select:focus {
    color: #1e293b;
    background: rgba(255, 255, 255, 1);
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.2);
}

.form-select {
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Dark theme dropdown arrow */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e8e6ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Light theme dropdown arrow */
body.light-mode .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231e293b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* Utility Classes */
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.text-center { text-align: center; }
.text-decoration-none { text-decoration: none; }
.align-items-center { align-items: center; }

/* Text Colors */
.text-muted {
    color: #a8a6c1;
}

body.light-mode .text-muted {
    color: #64748b;
}

/* Links */
.github-link {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Dark theme links */
.github-link {
    color: #a8a6c1;
}

.github-link:hover {
    color: #c4b5fd;
}

/* Light theme links */
body.light-mode .github-link {
    color: #64748b;
}

body.light-mode .github-link:hover {
    color: #3b82f6;
}

.date-text {
    font-size: 0.875rem;
}

/* Dark theme date */
.date-text {
    color: #a8a6c1;
}

/* Light theme date */
body.light-mode .date-text {
    color: #64748b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        background: linear-gradient(180deg, #1a0d2e, #16213e);
    }
    
    body.light-mode {
        background: linear-gradient(180deg, #f8fafc, #e2e8f0);
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .header h1 {
        font-size: 1.75rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .azure-logo {
        height: 1.25rem;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .theme-toggle {
        position: static;
        margin-top: 1rem;
        align-self: flex-start;
    }
    
    .stats-card {
        margin-bottom: 0.5rem;
        padding: 1rem;
    }
    
    .stats-card h3, .stats-card h4 {
        font-size: 1.5rem;
    }
    
    .filter-section {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .update-card .col-md-3 {
        margin-top: 1rem;
        text-align: left;
    }
    
    .row {
        margin-right: -10px;
        margin-left: -10px;
    }
    
    .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-md-9, .col-12 {
        padding-right: 10px;
        padding-left: 10px;
    }
    
    .search-box {
        margin-bottom: 1rem;
    }
}

/* Scrollbar Styling - Dark Theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a0d2e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6f3096, #4c1d95);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6, #7c3aed);
}

/* Scrollbar Styling - Light Theme */
body.light-mode ::-webkit-scrollbar-track {
    background: #f8fafc;
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #1e40af);
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .filter-section, .stats-card, .theme-toggle {
        display: none;
    }
    
    .update-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        background: white;
        border: 1px solid #ccc;
    }
}

/* ========================================= */
/* FIX FOR LIGHT MODE DROPDOWN DISPLAY ISSUE */
/* ========================================= */

/* Fix dropdown options visibility in light mode */
body.light-mode .form-select option {
    color: #1e293b !important;  /* Ensure text is dark */
    background: white !important;  /* Ensure background is white */
}

/* Ensure the selected item text is visible */
body.light-mode .form-select:not([multiple]) {
    color: #1e293b !important;
}

/* Remove any icon content from options if present */
body.light-mode .form-select option::before,
body.light-mode .form-select option::after {
    content: none !important;
}

/* Additional fix: Ensure FA icons don't interfere with dropdowns */
.form-select .fas::before,
.form-select .far::before,
.form-select .fab::before,
.form-select [class*="fa-"]::before {
    content: none !important;
}

/* Ensure proper font family for dropdown to prevent icon font issues */
.form-select,
.form-select option {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}


/* ========================================= */
/* FIX FOR LIGHT MODE SEARCH + SELECT        */
/* ========================================= */

/* Zorg dat tekst en cursor zichtbaar zijn */
body.light-mode .search-box {
    color: #0f172a;       /* donkere tekst */
    caret-color: #0f172a; /* cursor goed zichtbaar */
}

/* Forceer één enkele dropdown-arrow en achtergrond */
body.light-mode .form-select {
    background-image:
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231e293b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"),
        linear-gradient(#ffffff, #ffffff);
    background-repeat: no-repeat, no-repeat;
    background-position: right 0.75rem center, 0 0;
    background-size: 16px 12px, 100% 100%;
    padding-right: 2.25rem; /* ruimte voor arrow */
}

/* Verwijder ongewenste FA pseudo-content in select */
body.light-mode .form-select .fas::before,
body.light-mode .form-select .far::before,
body.light-mode .form-select .fab::before,
body.light-mode .form-select [class*="fa-"]::before {
    content: none !important;
}

/* Leesbare dropdown opties */
body.light-mode .form-select,
body.light-mode .form-select option {
    color: #1e293b !important;
    background-color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Consistent gedrag in Safari/Firefox */
body.light-mode .form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-color: #e2e8f0;
}
/* Floating Particles Link Effect - Add this to your style.css */

/* Basic link styling with white colors */
a:link {
  color: #ffffff;
  background-color: transparent;
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
  padding: 2px 8px;
  border-radius: 15px;
}

a:visited {
  color: #e2e8f0;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: #06d6a0;
  background-color: rgba(6, 214, 160, 0.05);
  text-decoration: none;
  border: 1px solid rgba(6, 214, 160, 0.3);
  text-shadow: 0 0 10px rgba(6, 214, 160, 0.6);
  transform: translateY(-1px);
}

a:active {
  color: #059669;
  background-color: transparent;
  text-decoration: none;
  transform: translateY(0);
}

/* Floating particles effect */
a:hover::before,
a:hover::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: #06d6a0;
  border-radius: 50%;
  pointer-events: none;
  animation: float-particle 1.2s ease-out infinite;
  box-shadow: 0 0 8px rgba(6, 214, 160, 0.8);
}

/* First particle - left side */
a:hover::before {
  left: 20%;
  top: 0;
  animation-delay: 0s;
}

/* Second particle - right side */
a:hover::after {
  right: 20%;
  top: 0;
  animation-delay: 0.4s;
}

/* Particle floating animation */
@keyframes float-particle {
  0% {
    transform: translateY(0) scale(0);
    opacity: 0;
  }
  20% {
    transform: translateY(-5px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-25px) scale(0.5);
    opacity: 0;
  }
}

/* Extra particle for more effect (using a CSS trick with box-shadow) */
a:hover {
  position: relative;
}

a:hover::before {
  box-shadow: 
    0 0 8px rgba(6, 214, 160, 0.8),
    15px -10px 0 -2px rgba(6, 214, 160, 0.6),
    -15px -15px 0 -2px rgba(6, 214, 160, 0.4);
  animation: float-particle-multi 1.5s ease-out infinite;
}

@keyframes float-particle-multi {
  0% {
    transform: translateY(0) scale(0);
    opacity: 0;
  }
  30% {
    transform: translateY(-8px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-30px) scale(0);
    opacity: 0;
  }
}
