/* Custom styles for CensorBot Dashboard - Dark Mode */

:root {
    --primary-color: #5865f2;
    --secondary-color: #4752c4;
    --success-color: #57f287;
    --danger-color: #ed4245;
    --warning-color: #fee75c;
    --info-color: #5bc0de;
    
    /* Dark mode color scheme */
    --bg-primary: #2c2f33;
    --bg-secondary: #23272a;
    --bg-tertiary: #36393f;
    --text-primary: #dcddde;
    --text-secondary: #b9bbbe;
    --text-muted: #72767d;
    --border-color: #40444b;
    --hover-bg: #40444b;
}

body {
    background-color: #2c2f33;
    color: var(--text-primary) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Force dark theme on all elements */
html {
    background-color: #2c2f33;
}

/* Override any Bootstrap white backgrounds */
.bg-white {
    background-color:#2c2f33;
}

.text-dark {
    color: var(--text-primary) !important;
}

/* Override Bootstrap's default light theme */
.bg-dark {
    background-color: var(--bg-secondary) !important;
}

.navbar-dark {
    background-color: var(--bg-secondary) !important;
}

.card {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.hover-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
}

.card-header {
    background-color: rgba(88, 101, 242, 0.15);
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
    color: var(--text-primary);
}

.card-body {
    background-color: var(--bg-tertiary);
}

/* Form controls dark mode */
.form-control, .form-select {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(88, 101, 242, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Dropdown dark mode */
.dropdown-menu {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* Text colors */
.text-muted {
    color: var(--text-muted) !important;
}

.text-light {
    color: var(--text-secondary) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
}

/* Pastel button outline styles */
.btn-outline-primary {
    color: #87CEEB !important;  /* Light blue */
    border-color: #87CEEB !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: rgba(135, 206, 235, 0.2) !important;
    border-color: #87CEEB !important;
    color: #87CEEB !important;
}

.btn-outline-success {
    color: #98FB98 !important;  /* Light green */
    border-color: #98FB98 !important;
    background-color: transparent !important;
}

.btn-outline-success:hover {
    background-color: rgba(152, 251, 152, 0.2) !important;
    border-color: #98FB98 !important;
    color: #98FB98 !important;
}

.btn-outline-danger {
    color: #FFB6C1 !important;  /* Light pink/red */
    border-color: #FFB6C1 !important;
    background-color: transparent !important;
}

.btn-outline-danger:hover {
    background-color: rgba(255, 182, 193, 0.2) !important;
    border-color: #FFB6C1 !important;
    color: #FFB6C1 !important;
}

/* Edit button styling - higher specificity to override Bootstrap */
.btn.btn-outline-secondary,
button.btn-outline-secondary,
.btn-group .btn-outline-secondary {
    color: #FFDDAA !important;  /* Pastel orange/yellow for Edit button */
    border-color: #FFDDAA !important;
    background-color: transparent !important;
    border-width: 2px !important;  /* Thicker border to stand out */
}

.btn.btn-outline-secondary:hover,
button.btn-outline-secondary:hover,
.btn-group .btn-outline-secondary:hover,
.btn.btn-outline-secondary:focus,
button.btn-outline-secondary:focus,
.btn-group .btn-outline-secondary:focus {
    background-color: rgba(255, 221, 170, 0.2) !important;
    border-color: #FFDDAA !important;
    color: #FFDDAA !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 221, 170, 0.25) !important;
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
    color: var(--bg-primary) !important;
}

.badge.bg-danger {
    background-color: var(--danger-color) !important;
}

.badge.bg-secondary {
    background-color: var(--text-muted) !important;
}

/* Server dropdown specific styling */
.server-dropdown {
    min-width: 280px;
}

.server-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.server-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.server-dropdown .server-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.server-dropdown .server-status {
    font-size: 0.75rem;
    margin-left: auto;
}

.server-add {
    color: var(--text-muted);
    font-style: italic;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: #747f8d;
}

.status-idle {
    color: var(--warning-color);
}

.status-dnd {
    color: var(--danger-color);
}

/* Discord-like styling */
.discord-embed {
    border-left: 4px solid var(--primary-color);
    background-color: rgba(88, 101, 242, 0.15);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

/* Footer */
footer {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Form check inputs */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: var(--bg-primary);
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* Switch styling */
.form-check-input {
    border-radius: 50px;
}

.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    border-radius: 3em;
}

/* Hover effects */
.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .server-dropdown {
        min-width: 250px;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Alert components - dark mode styling */
.alert {
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.alert-info {
    background-color: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.3);
    color: var(--text-primary);
}

.alert-success {
    background-color: #57f287;
    border-color: #57f287;
    color: #000;
}

.alert-warning {
    background-color: #fee75c;
    border-color: #fee75c;
    color: #000;
}

.alert-danger {
    background-color: #ed4245;
    border-color: #ed4245;
    color: #fff;
}

.alert-primary {
    background-color: #5865f2;
    border-color: #5865f2;
    color: #fff;
}

.alert-info {
    background-color: #00b0f4;
    border-color: #00b0f4;
    color: #fff;
}

.alert-secondary {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Alert icons */
.alert .fas {
    color: inherit;
}

/* Toast notifications - dark mode */
.toast {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.toast-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.toast-body {
    color: var(--text-primary);
}

/* Drag and Drop Styles for Filter Lists */
.filter-list-item {
    transition: transform 0.2s ease, margin-top 0.2s ease, box-shadow 0.3s ease, opacity 0.2s ease;
    cursor: move;
}

.filter-list-item:hover:not(.dragging) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.filter-list-item.dragging {
    opacity: 0.5;
    position: relative;
    z-index: 999;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.drag-handle {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.drag-handle:hover {
    opacity: 1;
}

/* Drag ghost styling */
.drag-ghost {
    pointer-events: none;
    opacity: 0.4;
    transform: scale(0.95);
    border: 2px dashed #007bff !important;
    background: linear-gradient(45deg, rgba(0,123,255,0.1), rgba(0,123,255,0.2)) !important;
    filter: blur(0.5px);
    animation: ghostPulse 2s infinite;
}

@keyframes ghostPulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.6; }
    100% { opacity: 0.4; }
}

/* Priority Badge Colors */
.priority-badge-1, .priority-badge-2 {
    background-color: #dc3545 !important; /* Red - Highest Priority */
}

.priority-badge-3, .priority-badge-4 {
    background-color: #fd7e14 !important; /* Orange - High Priority */
}

.priority-badge-5, .priority-badge-6 {
    background-color: #0d6efd !important; /* Blue - Medium Priority */
}

.priority-badge-7, .priority-badge-8, .priority-badge-9, .priority-badge-10 {
    background-color: #17a2b8 !important; /* Teal - Lower Priority */
}

/* Better tab styling for giveaways and other nav-tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-color) !important;
}

.nav-tabs .nav-item {
    margin-bottom: -2px;
}

.nav-tabs .nav-link {
    background-color: transparent !important;
    border: 2px solid transparent !important;
    border-bottom: 2px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px 8px 0 0 !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

.nav-tabs .nav-link:hover {
    background-color: rgba(88, 101, 242, 0.1) !important;
    border-color: transparent transparent var(--primary-color) transparent !important;
    color: var(--text-primary) !important;
}

.nav-tabs .nav-link.active {
    background-color: rgba(88, 101, 242, 0.2) !important;
    border-color: var(--primary-color) var(--primary-color) var(--primary-color) var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

.nav-tabs .nav-link.active:hover {
    background-color: rgba(88, 101, 242, 0.25) !important;
    color: var(--primary-color) !important;
}

/* Inline editing styles for custom messages */
.editable-title, .editable-content {
    position: relative;
}

.editable-title:hover::after, .editable-content:hover::after {
    content: "✏️";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
}

.inline-editing {
    background-color: rgba(88, 101, 242, 0.1) !important;
    border-radius: 4px !important;
}

/* Style for inline edit inputs */
.custom-message-item input[type="text"],
.custom-message-item textarea {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    font-family: inherit !important;
    font-size: inherit !important;
    width: 100% !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.custom-message-item input[type="text"]:focus,
.custom-message-item textarea:focus {
    box-shadow: 0 0 0 0.2rem rgba(88, 101, 242, 0.25) !important;
}

/* Inline edit button styling */
.custom-message-item .btn-success {
    background-color: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: var(--bg-primary) !important;
}

.custom-message-item .btn-secondary {
    background-color: var(--text-muted) !important;
    border-color: var(--text-muted) !important;
    color: var(--bg-primary) !important;
}

/* Giveaway Card Mobile Fixes */
.giveaway-card {
    overflow: hidden;
}

.giveaway-card .card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Fix button groups on mobile */
.giveaway-card .btn-group {
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
}

/* On mobile, make buttons scrollable horizontally */
@media (max-width: 576px) {
    .giveaway-card .btn-group {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 0.25rem;
    }
    
    .giveaway-card .btn-group .btn {
        flex: 0 0 auto;
        min-width: fit-content;
        scroll-snap-align: start;
        white-space: nowrap;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Add visual indicator that there's more content to scroll */
    .giveaway-card .btn-group::-webkit-scrollbar {
        height: 4px;
    }
    
    .giveaway-card .btn-group::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 2px;
    }
    
    .giveaway-card .btn-group::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }
}

/* On tablets and small desktops, wrap buttons if needed */
@media (min-width: 577px) and (max-width: 991px) {
    .giveaway-card .btn-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .giveaway-card .btn-group .btn {
        flex: 1 1 auto;
        min-width: 80px;
        font-size: 0.875rem;
    }
}

/* Ensure cards don't overflow their containers */
.giveaway-card {
    max-width: 100%;
    word-wrap: break-word;
}

.giveaway-card h6,
.giveaway-card .card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fix the statistics row on mobile */
@media (max-width: 576px) {
    .giveaway-card .row.text-center > .col-3 {
        padding: 0 0.25rem;
    }
    
    .giveaway-card .row.text-center small {
        font-size: 0.65rem;
    }
    
    .giveaway-card .fw-bold {
        font-size: 0.875rem;
    }
} 