.bpa-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.bpa-sidebar {
    flex: 0 0 250px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.bpa-sidebar h3 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.bpa-book-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bpa-book-item {
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.bpa-book-item:last-child {
    border-bottom: none;
}

.bpa-book-item a {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bpa-book-item.active a {
    font-weight: bold;
    color: #0073aa;
}

.bpa-book-thumb {
    width: 40px;
    height: auto;
    border-radius: 3px;
}

.bpa-content {
    flex: 1;
    min-width: 300px;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
}

/* Tabs Styles */
.bpa-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #ddd;
}

.bpa-tab-item {
    padding: 10px 20px;
    cursor: pointer;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    color: #555;
    transition: all 0.2s ease;
}

.bpa-tab-item:hover {
    background: #e5e5e5;
}

.bpa-tab-item.active {
    background: #fff;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px; /* Overlap border */
    color: #0073aa;
}

.bpa-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.bpa-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.bpa-recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bpa-recipe-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    background: #fff;
    transition: transform 0.2s;
}

.bpa-recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.bpa-recipe-card img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.bpa-recipe-card h5 {
    font-size: 1.1em;
    margin: 10px 0;
    min-height: 40px; /* Align buttons */
}

.bpa-button {
    display: inline-block;
    padding: 8px 15px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 10px;
    border: none;
    cursor: pointer;
}

.bpa-button:hover {
    background: #005177;
    color: #fff;
}

/* Single Shopping List View */
.bpa-list-header-single { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}
.bpa-shopping-list-items-ul { 
    list-style: none; 
    padding: 0; 
}
.bpa-list-item { 
    padding: 10px; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    align-items: center; 
}
.bpa-list-item:last-child { 
    border-bottom: none; 
}
.bpa-item-label { 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
    width: 100%; 
}
.bpa-item-checkbox { 
    margin-right: 10px; 
}
.bpa-item-text { 
    font-size: 1.1em; 
}
.bpa-button-secondary { 
    background: #6c757d; 
    color: white; 
    text-decoration: none; 
    padding: 8px 15px; 
    border-radius: 4px; 
    font-size: 0.9em; 
}
.bpa-button-secondary:hover { 
    background: #5a6268; 
    color: white; 
}
.bpa-no-items {
    font-style: italic;
    color: #777;
    text-align: center;
    padding: 20px;
}
.bpa-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Modal Styles */
.bpa-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
}

.bpa-modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.bpa-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.bpa-modal-close:hover,
.bpa-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.bpa-modal h3 {
    margin-top: 0;
}

.bpa-modal select {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bpa-modal-actions {
    text-align: right;
}
