/**
 * Portal CRM Public Styles
 * 
 * @package Portal_CRM
 * @subpackage Assets/CSS
 * @since 1.0.0
 */

/* Access Denied / Login Required */
.pcrm-access-denied,
.pcrm-login-required {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    margin: 20px 0;
}

.pcrm-message-icon {
    margin-bottom: 20px;
}

.pcrm-message-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #666;
}

.pcrm-access-denied h3,
.pcrm-login-required h3 {
    margin: 0 0 15px;
    font-size: 1.5em;
    color: #333;
}

.pcrm-access-denied p,
.pcrm-login-required p {
    color: #666;
    margin: 0 0 15px;
}

.pcrm-contact-admin {
    font-size: 0.9em;
    color: #999;
}

.pcrm-login-link .button {
    display: inline-block;
    padding: 10px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.pcrm-login-link .button:hover {
    background: #005a87;
}

/* Cookie Banner */
.pcrm-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    color: #fff;
    padding: 15px 20px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.pcrm-cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.pcrm-cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
}

.pcrm-cookie-buttons {
    display: flex;
    gap: 10px;
}

.pcrm-cookie-accept,
.pcrm-cookie-decline {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.pcrm-cookie-accept {
    background: #0073aa;
    color: #fff;
}

.pcrm-cookie-accept:hover {
    background: #005a87;
}

.pcrm-cookie-decline {
    background: #555;
    color: #fff;
}

.pcrm-cookie-decline:hover {
    background: #444;
}

/* Login Form Wrapper */
.pcrm-login-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.pcrm-login-form-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.pcrm-login-form-wrapper input[type="text"],
.pcrm-login-form-wrapper input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pcrm-login-form-wrapper input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.pcrm-login-form-wrapper input[type="submit"]:hover {
    background: #005a87;
}

.pcrm-logged-in {
    text-align: center;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 4px;
}

.pcrm-register-link {
    margin-top: 15px;
    text-align: center;
    color: #666;
}

/* User Groups Display */
.pcrm-group-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pcrm-group-list li {
    padding: 8px 12px;
    background: #f7f7f7;
    margin-bottom: 5px;
    border-radius: 4px;
}

.pcrm-group-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pcrm-group-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    font-size: 14px;
}

.pcrm-no-groups {
    color: #666;
    font-style: italic;
}

/* Protected Content Shortcode */
.pcrm-protected-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    color: #856404;
    margin: 15px 0;
}

/* User Profile */
.pcrm-user-profile {
    max-width: 600px;
    margin: 0 auto;
}

.pcrm-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.pcrm-profile-header img {
    border-radius: 50%;
}

.pcrm-profile-info h2 {
    margin: 0 0 5px;
}

.pcrm-member-since {
    color: #666;
    margin: 0;
}

.pcrm-profile-section {
    margin-bottom: 20px;
}

.pcrm-profile-section h3 {
    margin: 0 0 10px;
    font-size: 1.1em;
}

/* Leaderboard Widget */
.pcrm-leaderboard-widget .pcrm-leaderboard-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pcrm-leaderboard-widget .pcrm-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.pcrm-leaderboard-widget .pcrm-leaderboard-item:last-child {
    border-bottom: none;
}

.pcrm-leaderboard-widget .pcrm-rank {
    width: 24px;
    height: 24px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.pcrm-leaderboard-widget .pcrm-leaderboard-item:nth-child(1) .pcrm-rank {
    background: #ffc107;
}

.pcrm-leaderboard-widget .pcrm-leaderboard-item:nth-child(2) .pcrm-rank {
    background: #adb5bd;
}

.pcrm-leaderboard-widget .pcrm-leaderboard-item:nth-child(3) .pcrm-rank {
    background: #cd7f32;
}

.pcrm-leaderboard-widget .pcrm-avatar img {
    border-radius: 50%;
}

.pcrm-leaderboard-widget .pcrm-name {
    flex: 1;
    font-weight: 500;
}

.pcrm-leaderboard-widget .pcrm-score {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Saved Content List */
.pcrm-saved-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pcrm-saved-list li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.pcrm-saved-list li:last-child {
    border-bottom: none;
}

.pcrm-saved-list a {
    font-weight: 500;
    text-decoration: none;
}

.pcrm-saved-excerpt {
    margin: 5px 0 0;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .pcrm-cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .pcrm-cookie-content p {
        min-width: auto;
    }
    
    .pcrm-profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Unread Message Badge */
.pcrm-unread-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.pcrm-badge-icon {
    font-size: 16px;
}

.pcrm-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #0073aa;
    color: #fff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.pcrm-unread-badge.pcrm-has-unread .pcrm-badge-count {
    background: #dc3545;
    animation: pcrm-badge-pulse 2s infinite;
}

.pcrm-badge-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pcrm-badge-link:hover .pcrm-badge-count {
    background: #005a87;
}

.pcrm-unread-badge.pcrm-has-unread .pcrm-badge-link:hover .pcrm-badge-count {
    background: #c82333;
}

@keyframes pcrm-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
