/* CPA Network Custom Styles */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav:last-child {
    flex-direction: column !important;
    align-items: flex-end !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
}

/* Dashboard Stats */
.stats-card {
    border-left: 4px solid;
    transition: transform 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
}

.stats-card.bg-primary {
    border-left-color: #0056b3;
}

.stats-card.bg-success {
    border-left-color: #0f5132;
}

.stats-card.bg-info {
    border-left-color: #055160;
}

.stats-card.bg-warning {
    border-left-color: #664d03;
}

/* Offer Cards */
.offer-card {
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.offer-payout {
    font-size: 1.5rem;
    font-weight: bold;
    color: #28a745;
}

.offer-category {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.geo-flags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.geo-flags span {
    font-size: 1.25rem;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-group-text {
    border-radius: 6px 0 0 6px;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Tables */
.table {
    background-color: #fff;
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    background-color: #f8f9fa;
    color: #000;
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 4px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
}

/* Admin statistics page table headers - Bootstrap primary blue */
.table-dark,
.table-dark th,
.table thead th {
    background-color: #022963 !important;
    color: white !important;
}

/* Admin statistics page - table header text color */
#userStatisticsTable thead th,
.table-striped thead th {
    color: white !important;
    background-color: #065fe478 !important;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #fff !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-nav {
        text-align: center;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .offer-card {
        margin-bottom: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Copy Button */
.copy-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: #e9ecef;
}

.copy-btn.copied {
    background-color: #28a745;
    color: white;
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-pill {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.filter-pill:hover {
    background-color: #f8f9fa;
}

.filter-pill.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: #28a745;
}

.status-indicator.pending {
    background-color: #ffc107;
}

.status-indicator.suspended {
    background-color: #dc3545;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
}

/* Tooltips */
.tooltip-inner {
    background-color: #333;
    color: #fff;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

/* Mobile Bottom Navigation */
@media (max-width: 576px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        border-top: 1px solid #dee2e6;
        padding: 0.5rem 0;
        z-index: 1000;
    }
    
    .mobile-bottom-nav .nav-link {
        color: #6c757d;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.75rem;
        transition: color 0.2s ease;
    }
    
    .mobile-bottom-nav .nav-link.active {
        color: #007bff;
    }
    
    .mobile-bottom-nav .nav-link i {
        display: block;
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    /* Add bottom padding to main content to avoid overlap */
    main {
        padding-bottom: 60px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #fff;
    }
    
    .card {
        background-color: #1e1e1e;
        color: #fff;
    }
    
    .table {
        background-color: #1e1e1e;
        color: #fff;
    }
    
    .form-control, .form-select {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #fff;
    }
    
    .form-control:focus, .form-select:focus {
        background-color: #ac3030;
        border-color: #007bff;
        color: #fff;
    }
}

/* 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 {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
