/* === Book Manager Admin Styling === */

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

/* === Book Card Container === */
.book-card {
    background: #fff;
    border: 1px solid #ccc;
    padding: 12px;
    display: block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* === Header === */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    gap: 10px;
}

.status-badge,
.badge-featured,
.edit-button {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

.status-badge.publish {
    background: #46b450;
    color: #fff;
}
.status-badge.draft {
    background: #f0ad4e;
    color: #fff;
}
.badge-featured {
    background: #d9534f;
    color: #fff;
}
.edit-button {
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
}
.edit-button:hover {
    background: #005f8d;
}

/* === Book Content Layout === */
.book-layout {
    overflow: hidden;
    margin-bottom: 16px;
}

.book-layout .cover {
    float: left;
    width: 120px;
    margin-right: 20px;
}

.book-layout .cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid #ddd;
}

.book-layout .info {
    margin-left: 140px;
    font-size: 13px;
}

.book-layout .info p {
    margin: 4px 0;
}

.book-layout .info .book-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
}

/* === Bottom Section: Full Width Extras === */
.extras {
    clear: both;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.extras .category,
.extras .links,
.extras .metrics,
.extras .excerpt {
    margin-bottom: 10px;
}

.category-select {
    width: 100%;
    max-width: 300px;
    font-size: 14px;
    padding: 4px;
    margin-top: 5px;
}

/* === Retailer Buttons === */
.retailer-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 4px 6px;
    font-size: 12px;
    border-radius: 3px;
    text-decoration: none;
    margin-right: 6px;
    display: inline-block;
    transition: background 0.2s ease;
}
.retailer-btn:hover {
    background: #e5e5e5;
}

/* === Metrics & Excerpt === */
.metrics {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #444;
    flex-wrap: wrap;
}

.excerpt {
    font-style: italic;
    font-size: 13px;
    color: #555;
}

/* === Tier Banner (Free, Standard, Premium) === */
.tier-banner {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 5px 10px;
    color: white;
    text-align: center;
    margin-bottom: 10px;
    border-radius: 3px;
}

.tier-banner.Free {
    background-color: gray;
}

.tier-banner.Standard {
    background-color: orange;
}

.tier-banner.Premium {
    background-color: yellow;
    color: black;
}

.page-id-2 .entry-title {
display: none;
}

/* === Hide WP Page titles on 3 submission forms === */
.page-id-281264 .entry-title,
.page-id-281281 .entry-title,
.page-id-281278 .entry-title {
  display: none;
}

/* === Colouring WP Admin sidebar for easier management === */
#adminmenu .menu-icon-blog_post {
    background: #f0f9ff;
}
#adminmenu .menu-icon-literary_quotes {
    background: #fff8e1;
}
#adminmenu .menu-icon-straplines {
    background: #e8f5e9;
}
#adminmenu #toplevel_page_book-manager {
    background: #ede7f6;
}

/* ── New status legend above the tier bar ── */
.status-text {
    font-size: 0.8em;
    margin-bottom: 4px;
}
.status-text.published { color: #d9534f; }  /* red */
.status-text.draft     { color: #777; }     /* grey */

/* ── The new tier bar (replacing .tier-banner inside the card) ─ */
.book-card-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    color: #000;
    margin-bottom: 10px;
    border-radius: 3px;
}
.book-card-bar.tier-Free     { background: #ccc; }
.book-card-bar.tier-Standard { background: #f90; }
.book-card-bar.tier-Premium  { background: #ff0; }

/* ── Remove / Tier / Edit elements inside the bar ── */
.remove-button,
.edit-button {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    text-decoration: none;
    white-space: nowrap;
}
.remove-button {
    background: #f2dede;
    color: #a94442;
}
.remove-button:hover {
    background: #e0b4b4;
}
.edit-button {
    background: #0073aa;
    color: #fff;
}
.edit-button:hover {
    background: #005f8d;
}
.tier-label {
    font-weight: bold;
    text-transform: uppercase;
}

/* ── Featured checkbox selector ─ */
.featured-select {
    margin: 8px 0;
    font-size: 13px;
}
.featured-select input {
    margin-right: 6px;
}


/* ─ Center & embolden Published/Draft legend ── */
.status-text {
    font-weight: bold;
    text-align: center;
    width: 100%;
    margin-bottom: 8px;
}

/* ─ Red “Remove button with white text ── */
.book-card-bar .remove-button {
    background: #c00 !important;
    color: #fff !important;
    border: none;
    padding: 4px 8px;
}
.book-card-bar .remove-button:hover {
    background: #a00 !important;
}

/* ─ Inline Featured & Bestseller toggles ── */
.featured-select,
.bestseller-select {
    display: inline-block;
    width: 48%;
    vertical-align: middle;
    margin: 0;
    padding: 0;
}
.featured-select { text-align: left; }
.bestseller-select { text-align: right; }

/* ── Space above retailer buttons ── */
.links {
    margin-top: 8px;
}

/* ── Front-end–style platform buttons ─ */
.retailer-btn {
    background: #c00;
    color: #fff;
    border-radius: 0;
    margin-right: 6px;
    transition: background 0.2s ease;
}
.retailer-btn:hover {
    background: #900;
}

/* ─ Price & Dates table ─ */
.book-info-table,
.book-metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}
.book-info-table td,
.book-metrics-table th,
.book-metrics-table td {
    border: 1px solid #ddd;
    padding: 6px;
    vertical-align: top;
}
.book-info-table tr:first-child td {
    /* no extra styling */
}
.book-info-table .preferred-start {
    font-weight: bold;
}

/* ─ Metrics table headers ── */
.book-metrics-table th {
    background: #f5f5f5;
    font-weight: bold;
    text-align: left;
}
.book-metrics-table td {
    text-align: left;
}


/* ── Spacing for toggles under author ── */
.featured-select,
.bestseller-select {
    margin: 4px 0;
    display: block;
}
.bestseller-select {
    margin-bottom: 8px;
}

/* ─ ASIN paragraph spacing ── */
.book-card p[style] {
    margin: 8px 0; /* targets that ASIN <p> */
}

/* ── Two-column info table ── */
.book-info-table td {
    width: 50%;
    vertical-align: top;
}

/* ─ Center & bold the preferred-start row ── */
.book-info-table .preferred-start {
    text-align: center;
    font-weight: bold;
}

/* ── Breathing room around platform buttons ── */
.links {
    margin: 8px 0;
}

/* ── Optional: ensure your metrics table stays spaced ── */
.book-metrics-table {
    margin-top: 8px;
}

/* Align toggles & ASIN inside the .info column */
.book-layout .info .featured-select,
.book-layout .info .bestseller-select {
    margin: 4px 0;       /* half‐line above each */
    display: block;
}
.book-layout .info .asin {
    margin: 8px 0;       /* a little more above the ASIN */
}

/* keep the checkbox and its “Featured”/“Bestseller text together on one line */
.book-layout .info .featured-select label,
.book-layout .info .bestseller-select label {
  display: inline-flex;
  align-items: center;
  gap: 4px; /* a little breathing room between box and text */
}

.bm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #e0e0e0;
  padding: 8px;
  margin-bottom: 20px;
}
.bm-header form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.book-card.duplicate-asin {
    background-color: #ffe5e5; /* light red tint */
    border-left: 4px solid #cc0000;
}
