/* BBOOK.APP admin – hide WP title */
body.toplevel_page_bbook-settings .wrap > h1,
body.toplevel_page_bbook-settings .wrap > .wp-header-end,
body.toplevel_page_bbook-settings .wrap::before,
body.toplevel_page_bbook-settings .wrap::after,
body.toplevel_page_bbook-settings #wpcontent::before,
body.toplevel_page_bbook-settings #wpcontent::after {
    display: none !important;
}
body.toplevel_page_bbook-settings .wrap {
    overflow: hidden;
    position: relative;
}

.bbook-admin-wrap {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0;
    padding: 24px 24px 80px;
    background: #f5f5f5;
    min-height: 100vh;
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
}

.bbook-admin-header {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.bbook-admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.bbook-logo-img {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
}

.bbook-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bbook-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.bbook-btn-secondary,
.bbook-btn-copy {
    background: #e0f2fe;
    color: #0369a1;
}
.bbook-btn-secondary:hover,
.bbook-btn-copy:hover {
    background: #bae6fd;
}

.bbook-btn-outline {
    background: #fff;
    color: #2563eb;
    border: 1px solid #cbd5e1;
}
.bbook-btn-outline:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.bbook-btn-danger-outline {
    background: #fff;
    color: #dc2626;
    border: 1px solid #dc2626;
}
.bbook-btn-danger-outline:hover {
    background: #fef2f2;
}

.bbook-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.bbook-link:hover {
    text-decoration: underline;
}

.bbook-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    background: currentColor;
    opacity: .9;
}
.bbook-icon-eye {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.bbook-icon-copy {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.bbook-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid #e5e7eb;
    padding: 24px;
    margin-bottom: 24px;
}

.bbook-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.bbook-card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.bbook-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.bbook-badge-success {
    background: #dcfce7;
    color: #166534;
}

.bbook-card-desc {
    margin: 0 0 8px;
    color: #475569;
}

.bbook-card-text {
    margin: 0 0 16px;
    color: #64748b;
}

.bbook-card-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bbook-card-highlight {
    background: #eff6ff;
    border-color: #bfdbfe;
    position: relative;
}

.bbook-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
    padding: 0;
}
.bbook-dismiss:hover {
    background: rgba(0,0,0,.06);
    color: #1e293b;
}

.bbook-card-highlight-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.bbook-card-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.bbook-card-highlight-content {
    flex: 1;
    min-width: 0;
}
.bbook-card-highlight .bbook-card-title { margin-bottom: 6px; }
.bbook-card-highlight .bbook-card-text { margin-bottom: 14px; }

.bbook-app-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.bbook-app-badges .bbook-app-badge {
    display: inline-block;
    height: 40px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}
.bbook-app-badges a:hover .bbook-app-badge { opacity: .9; }

.bbook-embed-list { margin: 20px 0; }

.bbook-embed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}
.bbook-embed-item:last-of-type { border-bottom: none; }
.bbook-embed-info { min-width: 0; }

.bbook-embed-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.bbook-embed-desc {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.bbook-embed-shortcode {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.bbook-embed-shortcode code {
    display: inline-block;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.bbook-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #eff6ff;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    margin-top: 20px;
}
.bbook-tip-icon { font-size: 1.25rem; flex-shrink: 0; }
.bbook-tip-text {
    margin: 0;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}

/* ── Setup / Disconnected state ── */

.bbook-card-setup {
    text-align: center;
    padding: 48px 32px;
}

.bbook-setup-icon {
    margin-bottom: 20px;
}

.bbook-setup-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.bbook-text-center {
    text-align: center;
}

.bbook-card-setup .bbook-card-title {
    font-size: 1.375rem;
    margin-bottom: 8px;
}

.bbook-card-setup .bbook-card-text {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.bbook-setup-actions {
    margin: 28px 0 36px;
}

.bbook-btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
}
.bbook-btn-primary:hover {
    background: #1d4ed8;
    color: #fff;
}

.bbook-btn-lg {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
}

.bbook-setup-steps {
    max-width: 420px;
    margin: 0 auto;
    text-align: left;
}

.bbook-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}
.bbook-step:last-child {
    border-bottom: none;
}

.bbook-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbook-step strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.bbook-step p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* ── Plugin details ── */

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

.bbook-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.bbook-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbook-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.bbook-detail-value a {
    color: #2563eb;
    text-decoration: none;
}
.bbook-detail-value a:hover {
    text-decoration: underline;
}
