/* استایل‌های اختصاصی افزونه خبرخوان ساز ملک */
.malek-wrapper {
    max-width: 1050px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
    overflow: hidden;
    font-family: inherit;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

.malek-wrapper * {
    box-sizing: border-box;
}

/* نوار بالا و جستجو */
.malek-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 14px 20px;
    border-bottom: 1px solid #ebebeb;
    flex-wrap: wrap;
    gap: 12px;
}

.malek-date-box {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.malek-search-box {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
    max-width: 380px;
}

.malek-search-box input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.malek-search-box input:focus {
    border-color: #0d6efd;
}

.malek-search-box button {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.malek-search-box button:hover {
    background: #0b5ed7;
}

/* تب‌های موضوعی */
.malek-tabs-wrapper {
    background: #fff;
    border-bottom: 2px solid #0d6efd;
    overflow-x: auto;
    scrollbar-width: thin;
}

.malek-tabs-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 10px;
    gap: 4px;
    white-space: nowrap;
}

.malek-tabs-list li {
    margin: 0;
    padding: 0;
}

.malek-tab-btn {
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: block;
}

.malek-tab-btn:hover {
    color: #0d6efd;
}

.malek-tab-btn.active {
    color: #0d6efd;
    border-bottom: 3px solid #0d6efd;
    font-weight: 700;
}

/* لیست اخبار */
.malek-news-content {
    padding: 15px 25px;
    min-height: 400px;
}

.malek-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.malek-news-row {
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    line-height: 1.8;
}

.malek-news-row:hover {
    background-color: #fcfcfc;
}

.malek-news-row::before {
    content: "•";
    color: #0d6efd;
    font-size: 18px;
    margin-left: 8px;
}

.malek-title {
    color: #1e293b;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: color 0.15s;
}

.malek-title:hover {
    color: #0d6efd;
    text-decoration: underline;
}

.malek-meta {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
    margin-right: 6px;
}

/* لودر و اسپینر */
.malek-loader {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.malek-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: malek-spin 0.8s linear infinite;
}

@keyframes malek-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.malek-no-more {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
    border-top: 1px solid #f1f5f9;
    margin-top: 10px;
}

/* فوتر */
.malek-footer-bar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.malek-footer-bar a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 600px) {
    .malek-topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .malek-search-box {
        max-width: 100%;
    }
    .malek-news-row {
        flex-direction: column;
    }
    .malek-meta {
        margin-right: 0;
        margin-top: 4px;
        font-size: 11px;
    }
}
