/* ================================================================
# DACOG Search Engine – System Architecture
# File: manage-ads.css
# Path: /static/css/manage-ads.css
# Version: 3.0.0
# Description: Mathematical-Unit Ad Management UI (Light/Hero Theme)
# ================================================================*/

/* 1. Base Wrapper */
.manage-ads-wrapper {
    padding-top: 2.5rem; /* 40px */
    padding-bottom: 3.125rem; /* 50px */
    min-height: 100vh;
}

/* 2. Theme-Aware Data Table Card */
.ad-table-card {
    background-color: var(--dacog-bg-nav);
    border: 0.0625rem solid var(--dacog-border-color);
    -webkit-border-radius: 1rem;
    -moz-border-radius: 1rem;
    border-radius: 1rem;
    -webkit-box-shadow: var(--dacog-shadow-sm);
    -moz-box-shadow: var(--dacog-shadow-sm);
    box-shadow: var(--dacog-shadow-sm);
    overflow: hidden;
}

/* 3. Table UI Resets & Hover Logic */
.ad-table {
    margin-bottom: 0;
}

.ad-table th {
    background-color: var(--dacog-bg-base);
    color: var(--dacog-text-muted);
    border-bottom: 0.0625rem solid var(--dacog-border-color);
    font-size: 0.75rem;
    letter-spacing: 0.0625rem;
    text-transform: uppercase;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.ad-table td {
    color: var(--dacog-text-main);
    border-bottom: 0.0625rem solid var(--dacog-border-color);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: middle;
}

.theme-hero .ad-table tbody tr:hover td {
    background-color: rgba(255,255,255,0.05) !important;
}

/* 4. Nesting Visual Hierarchy */
/* Level 1: Campaign */
.row-campaign td {
    background-color: var(--dacog-bg-nav);
}

/* Level 2: Ad Set */
.row-adset td {
    background-color: var(--dacog-bg-base);
    border-left: 0.25rem solid var(--dacog-accent-primary);
}

/* Level 3: Creative */
.row-creative td {
    background-color: var(--dacog-bg-nav);
    border-left: 0.25rem solid var(--dacog-accent-green);
}

/* 5. Toggles and Form Switches */
.form-switch .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--dacog-accent-primary);
    border-color: var(--dacog-accent-primary);
}

/* Specific Badge Adjustments */
.badge-border {
    background-color: var(--dacog-bg-base);
    color: var(--dacog-text-muted);
    border: 0.0625rem solid var(--dacog-border-color);
}

/* ==========================================================================
   6. MEDIA QUERIES (AFRICAN TARGET OPTIMIZATION)
   ========================================================================== */

@media screen and (max-width: 62em) { /* 992px */
    .manage-header-block {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
}

@media screen and (max-width: 48em) { /* 768px */
    /* Hide Budget/Type columns to save horizontal space */
    .ad-table th:nth-child(2), .ad-table td:nth-child(2),
    .ad-table th:nth-child(3), .ad-table td:nth-child(3) {
        display: none;
    }
    
    /* Adjust hierarchy indentation */
    .ps-5 {
        padding-left: 1.5rem !important;
    }
    .ps-creative {
        padding-left: 2.5rem !important;
    }
}

@media screen and (max-width: 30em) { /* 480px */
    .manage-ads-wrapper {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .ad-table-card {
        -webkit-border-radius: 0.5rem;
        border-radius: 0.5rem;
        border: none;
    }
    
    .table-responsive {
        border: 0.0625rem solid var(--dacog-border-color);
        -webkit-border-radius: 0.5rem;
        border-radius: 0.5rem;
    }
}
