/* Custom styles to complement Bootstrap */

/* Sticky toolbar */
.toolbar {
    position: sticky;
    top: 0;
    z-index: 99;
    background-color: var(--bs-body-bg);
    padding: 20px 0 10px;
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
}

/* Improved spacing */
.card {
    margin-bottom: 1.5rem;
    --bs-card-cap-bg: rgba(0,0,0, 0.4);
}

/* Line status badge */
.badge.bg-info {
    font-weight: normal;
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-header {
        padding: 0.75rem;
    }

    .card-category {
        padding-top: 0.5rem;
    }
}

@media (min-width: 768px) {
    .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
}

/* Improved form controls */
.form-control:focus {
    box-shadow: none;
    border-color: var(--bs-primary);
}

.form-control {
    flex-grow: 0;
}

@media (max-width: 374px) {
    .today-button {
        order: 99;
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Custom modal styles */
.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Line row styles */
.line-rows .card {
    margin-bottom: 0.5rem;
}

/* Category badge styles */
.category-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Improved button spacing */
.btn-group>.btn {
    margin-right: 0.25rem;
}

/* Date selector improvements */
#dateSelector {
    min-width: 130px;
}

/* Drag and drop styles */
.drag-handle {
    cursor: move;
    color: var(--bs-secondary);
    padding: 0.25rem 0.5rem;
    user-select: none;
}

.dragging {
    opacity: 0.5;
}

.drag-over {
    border: 2px dashed var(--bs-primary);
}

[draggable="true"] {
    cursor: move;
}


.line-row {
    border-bottom: 1px solid var(--bs-gray-400);
    padding-bottom: 1.5rem;
}

.line-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.row-header {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    align-items: start;
}

@media (min-width: 768px) {
    .row-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }
}