/* ========== OUR LISTS STYLES ========== */

/* Lists Header */
.lists-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.lists-header h2 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

/* Lists Container */
.lists-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Lists Subheader */
.lists-subheader {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    margin: 1.5rem 0 1rem 0;
    font-family: 'Lato', sans-serif;
}

.lists-subheader:first-child {
    margin-top: 0;
}

/* List Card */
.list-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* List Header (Clickable) */
.list-header {
    padding: 16px 25px;
    background: white;
    border-bottom: 2px solid #f5f5f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.list-header:hover {
    background: #fafafa;
}

.list-header-left {
    flex: 1;
}

.list-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.list-name {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-dark);
}

.list-count-badge {
    font-size: 0.85rem;
    color: #666;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 3px 10px;
}

/* .list-owner {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
} */

.list-expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: transform 0.3s ease;
}

.list-expand-icon svg {
    width: 20px;
    height: 20px;
}

.list-card.expanded .list-expand-icon {
    transform: rotate(180deg);
}

/* List Content */
.list-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.list-card.expanded .list-content {
    max-height: 2000px;
}

.list-content-inner {
    padding: 25px;
}

/* Add Item Section */
.add-item-section {
    margin-bottom: 20px;
}

.add-item-form {
    display: flex;
    gap: 10px;
}

.add-item-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    transition: border-color 0.2s ease;
}

.add-item-input:focus {
    outline: none;
    border-color: var(--lavender-floral);
}

.add-item-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    background: var(--lavender-floral);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.add-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
    background: var(--rose-pompadour);
}

/* Items List */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.items-list:empty::after {
    content: 'No items yet. Add your first one above!';
    color: #999;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
    display: block;
}

/* List Item */
.list-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
}

.list-item:hover {
    background: #f0f0f0;
}

.list-item.completed .item-text {
    text-decoration: line-through;
    color: #999;
}

/* Editable Text */
.item-text {
    flex: 1;
    font-size: 0.95rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: text;
    transition: all 0.2s ease;
    word-wrap: break-word;
    outline: none;
}

.item-text:hover {
    border-color: #e0e0e0;
}

.item-text:focus {
    border-color: var(--lavender-floral);
    background: white;
}

/* Action Buttons Container */
.item-actions {
    display: flex;
    gap: 6px;
}

/* Action Buttons */
.item-action-btn {
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.item-action-btn svg {
    flex-shrink: 0;
}

.complete-btn {
    background: #e8f8e8;
    color: #4caf50;
}

.complete-btn:hover {
    background: #4caf50;
    color: white;
}

.delete-btn {
    background: #ffe8ec;
    color: var(--rose-pompadour);
}

.delete-btn:hover {
    background: var(--rose-pompadour);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lists-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .lists-header h2 {
        font-size: 2rem;
    }

    .lists-container {
        padding: 0;
        gap: 16px;
    }

    .list-card {
        border-radius: 12px;
    }

    .list-header {
        padding: 16px 20px;
    }

    .list-name {
        font-size: 1.1rem;
    }

    .list-count-badge {
        font-size: 0.75rem;
        padding: 2px 8px;
    }

    .list-content-inner {
        padding: 20px;
    }

    /* Keep add item form inline on mobile with compact button */
    .add-item-form {
        flex-direction: row;
        gap: 8px;
    }

    .add-item-btn {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .item-action-btn {
        width: 28px;
        height: 28px;
        padding: 6px;
    }

    .item-action-btn svg {
        width: 14px;
        height: 14px;
    }

    .list-item {
        flex-wrap: wrap;
    }

    .item-text {
        font-size: 0.9rem;
        min-width: 100%;
    }

    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .lists-header {
        margin-bottom: 2rem;
    }

    .list-header {
        padding: 10px 12px;
    }

    .list-content-inner {
        padding: 16px;
    }
}
