/*
 * Advertisements App — Mobile View CSS
 * Pattern: roses_mobile.css / mobile_navbar.css approach
 * Desktop: unchanged | Mobile (≤768px): full-width, zero padding
 */

@media (max-width: 768px) {

    /* Hide left sidebar — show mobile nav instead */
    .col-md-3:first-child .card {
        display: none;
    }

    /* Main content full width */
    .col-md-6,
    .col-md-8 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Right sidebar full width below main */
    .col-md-3:last-child,
    .col-md-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* ── Mobile Nav Bar (horizontal scroll) ── */
    .ads-mobile-nav {
        display: flex !important;
        overflow-x: auto;
        gap: 8px;
        padding: 10px 12px;
        background: #fff;
        border-bottom: 1px solid #e4e6eb;
        margin-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ads-mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .ads-mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 14px;
        border-radius: 20px;
        background: #f0f2f5;
        color: #333;
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0;
        transition: all 0.2s;
    }

    .ads-mobile-nav a i {
        font-size: 16px;
        color: #1877f2;
    }

    .ads-mobile-nav a.active {
        background: #1877f2;
        color: #fff;
    }

    .ads-mobile-nav a.active i {
        color: #fff;
    }

    /* ==================== CARDS ==================== */
    .card {
        border-radius: 0 !important;
        margin-bottom: 8px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
    }

    .card-body {
        padding: 12px !important;
    }

    .card-header {
        padding: 10px 12px !important;
    }

    /* ==================== DASHBOARD ==================== */
    .stat-item {
        padding: 8px 0 !important;
    }

    .stat-label {
        font-size: 0.82rem !important;
    }

    .stat-value {
        font-size: 1.3rem !important;
    }

    /* Stats grid: 2 columns on mobile */
    .row.g-3 > .col-md-3,
    .row.g-4 > .col-md-3 {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        padding: 4px !important;
    }

    /* ==================== AD LIST ==================== */
    /* Ad cards: full width */
    .row.g-4 > .col-md-6,
    .row.g-3 > .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: 4px !important;
    }

    /* Filter bar: wrap */
    .d-flex.gap-2.flex-wrap {
        gap: 6px !important;
    }

    .btn-sm {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

    /* ==================== AD CREATE (WIZARD) ==================== */
    .wizard-steps {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .wizard-step {
        min-width: 70px;
        font-size: 11px !important;
        padding: 8px 6px !important;
    }

    .wizard-step-icon {
        font-size: 1.2rem !important;
        margin-bottom: 4px !important;
    }

    /* Form fields full width */
    .col-md-6 .form-group,
    .col-md-8 .form-group {
        margin-bottom: 12px !important;
    }

    .form-control,
    .form-select {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }

    /* ==================== AD DETAIL ==================== */
    .ad-detail-header {
        border-radius: 0 !important;
        padding: 16px 12px !important;
    }

    .ad-detail-header h1,
    .ad-detail-header h2 {
        font-size: 1.2rem !important;
    }

    /* Analytics chart: full width */
    canvas {
        max-height: 200px !important;
    }

    /* ==================== AD DISPLAY (inline ads) ==================== */
    .ad-container {
        margin: 12px 0 !important;
    }

    .ad-wrapper {
        border-radius: 8px !important;
        padding: 12px !important;
    }

    .ad-native-content {
        flex-direction: column !important;
    }

    .ad-native-image {
        width: 100% !important;
        height: 160px !important;
    }

    .ad-image {
        max-height: 180px !important;
    }

    .ad-cta-btn {
        width: 100% !important;
        text-align: center !important;
        padding: 10px !important;
    }

    /* ==================== MODALS ==================== */
    .modal-dialog {
        margin: 0.5rem !important;
    }

    .modal-content {
        border-radius: 12px !important;
    }

    /* ==================== TABLES ==================== */
    .table-responsive {
        font-size: 13px !important;
    }

    .table td,
    .table th {
        padding: 8px 6px !important;
        white-space: nowrap;
    }

    /* ==================== BADGES / STATUS ==================== */
    .badge {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
}
