/* Agenda Planner Styles */

body {
    padding-top: 20px;
    background-color: #f5f6f8;
}

.navbar {
    margin-bottom: 20px;
    background-color: #34444d !important;
}

.brand-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: bold;
}

/* Agenda cards on index page */
.agenda-card {
    transition: box-shadow 0.2s;
    border: 1px solid #dee2e6;
}

.agenda-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    color: #adb5bd;
    font-size: 1.2rem;
    padding: 4px;
    user-select: none;
}

.drag-handle:hover {
    color: #6c757d;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Sortable states */
.sortable-ghost {
    opacity: 0.4;
    background-color: #e3f2fd;
}

.sortable-chosen {
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Agenda items */
.agenda-item {
    transition: background-color 0.15s;
    border-left: 3px solid transparent;
}

.agenda-item:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
}

.duration-badge {
    min-width: 55px;
    text-align: center;
}

/* Keep duration + action buttons right-aligned and fixed */
.item-actions {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Let the title side truncate instead of pushing controls off */
.item-info {
    min-width: 0;
}

/* Subtitle (presenter + email) under the title */
.item-subtitle {
    line-height: 1.3;
    font-size: 0.8rem;
}

.min-w-0 {
    min-width: 0;
}

/* Stats card */
.stats-card {
    border-left: 3px solid #0d6efd;
}

.stat-row {
    padding: 4px 0;
}

.timeline-item {
    border-bottom: 1px solid #f0f0f0;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-time {
    min-width: 40px;
    font-variant-numeric: tabular-nums;
}

/* Inline edit form */
.item-edit-form .form-control,
.item-edit-form .form-select {
    font-size: 0.875rem;
}

/* Empty state */
#empty-state i {
    color: #dee2e6;
}

/* Default items / Quick Add */
.default-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: #fff;
    border: 1px dashed #adb5bd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
    user-select: none;
}

.default-item:hover {
    background: #e3f2fd;
    border-color: #0d6efd;
    border-style: solid;
}

.default-item:active {
    transform: scale(0.97);
}

/* Abstract panel */
.item-abstract {
    border-left: 3px solid #0dcaf0;
    white-space: pre-wrap;
}

/* Presenter in display */
.item-presenter i {
    font-size: 0.75rem;
}

/* Clickable status badge */
.status-cycle {
    cursor: pointer;
    user-select: none;
    font-size: 0.7rem;
    transition: opacity 0.15s;
}

.status-cycle:hover {
    opacity: 0.8;
}

/* Clickable slides badge */
.slides-cycle {
    cursor: pointer;
    user-select: none;
    font-size: 0.7rem;
    transition: opacity 0.15s;
}

.slides-cycle:hover {
    opacity: 0.8;
}

/* Add item footer */
.card-footer {
    background-color: #f8f9fa;
}

/* ===== Mobile: hide drag handles ===== */
@media (max-width: 767.9px) {
    .drag-handle {
        display: none;
    }
}

/* ===== Finalised agenda: read-only mode ===== */

/* Hide drag handles, edit/delete buttons, add form footer, Quick Add, Import */
body.agenda-finalised .drag-handle {
    visibility: hidden;
}

body.agenda-finalised .edit-item-btn,
body.agenda-finalised .delete-item-btn {
    display: none !important;
}

body.agenda-finalised .card-footer {
    display: none !important;
}

body.agenda-finalised #default-items {
    pointer-events: none;
    opacity: 0.4;
}

body.agenda-finalised .default-item {
    cursor: default;
}

body.agenda-finalised #import-btn-wrapper,
body.agenda-finalised .btn[data-bs-target="#importModal"] {
    display: none !important;
}

/* Disable status-cycle and slides-cycle clicking */
body.agenda-finalised .status-cycle,
body.agenda-finalised .slides-cycle {
    cursor: default;
    pointer-events: none;
}

/* Subtle visual hint: remove hover effect on items */
body.agenda-finalised .agenda-item:hover {
    background-color: transparent;
    border-left-color: transparent;
}

/* Finalised banner bar */
.finalised-banner {
    background-color: #d1e7dd;
    color: #0f5132;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
