/* --- Frontend User Analytics Styles --- */

/* General container for the widget title */
.ua-frontend-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em; /* Adjust as needed */
    color: #333;
}

/* Styling for the users grid */
.ua-frontend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Adjust column width as needed */
    gap: 30px; /* Space between cards */
    justify-items: center;
    align-items: start; /* Align items to the top */
    max-width: 1200px; /* Max width for the grid */
    margin: 0 auto; /* Center the grid */
    padding: 20px;
}

.ua-frontend-card {
    text-align: center;
    background-color: #ffffff;
    border-radius: 12px; /* Slightly more rounded corners for the card itself */
    padding: 20px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1); /* More pronounced shadow */
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push content apart if needed */
    width: 100%; /* Ensure card takes full grid cell width */
    max-width: 200px; /* Max width for individual cards */
    min-height: 220px; /* Ensure consistent height if content varies */
}

.ua-frontend-card:hover {
    transform: translateY(-8px); /* Lift on hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* Enhance shadow on hover */
}

.ua-frontend-card a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit text color */
    display: block; /* Make the whole card clickable */
    height: 100%; /* Ensure link covers the whole card */
}

.ua-frontend-pic-wrapper {
    position: relative; /* For the "NEW" badge positioning */
    width: 120px; /* Control image size */
    height: 120px;
    border-radius: 50%; /* Make it circular */
    overflow: hidden; /* Hide anything outside the circle */
    margin: 0 auto 15px; /* Center the image and add bottom margin */
    border: 4px solid #4CAF50; /* Example: Green border */
    display: flex; /* For centering image within wrapper */
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05); /* Subtle inner shadow for the circle */
}

.ua-frontend-pic {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the circle without distortion */
    display: block; /* Remove extra space below image */
}

.ua-frontend-new-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #FF5722; /* Orange-red for NEW */
    color: #fff;
    font-size: 0.7em;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    z-index: 10; /* Ensure it's above the image */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ua-frontend-username {
    font-size: 1.2em;
    font-weight: 700; /* Bolder font weight */
    margin-bottom: 8px;
    color: #222;
    line-height: 1.3;
}

.ua-frontend-posts-count {
    font-size: 0.95em;
    color: #777;
    margin-bottom: 0;
}

.ua-no-data-message {
    text-align: center;
    padding: 30px;
    font-size: 1.1em;
    color: #888;
}

/* Responsive adjustments for frontend */
@media (max-width: 768px) {
    .ua-frontend-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 20px;
    }
    .ua-frontend-card {
        padding: 15px;
        min-height: 200px;
    }
    .ua-frontend-pic-wrapper {
        width: 100px;
        height: 100px;
    }
    .ua-frontend-username {
        font-size: 1.1em;
    }
    .ua-frontend-posts-count {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .ua-frontend-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 25px;
    }
    .ua-frontend-card {
        max-width: 250px; /* Allow wider cards in single column */
        margin: 0 auto; /* Center single cards */
    }
}


/* --- Admin Dashboard Widget Specific Styles --- */

.ua-admin-dashboard-widget {
    margin-top: 15px;
}

.ua-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Smaller cards for admin */
    gap: 15px;
    justify-items: center;
    align-items: start;
}

.ua-admin-card {
    text-align: center;
    background-color: #f8f8f8; /* Lighter background for admin */
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    width: 100%;
    max-width: 150px; /* Max width for individual cards */
}

.ua-admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ua-admin-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ua-admin-pic-wrapper {
    position: relative;
    width: 80px; /* Smaller picture for admin */
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 2px solid #0073aa; /* WordPress blue border */
    display: flex;
    align-items: center;
    justify-content: center;
}

.ua-admin-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ua-admin-new-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #d63638; /* WordPress error red */
    color: #fff;
    font-size: 0.6em;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 10;
}

.ua-admin-username {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 3px;
    color: #333;
    line-height: 1.2;
}

.ua-admin-posts-count {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 0;
}

/* Responsive adjustments for admin grid */
@media (max-width: 1000px) { /* Adjust for smaller admin screens */
    .ua-admin-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
    .ua-admin-pic-wrapper {
        width: 70px;
        height: 70px;
    }
}
/* Specific styling for the full admin page */
.ua-admin-page-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    margin-top: 20px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.ua-admin-page-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Slightly larger cards on the dedicated page */
    gap: 20px;
}

.ua-admin-page-card {
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: none; /* Remove extra shadow from cards on page */
}