/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    padding-bottom: 2rem;
}

/* Color variables - Updated to Malachite Green */
:root {
    --primary-color: #00e259;
    --primary-hover: #00c149;
    --primary-light: rgba(0, 226, 89, 0.15);
    --primary-lighter: rgba(0, 226, 89, 0.05);
    --primary-dark: #00a03d;
}

/* Enhanced Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-dark .navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.8rem 1rem;
    transition: color 0.2s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #66eb99;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: #66eb99;
    border-bottom: 2px solid #00e259;
}

/* Green-inspired Colors */
.btn-primary {
    background-color: #00e259;
    border-color: #00e259;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #00c149;
    border-color: #00c149;
    color: #fff;
}

.btn-outline-primary {
    color: #00e259;
    border-color: #00e259;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #00e259;
    border-color: #00e259;
    color: #fff;
}

.bg-primary {
    background-color: #00e259 !important;
    color: white;
}

.text-primary {
    color: #00e259 !important;
}

/* Enhanced Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,.04);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 16px rgba(0,0,0,.1);
}

.card-header {
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Jumbotron enhancements */
.jumbotron {
    border-radius: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e8 100%);
    box-shadow: 0 8px 20px rgba(0,0,0,.05);
    padding: 3rem !important;
}

/* Form Styling */
.form-control {
    border-radius: 8px;
    padding: 0.8rem 1rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #00e259;
    box-shadow: 0 0 0 0.2rem rgba(0, 226, 89, 0.25);
}

textarea.form-control {
    min-height: 150px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Button Styling */
.btn {
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-lg {
    padding: 0.7rem 1.5rem;
    font-size: 1.1rem;
}

/* Tab Navigation */
.nav-tabs {
    border-bottom: none;
}

.nav-tabs .nav-link {
    margin-right: 5px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    color: #495057;
}

.nav-tabs .nav-link.active {
    background-color: white;
    border-color: #dee2e6 #dee2e6 #fff;
    color: #00e259;
}

.tab-content {
    background-color: white;
    border-radius: 0 8px 8px 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

/* Table Styling */
.table {
    vertical-align: middle;
}

.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-top: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 226, 89, 0.05);
}

/* Alert Enhancements */
.alert {
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.15);
    color: #055160;
    border-left: 4px solid #0dcaf0;
}

.alert-success {
    background-color: rgba(0, 226, 89, 0.15);
    color: #0a5a2a;
    border-left: 4px solid #00e259;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #664d03;
    border-left: 4px solid #ffc107;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: #842029;
    border-left: 4px solid #dc3545;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid #e9ecef;
}

/* Badge Styling */
.badge {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Loading Indicator */
.loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #00e259;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

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

/* Channel Info */
.channel-info {
    max-height: 100px;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #adb5bd;
}

/* Icon Enhancements */
.bi {
    margin-right: 0.25rem;
}

/* Custom Green Color Classes (Updated from Purple) */
.btn-purple, .btn-green {
    background-color: #00e259;
    border-color: #00e259;
    color: #fff;
}

.btn-purple:hover, .btn-green:hover,
.btn-purple:focus, .btn-green:focus {
    background-color: #00c149;
    border-color: #00c149;
    color: #fff;
}

.btn-outline-purple, .btn-outline-green {
    color: #00e259;
    border-color: #00e259;
}

.btn-outline-purple:hover, .btn-outline-green:hover {
    background-color: #00e259;
    color: #fff;
}

.bg-purple, .bg-green {
    background-color: #00e259 !important;
    color: white;
}

.text-purple, .text-green {
    color: #00e259 !important;
}

.border-purple, .border-green {
    border-color: #00e259 !important;
}

/* Template modal styles - make them wider */
.template-modal-lg .modal-dialog {
    max-width: 800px;
    width: 90%;
}

.template-content-editor {
    font-family: monospace;
    min-height: 300px;
}

/* Template selection dropdown */
.template-selector {
    max-height: 400px;
    overflow-y: auto;
}

.template-selector .dropdown-item {
    white-space: normal;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

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

.template-selector .template-title {
    font-weight: 600;
    display: block;
}

.template-selector .template-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

.template-selector .template-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.75rem;
}

.template-badge {
    font-size: 70%;
    padding: 2px 6px;
}

/* Template dropdown styling */
.dropdown-menu.template-selector {
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.dropdown-menu.template-selector .dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
}

.dropdown-menu.template-selector .dropdown-item {
    padding: 0.5rem 1rem;
    white-space: normal;
}

.dropdown-menu.template-selector .dropdown-item:hover {
    background-color: var(--primary-lighter);
}

.dropdown-menu.template-selector .dropdown-item:active {
    background-color: var(--primary-light);
    color: inherit;
}

/* Fix for the template loading spinner */
.template-selector .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Additional accent colors for variety */
.accent-green-light {
    color: #33eb77 !important;
}

.accent-green-dark {
    color: #00a03d !important;
}

.bg-green-gradient {
    background: linear-gradient(135deg, #00e259 0%, #00c149 100%) !important;
}