ul,
li {
    padding: 0;
    margin: 0;
    list-style: none;
}

.events_item {
    margin-bottom: 30px;
    min-height: 550px;
    max-height: 550px;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.events_item.removing {
    opacity: 0;
    transform: scale(0.8);
    margin: 0;
    padding: 0;
    height: 0;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
}

/* ========================================
   Content Section
======================================== */
.course-category {
    display: inline-block;
    background: linear-gradient(135deg, #fdfcff, #e8dfff);
    color: #8865e1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    width: fit-content;
    z-index: 10;
}

/* ========================================
   Prompt Text Box
======================================== */
.prompt-preview-box {
    background: #f8f9fa;
    border-left: 4px solid #8865e1;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    position: relative;
    overflow-y: auto;
    max-height: 120px;
    min-height: 120px;
    flex: 1;
    flex-shrink: 0;
}

.prompt-preview-box pre {
    color: #333;
    font-family: "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ========================================
   Tags Section
======================================== */
.prompt-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 15px;
    white-space: nowrap;
    height: 32px;
    flex-shrink: 0;
    overflow: hidden;

}

.tag-chip {
    background: #f5f5f5;
    color: #666;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tag-chip:hover {
    background: #8865e1;
    color: #fff;
}

/* ========================================
   Action Buttons
======================================== */
.card-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn {
    background: #f0f0f0;
    color: #333;
}

.copy-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.use-btn {
    background: linear-gradient(135deg, #8865e1, #6a4bd6);
    color: #fff;
}

.use-btn:hover {
    background: linear-gradient(135deg, #6a4bd6, #5a3bc6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(136, 101, 225, 0.3);
}

/* AI Model Button - Dynamic styles from database */
.ai-model-btn {
    /* Default fallback - will be overridden by inline_Css from database */
    background: linear-gradient(135deg, #8865e1, #6a4bd6);
    color: white;
}

.ai-model-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.ai-model-btn i {
    font-size: 16px;
}

.action-btn i {
    font-size: 16px;
}

/* ========================================
   Card Content Structure
======================================== */
.events_item .down-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
}

.events_item .down-content h4 {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 600;
    line-height: 1.3;
    height: 1.3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    margin: 0;
    flex-shrink: 0;
    margin-bottom: 10px;
}

/* ========================================
   Thumbnail & Image Cards
======================================== */
.thumbnail-container {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 410px;
    min-height: 410px;
}

.card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card-thumbnail:hover {
    transform: scale(1.03);
}

.prompt-card-clickable {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prompt-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.prompt-card-clickable:active {
    transform: translateY(0);
}

/* Hide content for cards with images */
.events_item:has(.card-thumbnail[src]) .course-category,
.events_item:has(.card-thumbnail[src]) h4,
.events_item:has(.card-thumbnail[src]) .course-description,
.events_item:has(.card-thumbnail[src]) .prompt-preview-box,
.events_item:has(.card-thumbnail[src]) .prompt-tags,
.events_item:has(.card-thumbnail[src]) .card-actions {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.events_item:has(.card-thumbnail[src]) .down-content {
    padding-top: 8px !important;
    min-height: auto !important;
    justify-content: flex-start;
}

/* ========================================
   Meta Information
======================================== */
.course-meta {
    padding: 12px 0;
    border-top: 1px solid rgba(136, 101, 225, 0.15);
    border-bottom: 1px solid rgba(136, 101, 225, 0.15);
    flex-shrink: 0;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(11px, 1.3vw, 13px);
    color: #666;
    font-weight: 500;
}

.speaker-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 10px;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .card-actions {
        flex-direction: column;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .events_item {
        min-height: 480px;
        max-height: 600px;
    }

    .events_item .down-content h4 {
        height: 2.4em;
        -webkit-line-clamp: 2;
    }

    .prompt-preview-box {
        max-height: 90px;
        min-height: 50px;
    }

    .meta-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

@media (max-width: 575px) {
    .thumbnail-container {
        max-height: 390px;
        min-height: 390px;
    }

    .prompt-preview-box {
        max-height: 70px;
        min-height: 70px;
        padding: 8px;
    }

    .prompt-preview-box pre {
        font-size: 11px;
        line-height: 1.3;
    }

    .card-actions {
        flex-direction: column;
        gap: 6px;
    }

    .action-btn {
        min-width: 100%;
        padding: 8px 10px;
    }

    .meta-row {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .meta-item {
        font-size: 11px;
    }

    .speaker-info {
        gap: 8px;
    }

    .speaker-avatar {
        width: 30px;
        height: 30px;
    }

    .events_item .down-content span.author {
        font-size: 12px;
    }
}

@media (max-width: 374px) {
    .events_item .down-content h4 {
        height: 2em;
        -webkit-line-clamp: 2;
        font-size: 15px;
    }

    .action-btn span {
        font-size: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .events_item,
    .action-btn,
    .like-btn {
        transition: none;
    }
}










/* ============================================
    prompt card for dashabord
============================================ */
@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100px);
        opacity: 0;
    }
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.edit-btn,
.delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.edit-btn:hover {
    background: #bbdefb;
    transform: scale(1.1);
}

.delete-btn {
    background: #ffebee;
    color: #d32f2f;
}

.delete-btn:hover {
    background: #ffcdd2;
    transform: scale(1.1);
}





/* زر الإضافة */
.add-icon {
    cursor: pointer;
}

/* الأوفرلي */
.overlay {
    display: none;
    /* مخفي بالبداية */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 2001;
    /* default z-index for popups */
}



/* محتوى البوب أب */
.popup {
    width: 90%;
    max-width: 850px;
    background: #fff;
    padding: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2002;
    /* popup content above overlay */
    border-radius: 8px;
}



.popup-header {
    font-weight: bold;
    margin-bottom: 20px;
}

.popup-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.popup button {
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    border-radius: 20px;
}

.popup .cancel {
    background: #e0e0e0;
    padding: 10px 20px 10px 20px;

}

.popup .add {
    background: #e35353;
    padding: 10px 40px 10px 40px;
    color: white;
}

.close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}








html[dir="rtl"] .prompt-preview-box {
    border-left: none;
    border-right: 4px solid #8865e1;
}



