/* ========== CHECKLIST STYLES ========== */
.checklist-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 900px;
    margin: 0 auto 1rem auto;
}

.checklist-item-display {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    /* background-color: var(--md-sys-color-surface-container-low); Removed to fix "always hovered" look */
    border-radius: 16px;
    transition: background-color 0.2s ease;
    cursor: grab;
    user-select: none;
    overflow: hidden;
}

.checklist-item-display:hover {
    background-color: var(--md-sys-color-surface-container);
}

.checklist-item-display.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.checklist-item-display.drag-over {
    background-color: var(--md-sys-color-primary-container);
}

.checklist-item-display md-checkbox {
    flex-shrink: 0;
}

.checklist-item-display .item-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface);
}

.delete-item-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-error);
    border-radius: 50%;
}

.delete-item-button:hover {
    background-color: var(--md-sys-color-error-container);
}

.checklist-item-display:hover .delete-item-button {
    opacity: 1;
    visibility: visible;
}

.checklist-item-display.swiping {
    transition: none;
}

.checklist-item-display.spring-back {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-checklist-item {
    max-width: 900px;
    margin: 0 auto 2rem auto;
    position: relative;
}

.add-checklist-item .form-input {
    width: 100%;
    padding-right: 4rem;
}

.add-checklist-item .search-button {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
}

.divider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 900px;
    margin: 2rem auto 1rem auto;
}

.divider-container md-divider {
    flex: 1;
}

.divider-label {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.empty-message,
.error-message {
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.875rem;
    padding: 2rem;
}

.error-message {
    color: var(--md-sys-color-error);
}