/* Custom styles for Church Notify - TRON Theme */

:root {
    /* Tron Color Palette */
    --tron-cyan: #00d9ff;
    --tron-blue: #0066ff;
    --tron-dark-blue: #001a33;
    --tron-darker-blue: #000d1a;
    --tron-orange: #ff6600;
    --tron-yellow: #ffd700;
    --tron-success: #00ff88;
    --tron-grid: rgba(0, 217, 255, 0.2);
    --tron-glow: 0 0 10px rgba(0, 217, 255, 0.5);
    --tron-glow-strong: 0 0 20px rgba(0, 217, 255, 0.8);
}

/* Body and Background */
body {
    background: linear-gradient(180deg, var(--tron-darker-blue) 0%, var(--tron-dark-blue) 100%);
    color: var(--tron-cyan);
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    min-height: 100vh;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Smooth scrolling for all elements */
* {
    scroll-behavior: smooth;
}

/* Grid overlay effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--tron-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--tron-grid) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

/* Navbar */
.navbar {
    background: rgba(0, 26, 51, 0.95) !important;
    border-bottom: 2px solid var(--tron-cyan);
    box-shadow: var(--tron-glow);
    backdrop-filter: blur(10px);
}

.navbar-toggler {
    border: 2px solid var(--tron-cyan);
    box-shadow: var(--tron-glow);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 217, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 217, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
    font-weight: bold;
    color: var(--tron-cyan) !important;
    text-shadow: var(--tron-glow);
    letter-spacing: 2px;
}

.navbar-nav .nav-link {
    color: var(--tron-cyan) !important;
    border: 1px solid transparent;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
    border: 1px solid var(--tron-cyan);
    box-shadow: var(--tron-glow);
    background: rgba(0, 217, 255, 0.1);
}

/* Cards */
.card {
    background: rgba(0, 26, 51, 0.8);
    border: 2px solid var(--tron-cyan);
    box-shadow: var(--tron-glow);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    color: var(--tron-cyan);
}

.card-header {
    background: rgba(0, 102, 255, 0.2);
    border-bottom: 2px solid var(--tron-cyan);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Stats Cards */
.card.text-white {
    border: 2px solid;
    box-shadow: var(--tron-glow-strong);
    transition: all 0.3s ease;
}

.card.text-white.bg-primary {
    background: rgba(0, 102, 255, 0.3) !important;
    border-color: var(--tron-blue);
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.6);
}

.card.text-white.bg-success {
    background: rgba(0, 255, 136, 0.3) !important;
    border-color: var(--tron-success);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.card.text-white.bg-warning {
    background: rgba(255, 102, 0, 0.3) !important;
    border-color: var(--tron-orange);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.6);
}

.card.text-white.bg-info {
    background: rgba(0, 217, 255, 0.3) !important;
    border-color: var(--tron-cyan);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.6);
}

.badge {
    font-size: 0.75em;
    border: 1px solid;
    text-shadow: var(--tron-glow);
}

.table-responsive {
    border-radius: 0.375rem;
    border: 1px solid var(--tron-cyan);
}

/* Tables */
.table {
    color: var(--tron-cyan);
}

.table thead th {
    border-bottom: 2px solid var(--tron-cyan);
    background: rgba(0, 102, 255, 0.2);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table td, .table th {
    border-color: rgba(0, 217, 255, 0.3);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 217, 255, 0.1);
    box-shadow: inset 0 0 10px rgba(0, 217, 255, 0.3);
}

/* Buttons */
.btn {
    border: 2px solid;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Small buttons in action columns */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Action button groups */
td .btn-group, td .btn-sm {
    vertical-align: middle;
}

/* Button groups - remove gaps between buttons */
.btn-group-sm > .btn,
.btn-group-sm > form > .btn {
    margin: 0;
}

.btn-group > form {
    display: inline;
}

/* Fix button group border radius when forms are involved */
.btn-group > .btn:only-child,
.btn-group > form:only-child > .btn {
    border-radius: 0.375rem;
}

.btn-group > .btn:first-child:not(:last-child),
.btn-group > form:first-child:not(:last-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:last-child:not(:first-child),
.btn-group > form:last-child:not(:first-child) > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-primary {
    background: rgba(0, 102, 255, 0.3);
    border-color: var(--tron-blue);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
}

.btn-primary:hover {
    background: rgba(0, 102, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.8);
    transform: translateY(-2px);
}

.btn-success {
    background: rgba(0, 255, 136, 0.3);
    border-color: var(--tron-success);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.btn-success:hover {
    background: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    transform: translateY(-2px);
}

.btn-warning {
    background: rgba(255, 102, 0, 0.3);
    border-color: var(--tron-orange);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.btn-warning:hover {
    background: rgba(255, 102, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.8);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(255, 0, 68, 0.3);
    border-color: #ff0044;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 68, 0.5);
}

.btn-danger:hover {
    background: rgba(255, 0, 68, 0.5);
    box-shadow: 0 0 20px rgba(255, 0, 68, 0.8);
    transform: translateY(-2px);
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger {
    background: transparent;
}

/* Forms */
.form-control, .form-select {
    background: rgba(0, 26, 51, 0.6);
    border: 2px solid var(--tron-cyan);
    color: var(--tron-cyan);
    box-shadow: inset 0 0 5px rgba(0, 217, 255, 0.3);
}

.form-control:focus, .form-select:focus {
    background: rgba(0, 26, 51, 0.8);
    border-color: var(--tron-blue);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.6);
}

.form-control::placeholder {
    color: rgba(0, 217, 255, 0.5);
}

.form-label {
    color: var(--tron-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
    font-weight: 600;
}

.form-check-input {
    background-color: rgba(0, 26, 51, 0.6);
    border: 2px solid var(--tron-cyan);
}

.form-check-input:checked {
    background-color: var(--tron-blue);
    border-color: var(--tron-cyan);
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.6);
}

.btn-group .btn {
    margin-right: 0;
}

.opacity-75 {
    opacity: 0.75;
}

/* Stats cards hover effect */
.card.text-white:hover {
    transform: translateY(-5px) scale(1.02);
    transition: all 0.3s ease;
    box-shadow: var(--tron-glow-strong), 0 10px 30px rgba(0, 217, 255, 0.4);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #fff;
    text-shadow: var(--tron-glow);
    letter-spacing: 1px;
}

/* Alerts */
.alert {
    border: 2px solid;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--tron-success);
    color: var(--tron-success);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.alert-danger {
    background: rgba(255, 0, 68, 0.2);
    border-color: #ff0044;
    color: #ff6688;
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.4);
}

.alert-warning {
    background: rgba(255, 102, 0, 0.2);
    border-color: var(--tron-orange);
    color: var(--tron-orange);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.4);
}

.alert-info {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--tron-cyan);
    color: var(--tron-cyan);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
}

/* Dropdown menus */
.dropdown-menu {
    background: rgba(0, 26, 51, 0.95);
    border: 2px solid var(--tron-cyan);
    box-shadow: var(--tron-glow-strong);
    backdrop-filter: blur(10px);
}

.dropdown-item {
    color: var(--tron-cyan);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(0, 217, 255, 0.2);
    color: #fff;
    box-shadow: inset 0 0 10px rgba(0, 217, 255, 0.3);
}

/* Pagination */
.pagination .page-link {
    background: rgba(0, 26, 51, 0.8);
    border: 2px solid var(--tron-cyan);
    color: var(--tron-cyan);
}

.pagination .page-link:hover {
    background: rgba(0, 217, 255, 0.2);
    color: #fff;
    box-shadow: var(--tron-glow);
}

.pagination .page-item.active .page-link {
    background: rgba(0, 102, 255, 0.5);
    border-color: var(--tron-blue);
    box-shadow: var(--tron-glow-strong);
}

/* Content wrapper - ensure it's above grid */
.container, .container-fluid {
    position: relative;
    z-index: 1;
}

/* Form improvements */
.form-check-label {
    cursor: pointer;
    color: var(--tron-cyan);
}

.form-text {
    font-size: 0.875em;
    color: rgba(0, 217, 255, 0.7);
}

/* Table improvements */
.table td {
    vertical-align: middle;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 2px solid var(--tron-cyan);
    background: rgba(0, 26, 51, 0.95);
    color: var(--tron-cyan);
    box-shadow: 0 -5px 20px rgba(0, 217, 255, 0.3);
}

/* Modal */
.modal-content {
    background: rgba(0, 26, 51, 0.95);
    border: 2px solid var(--tron-cyan);
    box-shadow: var(--tron-glow-strong);
    color: var(--tron-cyan);
}

.modal-header {
    border-bottom: 2px solid var(--tron-cyan);
}

.modal-footer {
    border-top: 2px solid var(--tron-cyan);
}

.modal-title {
    color: #fff;
    text-shadow: var(--tron-glow);
}

/* Close button */
.btn-close {
    filter: invert(1) brightness(2);
}

/* Clickable Cards */
.clickable-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clickable-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 30px var(--tron-cyan), 0 0 60px rgba(0, 217, 255, 0.5);
}

a.text-decoration-none {
    color: inherit;
}

/* Responsive improvements */
@media (max-width: 768px) {
    /* Reduce body padding on mobile */
    body {
        padding-bottom: 2rem;
    }
    
    /* Stats cards - full width on mobile */
    .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile-friendly buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
        margin-right: 0;
        width: 100%;
    }
    
    /* Mobile table improvements */
    .table-responsive {
        font-size: 0.875rem;
        border: 1px solid var(--tron-cyan);
    }
    
    .table td, .table th {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Stack action buttons in tables */
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        margin: 0.125rem;
    }
    
    /* Mobile navbar adjustments */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
        border-radius: 0.5rem;
    }
    
    /* Mobile form improvements */
    .form-control, .form-select {
        font-size: 1rem;
        padding: 0.75rem;
        min-height: 48px; /* Touch-friendly */
    }
    
    .form-label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .form-check-input {
        width: 1.5rem;
        height: 1.5rem;
        margin-top: 0.125rem;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
        font-size: 1rem;
    }
    
    /* Mobile card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Modal on mobile */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Mobile headings */
    h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    /* Dropdown menu mobile */
    .dropdown-menu {
        width: 100%;
        max-width: 300px;
    }
    
    /* Badge sizing */
    .badge {
        font-size: 0.85rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Alert sizing */
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    /* Container padding */
    .container, .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Row adjustments */
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 576px) {
    /* Even smaller text on very small screens */
    body {
        font-size: 0.95rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    /* Stats cards - compact on very small screens */
    .card.text-white .card-body {
        padding: 0.75rem;
    }
    
    .card.text-white h5 {
        font-size: 0.875rem;
    }
    
    .card.text-white h2 {
        font-size: 1.5rem;
    }
    
    /* Table scrolling on very small screens */
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Landscape orientation optimizations */
@media (max-height: 600px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .card {
        margin-bottom: 0.5rem;
    }
    
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Touch-friendly improvements for all mobile */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn, .nav-link, .dropdown-item, .page-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better spacing for touch */
    .table tbody tr {
        cursor: pointer;
    }
    
    /* Remove hover effects on touch devices */
    .card.text-white:hover {
        transform: none;
    }
    
    /* Tap highlight color */
    * {
        -webkit-tap-highlight-color: rgba(0, 217, 255, 0.3);
    }
}

/* Loading spinner */
.spinner-border {
    border-color: var(--tron-cyan);
    border-right-color: transparent;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Navigation active state */
.navbar-nav .nav-link.active {
    font-weight: bold;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 26, 51, 0.8);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.5);
    border-radius: 6px;
    box-shadow: inset 0 0 5px rgba(0, 217, 255, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.8);
    box-shadow: inset 0 0 10px rgba(0, 217, 255, 1);
}

/* Icons glow effect */
.fas, .fab {
    filter: drop-shadow(0 0 5px currentColor);
}

/* Link styling */
a {
    color: var(--tron-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: var(--tron-glow);
}

/* Text colors */
.text-muted {
    color: rgba(0, 217, 255, 0.6) !important;
}

/* Breadcrumb */
.breadcrumb {
    background: rgba(0, 26, 51, 0.6);
    border: 1px solid var(--tron-cyan);
}

.breadcrumb-item.active {
    color: var(--tron-cyan);
}
    color: rgba(255,255,255,0.9) !important;
}

/* Calendar Event Styling */
.fc-event {
    color: white !important;
}

.fc-event-title,
.fc-event-time,
.fc-daygrid-event .fc-event-title,
.fc-timegrid-event .fc-event-title,
.fc-list-event .fc-event-title {
    color: white !important;
}

.fc-event-main {
    color: white !important;
}
