/* Campaign detail responsive */
@media (max-width: 480px) {
    #campaign-detail-page .cd-header-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    #campaign-detail-page .cd-header-info-group {
        flex: 1 1 auto;
        width: 100%;
    }

    #campaign-detail-page .cd-header-status-group {
        flex: 0 0 auto;
        width: 100%;
        justify-content: flex-start;
    }

    #campaign-detail-page .section-header-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    #campaign-detail-page .section-header-actions .filter-select {
        flex: 1 1 100%;
        min-width: 0;
    }

    .video-editor-row {
        grid-template-columns: 1fr !important;
        gap: 6px;
        padding: 8px !important;
    }
}

@media (max-width: 768px) {
    .video-editor-row {
        grid-template-columns: 32px 1fr !important;
        gap: 8px;
    }

    .video-editor-row.is-editing {
        grid-template-columns: 32px 1fr !important;
    }
}

/* Video editor inline */
.video-editor-section {
    margin-top: 16px;
}

.video-editor-inline {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.video-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f0fdf4;
    border-bottom: 1px solid #86efac;
    font-size: 13px;
    color: #065f46;
}

.video-editor-title strong {
    font-weight: 600;
}

.video-editor-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-editor-row {
    display: grid;
    grid-template-columns: 32px 1fr 0.8fr 1fr 0.5fr;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    font-size: 12px;
}

.video-editor-row.is-editing {
    background: #fffbeb;
    border-color: #fcd34d;
    grid-template-columns: 32px 1.2fr 0.8fr 0.8fr auto;
}

.video-editor-index {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
}

.ve-url-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.ve-url-link:hover {
    text-decoration: underline;
}

.ve-empty {
    color: #d1d5db;
}

/* Ẩn/hiện cột theo tab booking type */
[data-active-tab="livestream"] .col-air-date,
[data-active-tab="livestream"] .col-video-links {
    display: none;
}

[data-active-tab="video"] .col-sample-type,
[data-active-tab="video"] .col-deal-live {
    display: none;
}

/* Booking section wrapper */
.booking-section-wrapper {
    display: flex;
    flex-direction: column;
}

.booking-section-wrapper .list-page-table-card {
    border-color: var(--primary-200, #C7DBFF);
    border-top: 1px solid var(--primary-200, #C7DBFF);
    border-top-left-radius: 0;
}

/* Campaigns page stats grid: 3 thống kê hàng trên + 4 chi phí hàng dưới */
#campaigns-page .list-page-stats-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
}

#campaigns-page .list-page-stats-grid>.stat-card:nth-child(-n+3) {
    grid-column: span 4;
}

#campaigns-page .list-page-stats-grid>.stat-card:nth-child(n+4) {
    grid-column: span 3;
}

@media (max-width: 1024px) {
    #campaigns-page .list-page-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #campaigns-page .list-page-stats-grid>.stat-card {
        grid-column: span 1 !important;
    }
}

@media (max-width: 480px) {
    #campaigns-page .list-page-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Booking type tabs */
.booking-tabs-wrapper {
    position: relative;
    z-index: 10;
}

.booking-tabs {
    display: flex;
    gap: 0;
}

.booking-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--app-font);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    color: var(--gray-500, #64748B);
    background: var(--gray-50, #F8FAFC);
    border: 1px solid var(--gray-200, #E2E8F0);
    border-bottom: none;
    outline: none;
}

.booking-tab-btn:first-child {
    border-top-left-radius: 12px;
    border-right: none;
}

.booking-tab-btn:last-child {
    border-top-right-radius: 12px;
    border-left: none;
}

.booking-tab-btn:hover:not(.active) {
    background: var(--gray-100, #F1F5F9);
    color: var(--gray-700, #334155);
    border-color: var(--gray-200, #E2E8F0);
}

.booking-tab-btn.active {
    background: var(--primary-200, #C7DBFF);
    color: var(--primary-800, #2D4287);
    border-color: var(--primary-300, #A5C5FF);
    font-weight: 700;
    padding-bottom: 11px;
}

.booking-tab-btn .tab-icon {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
}

.booking-tab-btn .tab-icon svg {
    width: 1em;
    height: 1em;
}

.booking-tab-btn .tab-label {
    line-height: 1;
}

.booking-tab-btn .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.booking-tab-btn:not(.active) .tab-count {
    background: var(--gray-100, #F1F5F9);
    color: var(--gray-600, #475569);
}

.booking-tab-btn.active .tab-count {
    background: var(--primary-300, #A5C5FF);
    color: var(--primary-800, #2D4287);
}