/* Custom styles for Agency Content Manager */


.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.jumbotron {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.card {
    border: none;
    /* Apply the previous hover shadow permanently */
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-weight: bold;
}

/* Brand logo in navbar */
.navbar .brand-logo { height: 44px; width: auto; display: inline-block; }
/* White-on-black navbar */
.navbar.bg-black .navbar-brand, .navbar.bg-black .nav-link, .navbar.bg-black .navbar-toggler { color: #f1f3f5; }
.navbar.bg-black .nav-link:hover { color: #ffffff; }
.navbar.bg-black .navbar-brand, .navbar.bg-black .nav-link { font-size: 1.05rem; }
/* Utility: only translate on X axis for our badge helper */
.translate-middle-x { transform: translateX(-50%) !important; }
/* Bottom-left badge for notifications inside a relatively positioned parent */
.badge-corner-bl { left: 0; bottom: 0; transform: translate(-30%, 30%); }

.alert {
    border: none;
}

.progress {
    height: 1rem;
}

/* Dashboard stats: default Bootstrap colors retained */

.bg-light {
    background-color: #f8f9fa !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Loading animation for buttons */
.btn.loading {
    pointer-events: none;
    opacity: 0.65;
}

/* Fix dropdown z-index issues */
.dropdown-menu {
    z-index: 1050 !important;
}

.table .dropdown {
    position: relative !important;
}

.table .dropdown-menu {
    position: absolute;
    z-index: 1050;
    top: 100%;
    left: 0;
}

/* Calendar helpers */
.cal-grid .cal-day {
    position: relative;
    overflow: hidden;
}
.cal-grid .cal-event {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Vertical video 9:16 ratio helper (Bootstrap only ships 16x9/4x3/1x1/21x9) */
.ratio.ratio-9x16 {
    --bs-aspect-ratio: 177.7777778%; /* (16/9)*100% */
}

/* Optional: ensure content preview cards look clickable */
.content-card .ratio {
    cursor: pointer;
}

/* Ensure media fill the ratio container and stack correctly */
.content-card .ratio .thumb-img,
.content-card .ratio .preview-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.content-card .ratio .thumb-img { z-index: 1; display: block; }
.content-card .ratio .preview-video { z-index: 2; }

/* FullCalendar tweaks for stable sizing */
.fc .fc-daygrid-day-frame { padding: 4px; }
.fc .fc-daygrid-event { font-size: 0.85rem; }
.fc .fc-toolbar-title { font-size: 1.1rem; }
.fc .fc-daygrid-day-number { font-size: 0.9rem; }
.fc .badge { font-size: 0.65rem; }
/* Clamp event content inline to avoid overflow */
.fc-event-main { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fc-daygrid-event .fc-event-time,
.fc-daygrid-event .fc-event-title,
.fc-daygrid-dot-event .fc-event-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.fc .fc-daygrid-event-harness { overflow: hidden; }
.fc .fc-daygrid-day-events { overflow: hidden; }

/* Minimal event display for dashboard calendar */
.evt-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.evt-time {
    display: inline-block;
    vertical-align: middle;
    color: #6c757d; /* text-muted */
    max-width: calc(100% - 16px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.evt-status {
    font-size: 0.72rem;
    margin-left: 4px;
}
.evt-title {
    font-size: 0.68rem;
    color: #6c757d;
    max-width: 40%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tc-success { color: var(--bs-success) !important; }
.tc-warning { color: var(--bs-warning) !important; }
.tc-danger { color: var(--bs-danger) !important; }
.tc-secondary { color: var(--bs-secondary) !important; }
.tc-muted { color: #6c757d !important; }
.tc-primary { color: var(--bs-primary) !important; }
.s-success { background-color: var(--bs-success); }
.s-warning { background-color: var(--bs-warning); }
.s-danger { background-color: var(--bs-danger); }
.s-secondary { background-color: var(--bs-secondary); }
.s-muted { background-color: #adb5bd; }
.s-primary { background-color: var(--bs-primary); }
/* Custom purple utility to match mission editing status */
.bg-purple { background-color: rebeccapurple !important; color: #fff !important; }

/* Unread notification highlight: neutral bg + thin primary stripe */
.notif-unread {
    background: rgba(33,37,41,.03);
    border-left: 3px solid var(--bs-primary);
}

/* Compact legend under calendars */
.calendar-legend {
    margin-top: .5rem;
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    justify-content: center;
    text-align: center;
}
.calendar-legend .legend-item { display: inline-flex; align-items: center; gap: .4rem; }

/* Use FullCalendar's default event backgrounds (transparent override removed) */

/* FullCalendar header buttons styled like Bootstrap btn-outline-secondary (and small) */
.fc .fc-button {
    background: #fff !important;
    color: var(--bs-secondary) !important;
    border: 1px solid var(--bs-secondary) !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem !important; /* btn-sm */
    font-size: 0.875rem !important;     /* btn-sm */
    line-height: 1.5 !important;        /* btn-sm */
    border-radius: 0.2rem !important;   /* btn-sm */
}
.fc .fc-button:hover,
.fc .fc-button:focus {
    background: var(--bs-secondary) !important;
    color: #fff !important;
    border-color: var(--bs-secondary) !important;
}
.fc .fc-button:active,
.fc .fc-button.fc-button-active {
    background: var(--bs-secondary) !important;
    color: #fff !important;
    border-color: var(--bs-secondary) !important;
}
.fc .fc-button:disabled { opacity: .65; }

/* Grouped buttons: no inner rounding, like Bootstrap .btn-group */
.fc .fc-button-group .fc-button { border-radius: 0 !important; }
.fc .fc-button-group .fc-button + .fc-button { margin-left: -1px !important; }
.fc .fc-button-group .fc-button:first-child {
    border-top-left-radius: 0.2rem !important;
    border-bottom-left-radius: 0.2rem !important;
}
.fc .fc-button-group .fc-button:last-child {
    border-top-right-radius: 0.2rem !important;
    border-bottom-right-radius: 0.2rem !important;
}
.fc .fc-button-group .fc-button:hover,
.fc .fc-button-group .fc-button.fc-button-active { position: relative; z-index: 1; }

/* Dashboard planning: cleaner nav arrows (no border, ghost button) */
.planning-card .fc .fc-prev-button,
.planning-card .fc .fc-next-button {
    border: none !important;
    background: transparent !important;
    color: var(--bs-secondary) !important;
}
.planning-card .fc .fc-prev-button:hover,
.planning-card .fc .fc-next-button:hover {
    background: rgba(0,0,0,0.04) !important;
    border-radius: 50% !important;
}

/* Icon-only view buttons: keep border; reduce padding for neat look */
.planning-card .fc .fc-dayGridMonth-button,
.planning-card .fc .fc-listWeek-button {
    padding: 0.25rem 0.5rem !important;
    min-width: 2.25rem;
}
.planning-card .fc .fc-dayGridMonth-button .bi,
.planning-card .fc .fc-listWeek-button .bi { font-size: 1rem; line-height: 1; }
/* Today dot: minimal near-black dot between prev/next */
.planning-card .fc .fc-todayDot-button {
    padding: 0 0.25rem !important;
    min-width: auto !important;
    border: none !important;
    background: transparent !important;
    color: #212529 !important;
}
.planning-card .fc .fc-todayDot-button:hover,
.planning-card .fc .fc-todayDot-button:focus,
.planning-card .fc .fc-todayDot-button:active,
.planning-card .fc .fc-todayDot-button.fc-button-active {
    background: transparent !important;
    color: #212529 !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* Make the calendar grid lines light grey */
/* Default grid style (kept) */
.fc-theme-standard td,
.fc-theme-standard th,
.fc .fc-scrollgrid,
.fc .fc-scrollgrid td,
.fc .fc-scrollgrid th { border-color: #dee2e6 !important; }

/* Dashboard planning: cleaner grid + headers */
.planning-card .fc .fc-scrollgrid { border: 0 !important; }
.planning-card .fc .fc-scrollgrid table { border: 0 !important; }
.planning-card .fc .fc-scrollgrid { border-right: 0 !important; border-bottom: 0 !important; }
.planning-card .fc .fc-scrollgrid td,
.planning-card .fc .fc-scrollgrid th {
    border-color: rgba(108,117,125,.18) !important; /* more subtle grey */
}
.planning-card .fc .fc-theme-standard td,
.planning-card .fc .fc-theme-standard th { border-color: rgba(108,117,125,.18) !important; }
.planning-card .fc .fc-col-header-cell { border-left: 1px solid rgba(108,117,125,.18) !important; }
.planning-card .fc .fc-daygrid-day { border-left: 1px solid rgba(108,117,125,.18) !important; }

/* Remove only the outer contour while keeping inner grid lines */
.planning-card .fc .fc-col-header-cell:first-child { border-left: none !important; }
.planning-card .fc .fc-col-header-cell:last-child { border-right: none !important; }
.planning-card .fc .fc-daygrid-body tr > td.fc-daygrid-day:first-child { border-left: none !important; }
.planning-card .fc .fc-daygrid-body tr > td.fc-daygrid-day:last-child { border-right: none !important; }
.planning-card .fc .fc-col-header .fc-col-header-cell { border-top: none !important; }
.planning-card .fc .fc-daygrid-body tr:last-child > td.fc-daygrid-day { border-bottom: none !important; }
/* Ensure header underline and outer edges are gone */
.planning-card .fc .fc-col-header { border-bottom: 0 !important; }
.planning-card .fc .fc-col-header thead tr > th { border-bottom: 0 !important; }
.planning-card .fc .fc-col-header thead tr > th:last-child { border-right: 0 !important; }
.planning-card .fc .fc-daygrid-body tr > td:last-child { border-right: 0 !important; }
.planning-card .fc .fc-daygrid-body tr:last-child > td { border-bottom: 0 !important; }
.planning-card .fc .fc-col-header-cell { border-bottom: none !important; border-right: 0 !important; }
.planning-card .fc .fc-daygrid-day { border-right: 0 !important; }
.planning-card .fc .fc-daygrid-body { border-bottom: 0 !important; }
/* Extra safety: remove outer right/bottom borders from scrollgrid internals */
.planning-card .fc .fc-scrollgrid-liquid,
.planning-card .fc .fc-scrollgrid-section,
.planning-card .fc .fc-scrollgrid-sync-table {
    border-right: 0 !important;
    border-bottom: 0 !important;
}
/* Generic last-col/last-row overrides to ensure no outer edges */
.planning-card .fc .fc-scrollgrid table tr > *:last-child { border-right: 0 !important; }
.planning-card .fc .fc-scrollgrid table tbody tr:last-child > * { border-bottom: 0 !important; }
.planning-card .fc .fc-daygrid-day-top { align-items: center; }
.planning-card .fc .fc-col-header-cell-cushion { /* weekday names */
    color: #212529 !important; /* near-black */
    font-weight: 600 !important; /* semi-bold */
    text-decoration: none !important; /* remove underline/over-emphasis */
}
.planning-card .fc .fc-daygrid-day-number { /* day numbers */
    color: #212529 !important; /* near-black */
    font-weight: 600 !important; /* semi-bold */
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}
.planning-card .fc a.fc-daygrid-day-number { color: #212529 !important; font-weight: 600 !important; text-decoration: none !important; border-bottom: 0 !important; box-shadow: none !important; }
.planning-card .fc .fc-daygrid-day-number:hover,
.planning-card .fc a.fc-daygrid-day-number:hover { text-decoration: none !important; }
.planning-card .fc .fc-daygrid-day-number:focus,
.planning-card .fc a.fc-daygrid-day-number:focus { outline: none !important; box-shadow: none !important; }
/* Today highlight: neutral and discreet (no yellow) + thin primary stripe on the left */
.planning-card .fc .fc-day-today {
    background: rgba(33,37,41,.03) !important; /* very light neutral */
    position: relative;
}
.planning-card .fc .fc-day-today::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px; /* subtle accent */
    background: var(--bs-primary);
    opacity: .5;
}

/* Dashboard planning: borderless grid with subtle inner shadows */
.planning-card .fc .fc-scrollgrid td,
.planning-card .fc .fc-scrollgrid th { border: 0 !important; }
.planning-card .fc .fc-col-header,
.planning-card .fc .fc-col-header th { border: 0 !important; box-shadow: none !important; }
/* Base shadows: left (vertical) and top (horizontal) separators */
.planning-card .fc .fc-daygrid-body td.fc-daygrid-day {
    border: 0 !important;
    /* crisp inner lines (full opacity, light grey) + stronger soft shadows */
    box-shadow:
        inset 1px 0 0 #e6e9ef,
        inset 0 1px 0 #e6e9ef,
        inset 2px 0 5px -4px rgba(0,0,0,.16),
        inset 0 2px 5px -4px rgba(0,0,0,.16) !important;
}
/* Remove left inset shadows on first column (no outer left contour) */
.planning-card .fc .fc-daygrid-body table tbody tr > td.fc-daygrid-day:first-child {
    box-shadow:
        inset 0 1px 0 #e6e9ef,
        inset 0 2px 5px -4px rgba(0,0,0,.16) !important;
}


/* List view: grey borders and headers */
.fc .fc-list table { border-color: #dee2e6 !important; }
.fc .fc-list-table td,
.fc .fc-list-table th { border-color: #dee2e6 !important; }
.fc .fc-list-day-cushion { color: #6c757d !important; }

/* Status badges (blue outline, filled variant) */
.badge-status {
    border: 1px solid var(--bs-primary);
    color: var(--bs-primary);
    background: #fff;
}
.badge-status.is-filled {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

/* Reverted mission/planning badge customizations to default fills; pastel colors are applied via CSS variables above. */
