/* OWL Rebrandable Ebooks Styles */

/* ── Library Wrapper ─────────────────────────────────────── */
.owl-ebooks-library {
    padding: 0;
}

.owl-ebooks-header {
    margin-bottom: 24px;
}

.owl-ebooks-header h3 {
    color: var(--owl-green, #00AA44) !important;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.owl-ebooks-intro {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
    max-width: 700px;
}

/* ── Upgrade Notice ──────────────────────────────────────── */
.owl-ebooks-upgrade-notice {
    background: #1a1200;
    border: 1px solid #ffa000;
    border-radius: 6px;
    color: #ffa000;
    font-size: 0.85rem;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.owl-ebooks-upgrade-notice a {
    color: #ffa000 !important;
    font-weight: 700;
    text-decoration: underline !important;
    margin-left: 8px;
}

/* ── Alert/Notice ────────────────────────────────────────── */
.owl-ebooks-notice {
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.owl-ebooks-notice-warning {
    background: #1a1200;
    border: 1px solid #ffa000;
    color: #ffa000;
}

/* ── Empty State ─────────────────────────────────────────── */
.owl-ebooks-empty {
    color: #555;
    font-size: 0.9rem;
    padding: 30px 0;
    text-align: center;
}

/* ── Ebook Grid ──────────────────────────────────────────── */
.owl-ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ── Ebook Card ──────────────────────────────────────────── */
.owl-ebook-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
}

.owl-ebook-card:hover {
    border-color: var(--owl-green, #00AA44);
    transform: translateY(-2px);
}

/* ── Thumbnail ───────────────────────────────────────────── */
.owl-ebook-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

.owl-ebook-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.owl-ebook-card:hover .owl-ebook-thumb img {
    transform: scale(1.03);
}

.owl-ebook-thumb-placeholder {
    background: #1a2a1a;
}

.owl-ebook-thumb-placeholder span {
    font-size: 4rem;
    opacity: 0.4;
}

/* ── Card Body ───────────────────────────────────────────── */
.owl-ebook-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.owl-ebook-title {
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 !important;
    line-height: 1.3;
}

.owl-ebook-desc {
    color: #888;
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}

/* ── Missing Programs Warning ────────────────────────────── */
.owl-ebook-warning {
    background: #1a1200;
    border: 1px solid #664400;
    border-radius: 5px;
    color: #cc8800;
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 8px 10px;
}

.owl-ebook-warning a {
    color: #ffa000 !important;
    font-weight: 700;
    text-decoration: underline !important;
}

/* ── Actions ─────────────────────────────────────────────── */
.owl-ebook-actions {
    margin-top: auto;
    padding-top: 4px;
}

.owl-ebook-btn {
    display: block;
    background: var(--owl-green, #00AA44);
    color: #000 !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none !important;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
}

.owl-ebook-btn:hover {
    background: #00cc55;
    color: #000 !important;
    transform: translateY(-1px);
}

.owl-ebook-btn-warning {
    background: #cc7700;
    color: #fff !important;
}

.owl-ebook-btn-warning:hover {
    background: #ee8800;
    color: #fff !important;
}

.owl-ebook-btn-locked {
    background: #2a2a2a;
    color: #666 !important;
    cursor: not-allowed;
    border: 1px solid #444;
}

.owl-ebook-btn-locked:hover {
    background: #2a2a2a;
    transform: none;
    color: #666 !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .owl-ebooks-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

@media (max-width: 400px) {
    .owl-ebooks-grid {
        grid-template-columns: 1fr;
    }
}
