/* Custom CSS for CryptoExplorer */

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* Card styling */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
}

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

.card-header {
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Coin cards */
.coin-card {
    height: 100%;
}

.coin-card .coin-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.coin-card .card-title {
    display: flex;
    align-items: center;
}

.coin-card .card-title img {
    margin-right: 10px;
}

/* Explorer specific styles */
.explorer-header {
    background-color: #343a40;
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.explorer-search {
    max-width: 600px;
    margin: 0 auto;
}

.overview-box {
    background-color: #fff;
    border-left: 4px solid #007bff;
}

.overview-box .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.overview-box .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Table styling */
.table-explorer th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-explorer td, .table-explorer th {
    vertical-align: middle;
}

/* Pagination styling */
.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Ad containers */
.ad-container {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: content-box !important;
}

/* Ad cards */
.card-header.py-1 {
    min-height: 30px;
    box-sizing: border-box !important;
}

/* Desktop ad dimensions */
@media (min-width: 768px) {
    /* Sidebar ad dimensions */
    .ad-container#ad-sidebar {
        width: 300px;
        height: 250px;
    }

    /* Banner ad dimensions */
    .ad-container:not(#ad-sidebar) {
        width: 728px;
        height: 90px;
    }

    /* Container cards */
    .ad-sidebar-container {
        width: 300px;
    }

    .ad-banner-container {
        width: 728px;
    }
}

/* Additional styles for all screen sizes */
.ad-image {
    object-fit: contain;
}

/* Container styles */
.ad-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ad report button */
.ad-report-btn {
    transition: opacity 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ad-report-btn:hover {
    opacity: 1 !important;
}

/* Ensure ad cards have consistent margins */
.card.mb-4.mx-auto {
    max-width: 728px;
}

/* Responsive ad sizing for mobile devices */
@media (max-width: 767.98px) {
    /* Make ad cards responsive */
    .card.mb-4.mx-auto,
    .ad-banner-container {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;


    /* Make sidebar container responsive but centered */
    .ad-sidebar-container {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;

    }

    /* Make banner ad containers responsive */
    .ad-container:not(#ad-sidebar) {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        aspect-ratio: 728/90 !important; /* Maintain aspect ratio */

    }

    /* Make banner ad images responsive */
    .ad-container:not(#ad-sidebar) img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }

    /* Make banner ad links responsive */
    .ad-container:not(#ad-sidebar) a {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Make ad wrappers responsive */
    .ad-wrapper {
        width: 100% !important;
        height: auto !important;


    /* Sidebar ads can be smaller but maintain aspect ratio */
    .ad-container#ad-sidebar {
        width: 100% !important;
        max-width: 300px !important;
        min-width: auto !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        aspect-ratio: 300/250 !important; /* Maintain aspect ratio */
        margin: 0 auto !important;
    }

    /* Make sidebar ad images responsive */
    .ad-container#ad-sidebar img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }

    /* Make sidebar ad links responsive */
    .ad-container#ad-sidebar a {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Fix for card body padding */
    .card-body {
        padding: 0 !important;
    }

    /* Fix for image scaling */
    .ad-image {
        max-width: 100% !important;
        height: auto !important;
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .explorer-search {
        max-width: 100%;
    }

    .overview-box .stat-value {
        font-size: 1rem;
    }
}
