/**
 * أنماط الواجهة الأمامية لإضافة إدارة المتبرعين
 */

/* المتغيرات الأساسية */
:root {
    --dt-primary-color: #1e4938;
    --dt-secondary-color: #658679;
    --dt-card-background: #e9f7f0;
    --dt-diamond-color: #00d4aa;
    --dt-gold-color: #ffd700;
    --dt-bronze-color: #cd7f32;
    --dt-other-color: #95a5a6;
    --dt-white: #ffffff;
    --dt-text-dark: #1e4938;
    --dt-text-light: #658679;
    --dt-border-radius: 12px;
    --dt-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --dt-shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
    --dt-transition: all 0.3s ease;
}

/* إعادة تعيين الأساسيات */
.dt-stats-container *,
.dt-filter-container *,
.dt-donors-container *,
.dt-wall-container * {
    box-sizing: border-box;
}

/* === كونتينر الإحصائيات === */
.dt-stats-container {
    margin: 20px 0;
    padding: 0;
}

.dt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 0;
}

.dt-stat-card {
    background: var(--dt-card-background);
    border-radius: var(--dt-border-radius);
    padding: 25px;
    box-shadow: var(--dt-shadow);
    transition: var(--dt-transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.dt-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--dt-shadow-hover);
}

.dt-stat-card::before {
    content: \'\';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dt-primary-color), var(--dt-secondary-color));
}

.dt-stat-icon {
    width: 50px;
    height: 50px;
    background: var(--dt-primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--dt-white);
    font-size: 20px;
}

.dt-stat-content {
    text-align: center;
}

.dt-stat-title {
    color: var(--dt-text-dark);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.dt-stat-number {
    color: var(--dt-primary-color);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    direction: ltr;
    text-align: center;
}

/* === كونتينر الفلاتر === */
.dt-filter-container {
    margin: 20px 0;
    text-align: center;
}

.dt-filter-buttons {
    display: inline-flex;
    background: var(--dt-white);
    border-radius: 50px;
    padding: 5px;
    box-shadow: var(--dt-shadow);
    gap: 5px;
}

.dt-filter-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    color: var(--dt-text-light);
    font-weight: 500;
    cursor: pointer;
    transition: var(--dt-transition);
    font-size: 14px;
    white-space: nowrap;
}

.dt-filter-btn:hover {
    background: rgba(30, 73, 56, 0.1);
    color: var(--dt-primary-color);
}

.dt-filter-btn.active {
    background: var(--dt-primary-color);
    color: var(--dt-white);
    box-shadow: 0 2px 4px rgba(30, 73, 56, 0.3);
}

/* === كونتينر المتبرعين === */
.dt-donors-container {
    margin: 30px 0;
}

.dt-tier-header {
    margin-bottom: 25px;
    text-align: center;
}

.dt-tier-title {
    color: var(--dt-text-dark);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dt-tier-count {
    background: var(--dt-secondary-color);
    color: var(--dt-white);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
}

.dt-donors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 0;
}

/* === بطاقة المتبرع === */
.dt-donor-card {
    background: var(--dt-card-background);
    border-radius: var(--dt-border-radius);
    padding: 20px;
    box-shadow: var(--dt-shadow);
    transition: var(--dt-transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.dt-donor-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--dt-shadow-hover);
}

/* ألوان الطبقات */
.dt-donor-card.dt-tier-diamond {
    border-color: var(--dt-diamond-color);
}

.dt-donor-card.dt-tier-diamond::before {
    content: \'\';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dt-diamond-color), #00f5d4);
}

.dt-donor-card.dt-tier-gold {
    border-color: var(--dt-gold-color);
}

.dt-donor-card.dt-tier-gold::before {
    content: \'\';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dt-gold-color), #ffed4e);
}

.dt-donor-card.dt-tier-bronze {
    border-color: var(--dt-bronze-color);
}

.dt-donor-card.dt-tier-bronze::before {
    content: \'\';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dt-bronze-color), #e6a85c);
}

.dt-donor-card.dt-tier-other {
    border-color: var(--dt-other-color);
}

.dt-donor-card.dt-tier-other::before {
    content: \'\';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dt-other-color), #b2bec3);
}

.dt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dt-tier-badge {
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--dt-white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dt-type-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(30, 73, 56, 0.1);
    color: var(--dt-primary-color);
}

.dt-type-badge.dt-type-company {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.dt-type-badge.dt-type-individual {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
}

.dt-card-body {
    margin-bottom: 0;
}

.dt-donor-name {
    color: var(--dt-text-dark);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-align: center;
}

.dt-donor-total {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(30, 73, 56, 0.1);
    margin-bottom: 15px; /* Added margin for spacing */
}

.dt-total-label {
    display: block;
    color: var(--dt-text-light);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
}

.dt-total-amount {
    display: block;
    color: var(--dt-primary-color);
    font-size: 20px;
    font-weight: 700;
    direction: ltr;
}

/* === تفاصيل التبرعات داخل الكارد === */
.dt-donations-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(30, 73, 56, 0.1);
}

.dt-donations-list h5 {
    color: var(--dt-text-dark);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: center;
}

.dt-donation-item-inline {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--dt-text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px; /* Spacing between items */
    justify-content: center; /* Center items */
    border: 1px solid rgba(30, 73, 56, 0.05);
}

.dt-donation-item-inline:last-child {
    margin-bottom: 0;
}

.dt-donation-item-inline span {
    white-space: nowrap;
}

.dt-donation-item-inline span:first-child {
    font-weight: 600;
    color: var(--dt-primary-color);
}

/* === التصفح === */
.dt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.dt-page-btn {
    background: var(--dt-card-background);
    border: 1px solid var(--dt-primary-color);
    color: var(--dt-primary-color);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--dt-transition);
}

.dt-page-btn:hover {
    background: var(--dt-primary-color);
    color: var(--dt-white);
}

.dt-page-btn.active {
    background: var(--dt-primary-color);
    color: var(--dt-white);
    pointer-events: none;
}

/* رسائل عدم وجود نتائج */
.dt-no-donors, .dt-no-results {
    text-align: center;
    padding: 20px;
    color: var(--dt-text-light);
    font-size: 16px;
    background: var(--dt-card-background);
    border-radius: var(--dt-border-radius);
    margin-top: 20px;
}

/* أنيميشن الظهور */
.dt-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .dt-stats-grid, .dt-donors-grid {
        grid-template-columns: 1fr;
    }

    .dt-filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dt-filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .dt-stat-card, .dt-donor-card {
        padding: 20px;
    }

    .dt-stat-number {
        font-size: 24px;
    }

    .dt-donor-name {
        font-size: 16px;
    }

    .dt-total-amount {
        font-size: 18px;
    }

    .dt-tier-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .dt-filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .dt-filter-btn {
        width: 100%;
    }
}


