﻿
.admin-engine-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--riwa9-border);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(27, 27, 27, 0.98) 0%, rgba(16, 16, 16, 0.98) 100%);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.admin-engine-card:hover {
    transform: translateY(-3px);
    border-color: rgba(200, 145, 60, 0.44);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

.admin-engine-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #3b1c0b;
}

/* نسبة قريبة من فيديو يوتيوب */
.admin-book-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* المدة فوق يسار */
.admin-engine-media .pr_ribbon {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
}

.admin-book-duration-ribbon {
    top: 60px !important;
}

.admin-card-action {
    position: absolute;
    z-index: 4;
    width: 38px;
    height: 38px;
    border: 1px solid var(--riwa9-border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(243, 234, 220, 0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-card-action:hover,
.admin-card-action:focus {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.admin-card-action[disabled] {
    opacity: 0.72;
}

.admin-card-action--favorite {
    top: 12px;
    left: 12px;
    color: var(--riwa9-accent);
}

.admin-card-action--favorite.is-active {
    background: linear-gradient(135deg, #c8913c 0%, #9a5a24 100%);
    border-color: rgba(200, 145, 60, 0.4);
    color: #0d0d0d;
}

.admin-card-action--danger {
    top: 12px;
    right: 12px;
    color: #fff7ea;
    background: rgba(180, 35, 24, 0.96);
    border-color: rgba(180, 35, 24, 0.2);
}

.admin-engine-media .product-badge {
    background: linear-gradient(135deg, #c8913c 0%, #9a5a24 100%);
    color: #0d0d0d;
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid rgba(200, 145, 60, 0.28);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
    font-size: 10px;
    font-weight: 700;
}


.admin-engine-save-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    min-width: auto;
    width: auto;
    gap: 6px;
    /* padding: 6px 12px; */
    border-radius: 999px;
    font-size: 9px;
    line-height: 1;
    color: red;
}

    .admin-engine-save-button i {
        font-size: 9px;
    }

    .admin-engine-save-button:hover,
    .admin-engine-save-button:focus {
        color: #2555d9;
    }

    .admin-engine-save-button[disabled] {
        opacity: 0.82;
    }

/* رسالة الحالة */
.admin-save-message {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 9px;
    text-align: center;
}



.admin-engine-title {
    text-align: end;
    padding: 18px 18px 20px;
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
    color: var(--riwa9-text);
    font-weight: 700;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}




.admin-engine-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.admin-card-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(59, 28, 11, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 14px;
}

.admin-card-spinner {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: var(--riwa9-text);
}

.admin-engine-card.is-busy {
    pointer-events: none;
    opacity: 0.92;
}

.best-book-card__footer {
    background: linear-gradient(180deg, rgba(27, 27, 27, 0.72) 0%, rgba(16, 16, 16, 0.9) 100%);
}
