/* EG Counter – Modern Rounded Compact Widget (RTL, Emaar Style) */

/* -------- Frontend Widget -------- */

.eg-counter-wrapper {
    direction: rtl;
    font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
    display: flex;
    justify-content: center;
    margin: 10px 0 6px;
    padding: 0 10px;
}

.eg-counter-card {
    position: relative;
    max-width: 360px;
    width: 100%;
    background: radial-gradient(circle at top left, #111827, #020617);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.55),
        0 0 0 1px rgba(15, 23, 42, 0.6);
    padding: 10px 12px 8px;
    color: #e5e7eb;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out, background 200ms ease-out;
}

.eg-counter-card:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.7),
        0 0 0 1px rgba(15, 23, 42, 0.8);
    border-color: rgba(251, 191, 36, 0.65);
    background: radial-gradient(circle at top left, #020617, #020617);
}

.eg-counter-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.eg-counter-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #fbbf24, #f97316);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
    flex-shrink: 0;
}

.eg-counter-title {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

/* stats row */

.eg-counter-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: nowrap;
}

.eg-counter-stat {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.eg-counter-stat-label {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 1px;
}

.eg-counter-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #fbbf24;
    white-space: nowrap;
}

/* dividers between stats */

.eg-counter-divider {
    width: 1px;
    height: 22px;
    background: linear-gradient(to bottom, transparent, rgba(156, 163, 175, 0.7), transparent);
    opacity: 0.7;
}

/* footer (last updated) */

.eg-counter-footer {
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px dashed rgba(75, 85, 99, 0.7);
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eg-counter-footer-label {
    color: #6b7280;
}

.eg-counter-footer-value {
    color: #d1d5db;
}

/* Mobile adjustments */

.eg-counter-stat-hidden-mobile {
    display: block;
}

.eg-counter-divider-desktop {
    display: inline-block;
}

@media (max-width: 600px) {
    .eg-counter-card {
        max-width: 100%;
        padding: 9px 10px 7px;
    }

    .eg-counter-stats-row {
        gap: 6px;
    }

    .eg-counter-stat-value {
        font-size: 14px;
    }

    .eg-counter-stat-label {
        font-size: 10px;
    }

    /* نخفي إحصائية الكلمات على الشاشات الصغيرة لتبسيط الويدجت */
    .eg-counter-stat-hidden-mobile {
        display: none;
    }

    .eg-counter-divider-desktop {
        display: none;
    }

    .eg-counter-footer {
        font-size: 9px;
    }
}

/* -------- Admin Styles (Dashboard) -------- */

.eg-counter-admin-wrap {
    direction: rtl;
    font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
}

.eg-counter-admin-title {
    margin-bottom: 20px;
}

.eg-counter-admin-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.eg-counter-admin-card {
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid #1f2937;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.eg-counter-admin-card-label {
    font-size: 12px;
    color: #cbd5f5;
    margin-bottom: 4px;
}

.eg-counter-admin-card-value {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
}

.eg-counter-admin-card-meta {
    position: relative;
}

.eg-counter-admin-card-meta-value {
    font-size: 14px;
    font-weight: 500;
    color: #f9fafb;
}

.eg-counter-admin-card-meta-sub {
    margin-top: 4px;
    font-size: 11px;
    color: #9ca3af;
}

.eg-counter-admin-section {
    margin-top: 30px;
    margin-bottom: 25px;
}

.eg-counter-admin-form .description {
    margin-bottom: 10px;
}

.eg-counter-post-types-table code {
    font-size: 11px;
}

.eg-counter-pt-checkbox {
    text-align: center;
}

.eg-counter-admin-actions {
    margin-top: 12px;
    margin-bottom: 18px;
}

.eg-counter-modules-table td,
.eg-counter-modules-table th {
    font-size: 12px;
}

@media (max-width: 900px) {
    .eg-counter-admin-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .eg-counter-admin-summary {
        grid-template-columns: 1fr;
    }
}
