/**
 * Nikoala Users - Frontend Styles
 */

/* Page Container for Login/Register */
.nikoala-page-container {
    max-width: none;
    width: 100%;
    margin: 40px 0;
    padding: 0 40px;
}

/* Login and Registration Forms */
.nikoala-login-form,
.nikoala-registration-form,
.nikoala-lost-password-form,
.nikoala-reset-password-form {
    padding: 40px;
    max-width: 720px;
    margin: 0 auto;
}

.nikoala-login-form h2,
.nikoala-registration-form h2,
.nikoala-lost-password-form h2,
.nikoala-reset-password-form h2 {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 24px;
    font-weight: 600;
}

.nikoala-form-group {
    margin-bottom: 20px;
}

.nikoala-form-group label {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
    font-weight: 600;
    gap: 8px;
}

.nikoala-form-group label .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    flex-shrink: 0;
}

.nikoala-form-group input[type="text"],
.nikoala-form-group input[type="email"],
.nikoala-form-group input[type="password"],
.nikoala-form-group input[type="tel"],
.nikoala-form-group input[type="url"],
.nikoala-form-group input[type="date"],
.nikoala-form-group textarea,
.nikoala-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    line-height: 1;
}

.nikoala-form-group input:focus,
.nikoala-form-group textarea:focus,
.nikoala-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.nikoala-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.nikoala-form-group.required label::after {
    content: " *";
    color: #e74c3c;
}

.nikoala-form-group .field-description {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.nikoala-form-submit {
    text-align: center;
    margin-top: 30px;
}

.nikoala-form-links {
    text-align: center;
    margin-top: 20px;
}

.nikoala-form-links a {
    font-size: 16px;
}

/* Form Messages */
.nikoala-form-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 600;
}

.nikoala-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.nikoala-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.subscription-status.status-active {
    background: #d4edda;
    color: #155724;
}

.subscription-status.status-trialing {
    background: #cce5ff;
    color: #004085;
}

.subscription-status.status-cancelled,
.subscription-status.status-unpaid {
    background: #f8d7da;
    color: #721c24;
}

.nikoala-form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}


.nikoala-profile-avatar {
    flex-shrink: 0;
}

.nikoala-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nikoala-profile-meta {
    color: #666;
    font-size: 14px;
}

.nikoala-profile-meta span {
    margin-right: 15px;
}

.nikoala-profile-sidebar, .nikoala-settings-sidebar {
    padding: 20px;
    height: fit-content;
}

.nikoala-user-settings h3,
.nikoala-user-profile h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.nikoala-recent-posts {
    margin-top: 20px;
}

.nikoala-post-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.nikoala-post-item:last-child {
    border-bottom: none;
}

.nikoala-post-title {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.nikoala-post-title a {
    text-decoration: none;
}

.nikoala-post-meta {
    font-size: 14px;
}

.nikoala-post-excerpt {
    margin: 8px 0 0 0;
    font-size: 14px;
    line-height: 1.5;
}

.nikoala-user-settings,
.nikoala-user-profile {
    max-width: 1280px;
    width: 80%;
    margin: 2em auto;
}

/* User Settings Page */
.nikoala-settings-header {
    margin-bottom: 30px;
    text-align: center;
}

.nikoala-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
}

.nikoala-settings-content, .nikoala-profile-content {
    display: grid;
    grid-template-columns: 2fr 4fr;
    gap: 40px;
}

.nikoala-profile-content {
    grid-template-columns: 4fr 2fr;
}

.nikoala-settings-nav, .nikoala-profile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nikoala-settings-nav li, .nikoala-profile-nav li {
    margin-bottom: 5px;
}

.nikoala-settings-nav a, .nikoala-profile-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}


.nikoala-settings-nav a:hover, .nikoala-profile-nav a:hover {
    background: #f0f0f0;
}

.nikoala-settings-nav a.active, .nikoala-profile-nav a.active {
    background: #333;
    color: #fff;
}

.nikoala-settings-nav a.active .dashicons, .nikoala-profile-nav a.active .dashicons {
    color: #fff;
}

.nikoala-settings-main, .nikoala-profile-main {
    padding: 20px;
}


.nikoala-settings-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.nikoala-settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Custom Field Display */
.nikoala-custom-fields {
    margin-top: 20px;
}

.nikoala-field-row {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.nikoala-field-label {
    font-weight: 600;
    min-width: 120px;
    margin-right: 15px;
}

.nikoala-field-value {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nikoala-login-form,
    .nikoala-registration-form,
    .nikoala-lost-password-form,
    .nikoala-reset-password-form {
        margin: 20px;
        padding: 20px;
    }

    .nikoala-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .nikoala-profile-content,
    .nikoala-settings-content {
        grid-template-columns: 1fr;
    }

    .nikoala-settings-sidebar {
        order: 1;
    }

    .nikoala-settings-main {
        order: 2;
    }

    .nikoala-field-row {
        flex-direction: column;
    }

    .nikoala-field-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Menu Avatar Styles */
.menu-item-avatar .menu-avatar-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-avatar {
    flex-shrink: 0;
    line-height: 0;
}

.menu-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.menu-avatar-link:hover .menu-avatar img {
    border-color: rgba(255, 255, 255, 0.8);
}

.menu-username {
    font-weight: 600;
    white-space: nowrap;
}

.menu-item-avatar {
    position: relative;
}

.menu-item-logout a {
    color: #d32f2f;
}

.menu-item-logout a:hover {
    background: #fff5f5;
    color: #c62828;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .menu-avatar-link {
        justify-content: center;
    }

    .menu-username {
        display: none;
    }

    .menu-item-avatar .sub-menu {
        right: auto;
        left: 0;
    }

    .nikoala-upload-progress {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Avatar Upload Progress and Messages */
.nikoala-upload-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.progress-circle {
    width: 30px;
    height: 30px;
    position: relative;
}

.progress-spinner {
    width: 100%;
    height: 100%;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: progressSpin 1s linear infinite;
}

@keyframes progressSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.progress-text {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.nikoala-avatar-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeInMessage 0.3s ease-in-out;
}

.nikoala-avatar-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.nikoala-avatar-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeInMessage {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.nikoala-avatar-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nikoala-avatar-preview img {
    border-radius: 50%;
    border: 3px solid #ecf0f1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Sidebar Icons Styles */
.nikoala-settings-sidebar h3,
.nikoala-profile-sidebar h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nikoala-settings-sidebar h3 .dashicons,
.nikoala-profile-sidebar h3 .dashicons,
.nikoala-settings-section h4 .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    flex-shrink: 0;
}

.nikoala-settings-nav a,
.nikoala-profile-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nikoala-settings-nav a .dashicons,
.nikoala-profile-nav a .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

/* Users Module Specific Styles */
/* Note: Paywall styles have been moved to /includes/shared/assets/paywall-shared.css */

/*
Bookmarks, avatar, profile ...
*/
.nikoala-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 30px;
}

.nikoala-profile-avatar img {
    border-radius: 50%;
    border: 3px solid #ecf0f1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nikoala-profile-meta {
    color: #7f8c8d;
    font-size: 16px;
}

.nikoala-profile-meta span {
    margin-right: 15px;
}

.nikoala-profile-actions {
    margin-bottom: 30px;
}

.nikoala-field-row {
    display: flex;
    margin-bottom: 15px;
    gap: 15px;
}

.nikoala-post-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.nikoala-post-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.nikoala-post-title {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.nikoala-post-meta {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}


.nikoala-no-posts {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px 20px;
}

/* Special styling for stat items (non-clickable) */
.nikoala-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #495057;
    font-weight: 500;
}

.nikoala-stat-item .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: #7f8c8d;
    flex-shrink: 0;
}

/* Simple tabs */
.nikoala-profile-tabs {
    margin-bottom: 30px;
}

.nikoala-tabs-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.nikoala-tabs-nav li {
    margin: 0;
}

.nikoala-tabs-nav .tab-link {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nikoala-tabs-nav .tab-link:hover,
.nikoala-tabs-nav .tab-link.active {
    border-bottom-color: #667eea;
}

.remove-bookmark-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    padding: 0;
}

.remove-bookmark-btn:hover {
    color: #c82333;
}

@media (max-width: 768px) {
    .nikoala-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .nikoala-profile-content {
        grid-template-columns: 1fr;
    }

    .nikoala-profile-sidebar {
        order: -1;
        position: static;
    }

    .nikoala-field-row {
        flex-direction: column;
        gap: 5px;
    }

    .nikoala-field-label {
        min-width: auto;
    }
}