/* CSS Variables */
:root {
    --primary-color: #01A2B4;
    --primary-dark: #018c9a;
    --text-color: #2d3748;
    --border-color: #ddd;
    --primary-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --heading-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --shadow-color: rgba(0,0,0,0.1);
    --overlay-color: rgba(0,0,0,0.5);
}

/* Base Styles */
body {
    font-family: var(--primary-font);
    color: var(--text-color);
    background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--text-color);
}

/* Navigation Styles */
.navbar {
    background-color: var(--primary-color) !important;
}

.navbar-brand {
    font-weight: bold;
    font-family: var(--heading-font);
    display: flex;
    align-items: center;
}

.navbar-brand img {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
}

/* Hamburger and Sidebar Styles */
.hamburger {
    cursor: pointer;
    border: none;
    background: none;
    color: var(--white);
    font-size: 1.5rem;
    padding: 0.5rem;
    transition: opacity 0.2s ease;
}

.hamburger:hover {
    opacity: 0.8;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--primary-color);
    transition: right 0.3s ease;
    z-index: 1050;
    box-shadow: -2px 0 10px var(--shadow-color);
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--heading-font);
    color: var(--white);
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.sidebar-close:hover {
    opacity: 0.8;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: background-color 0.2s;
    font-family: var(--primary-font);
}

.sidebar-nav a:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--overlay-color);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Card Styles */
.spam-card {
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
}

.spam-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.filter-config {
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Modern Button Styles */
.btn {
    font-family: var(--primary-font);
    font-weight: 500;
    border-radius: 8px;
    border: none;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:disabled {
    transform: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #016a75 100%);
    color: white;
}

.btn-primary:active {
    background: linear-gradient(135deg, #016a75 0%, #014d56 100%);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

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

.btn-outline-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border: 1px solid #ffc107;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #c69500 100%);
    color: #212529;
}

.btn-warning:active {
    background: linear-gradient(135deg, #c69500 0%, #a67c00 100%);
    color: #212529;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: 1px solid #28a745;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    color: white;
}

.btn-success:active {
    background: linear-gradient(135deg, #155724 0%, #0d3118 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    color: white;
}

.btn-danger:active {
    background: linear-gradient(135deg, #bd2130 0%, #a71e2a 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    color: white;
}

.btn-secondary:active {
    background: linear-gradient(135deg, #495057 0%, #3d4349 100%);
    color: white;
}

/* Button size variants */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Loading state for buttons */
.btn.loading {
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: currentColor;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from { transform: rotate(0turn); }
    to { transform: rotate(1turn); }
}

/* Modern card button styles */
.card .btn {
    margin-top: 0.5rem;
}

/* Special handling for icon buttons */
.btn i {
    font-size: 1em;
}

.btn i:only-child {
    margin: 0;
}

/* Focus states for accessibility */
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus:not(:focus-visible) {
    outline: none;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(1, 162, 180, 0.25);
}

/* Alert Styles */
.alert-info {
    background-color: rgba(1, 162, 180, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

/* Custom Notification Styles */
.gh-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    min-width: 300px;
    z-index: 9999;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease-in-out;
    pointer-events: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-color);
    font-family: var(--primary-font);
}

/* Removed gh-notification-show class - notifications are visible by default */

.gh-notification-content {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid;
}

.gh-notification-success .gh-notification-content {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.gh-notification-error .gh-notification-content {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.gh-notification-warning .gh-notification-content {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.gh-notification-info .gh-notification-content {
    background-color: #e1f5f7;
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

.gh-notification-content i:first-child {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.gh-notification-message {
    flex-grow: 1;
    font-weight: 500;
    line-height: 1.4;
}

.gh-notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    margin-left: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    color: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.gh-notification-close:hover {
    opacity: 1;
}

/* Stack multiple notifications */
.gh-notification:nth-child(n+2) {
    top: calc(20px + (80px * var(--notification-index, 1)));
}

/* Loading overlay styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.loading-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.loading-content .progress {
    margin: 1rem auto 0;
    border-radius: 6px;
    background-color: var(--light-bg);
}

.loading-content .progress-bar {
    background-color: var(--primary-color);
}

.get-started-btn:hover {
    background: linear-gradient(135deg, #0066cc, #004499);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.slack-integration {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 400px;
}

.slack-integration h3 {
    margin: 0 0 1rem 0;
    color: #ffffff;
}

.slack-integration p {
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.8);
}

.forwarding-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slack-config-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.slack-config-section h6 {
    color: #495057;
    font-weight: 600;
}

#current-channel .alert {
    margin: 0;
}

.slack-btn {
    display: inline-block;
    transition: transform 0.2s ease;
}

.slack-btn:hover {
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .gh-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }

    .loading-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .loading-content .progress {
        width: 250px !important;
    }
}