/* =========================================
   PEANIR SOCIAL SYSTEM STYLES
   Follow Buttons, Lists, Tabs & Public Profile
========================================= */

/* --- 1. استایل دکمه‌های فالو/آنفالو --- */
button.pean-follow-btn,
a.pean-follow-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 28px !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    background-color: #111111 !important;
    color: #ffffff !important;
    border: 2px solid #111111 !important;
    -webkit-tap-highlight-color: transparent !important;
    box-sizing: border-box !important;
    min-width: 120px !important;
    min-height: 44px !important;
    text-align: center !important;
    box-shadow: none !important;
}

button.pean-follow-btn:hover,
button.pean-follow-btn:focus,
button.pean-follow-btn:active {
    background-color: #000000 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-color: #000000 !important;
}

button.pean-follow-btn.is-following {
    background-color: #f4f4f5 !important;
    color: #111111 !important;
    border: 2px solid #f4f4f5 !important;
}

button.pean-follow-btn.is-following:hover,
button.pean-follow-btn.is-following:focus {
    background-color: #e4e4e7 !important;
    border-color: #e4e4e7 !important;
    color: #111111 !important;
}

button.pean-follow-btn.is-loading {
    opacity: 0.6 !important;
    cursor: wait !important;
    transform: none !important;
    box-shadow: none !important;
}

/* خنثی کردن شبه‌عناصر مزاحم المنتور */
button.pean-follow-btn::before,
button.pean-follow-btn::after,
button.pean-tab-btn::before,
button.pean-tab-btn::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
}

/* --- 2. استایل لیست‌های کاربری در داشبورد --- */
.pean-social-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pean-social-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f4f4f5;
    transition: all 0.2s ease;
}

.pean-social-list li:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border-color: #e4e4e7;
}

.pean-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pean-user-info img {
    border-radius: 50%;
    width: 56px;
    height: 56px;
    object-fit: cover;
    background: #f4f4f5;
}

.pean-user-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pean-user-meta strong {
    font-size: 15px;
    color: #111111;
    font-weight: 800;
}

.pean-user-meta span {
    font-size: 13px;
    color: #71717a;
    font-weight: 500;
}

.pean-empty-list {
    text-align: center;
    padding: 40px 20px;
    color: #71717a;
    background: #f8fafc;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px dashed #e4e4e7;
}

/* --- 3. رابط کاربری تب‌دار داشبورد کاربری --- */
.pean-dashboard-network {
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.02);
    border: 1px solid #f4f4f5;
}

.pean-network-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 2px solid #f4f4f5;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

button.pean-tab-btn {
    all: unset !important;
    cursor: pointer !important;
    padding: 0 0 12px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #a1a1aa !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -2px !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    white-space: nowrap !important;
}

button.pean-tab-btn:hover,
button.pean-tab-btn:focus,
button.pean-tab-btn:active {
    color: #111111 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

button.pean-tab-btn.active {
    color: #111111 !important;
    border-bottom-color: #111111 !important;
}

.pean-tab-content {
    display: none;
    animation: peanFadeIn 0.3s ease;
}

.pean-tab-content.active {
    display: block;
}

@keyframes peanFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 4. استایل آیکون بوردها در لیست داشبورد --- */
.pean-board-icon {
    width: 56px;
    height: 56px;
    background: #f4f4f5;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4e4e7;
}

.pean-board-list .pean-user-meta strong {
    color: #111111;
    transition: color 0.2s;
}

.pean-board-list .pean-user-meta strong:hover {
    color: #000000;
    text-decoration: underline;
}

/* --- 5. تنظیمات فرم --- */
.pean-settings-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px 0;
}

.pean-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pean-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
}

.pean-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #111;
    cursor: pointer;
}

.pean-form-group label {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

.pean-form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    font-family: inherit;
    font-size: 14px;
    color: #111;
    background: #f8fafc;
    resize: vertical;
    transition: all 0.2s;
}

.pean-form-group textarea:focus {
    outline: none;
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(17,17,17,0.05);
}

.pean-save-btn {
    align-self: flex-start;
    background: #111;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.pean-save-btn:hover {
    background: #333;
}

.pean-pending-notice {
    background: #fff8e6;
    color: #d97706;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #fde68a;
}

/* =========================================
   6. PUBLIC PROFILE (New App-Like Layout)
========================================= */
.pean-public-profile-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

.pean-profile-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

/* ردیف بالا: آواتار و استت در کنار هم */
.pean-profile-top-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

.pean-profile-avatar {
    flex-shrink: 0;
}

.pean-profile-avatar img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e4e4e7;
    padding: 3px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* ستون اطلاعات: نام بالای آمار قرار می‌گیرد */
.pean-profile-name-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    flex-grow: 1;
}

.pean-profile-name {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0;
}

.pean-profile-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item strong {
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

.stat-item span {
    font-size: 13px;
    color: #71717a;
    font-weight: 500;
}

/* بیوگرافی زیر عکس و مشخصات قرار می‌گیرد */
.pean-profile-bio {
    margin-top: 4px;
    width: 100%;
}

.pean-profile-bio p {
    font-size: 14px;
    line-height: 1.6;
    color: #3f3f46;
    margin: 0;
    white-space: pre-wrap;
}

/* دکمه‌ها زیر بیو قرار می‌گیرند */
.pean-profile-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.pean-profile-actions button,
.pean-profile-actions a {
    flex: 1; 
    justify-content: center;
}

/* حل قطعی بهم ریختگی دکمه ویرایش و پیام */
.pean-message-btn,
a.pean-message-btn,
button.pean-message-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 28px !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #111, #333) !important;
    color: #fff !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    min-width: 120px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.pean-message-btn svg,
a.pean-message-btn svg,
button.pean-message-btn svg { 
    width: 18px; 
    height: 18px; 
}

.pean-message-btn:hover,
a.pean-message-btn:hover,
button.pean-message-btn:hover { 
    transform: translateY(-2px) !important; 
    box-shadow: 0 6px 16px rgba(0,0,0,0.2) !important; 
    text-decoration: none !important;
}

/* در دسکتاپ‌های خیلی عریض، دکمه‌ها را محدود می‌کنیم تا کش نیایند */
@media (min-width: 769px) {
    .pean-profile-actions {
        max-width: 400px;
    }
    .pean-profile-avatar img {
        width: 120px !important;
        height: 120px !important;
    }
    .pean-profile-name {
        font-size: 24px;
    }
}

/* تب‌ها و گرید پین‌ها */
.pean-profile-tabs-nav { display: flex; justify-content: center; border-top: 1px solid #e4e4e7; }
button.pean-ptab-btn { all: unset !important; display: flex !important; align-items: center !important; gap: 8px !important; padding: 16px 24px !important; font-size: 13px !important; font-weight: 700 !important; color: #71717a !important; cursor: pointer !important; border-top: 1px solid transparent !important; margin-top: -1px !important; transition: all 0.2s ease !important; }
button.pean-ptab-btn svg { width: 14px; height: 14px; }
button.pean-ptab-btn.active { color: #111 !important; border-top-color: #111 !important; }
.pean-ptab-content { display: none; padding-top: 24px; animation: peanFadeIn 0.3s ease; }
.pean-ptab-content.active { display: block; }

.pean-profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pean-grid-item { aspect-ratio: 1 / 1; overflow: hidden; background: #f4f4f5; display: block; }
.pean-grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.pean-grid-item:hover img { transform: scale(1.05); }
.pean-no-content { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: #71717a; font-size: 15px; }

/* لودر اسکرول بی‌نهایت */
.pean-pins-loader { display: flex; justify-content: center; padding: 30px 0; width: 100%; }
.peanir-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e4e4e7;
    border-top-color: #111;
    border-radius: 50%;
    animation: peanirSpin 0.8s linear infinite;
}
@keyframes peanirSpin { to { transform: rotate(360deg); } }

/* =========================================
   7. LUXURY MOSAIC BOARD CARDS 
========================================= */
.pean-board-mosaic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; padding-top: 10px; }
.pean-mosaic-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none !important; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.pean-mosaic-card:hover { transform: translateY(-4px); }
.mosaic-images { display: flex; gap: 2px; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #f4f4f5; box-shadow: 0 4px 15px rgba(0,0,0,0.04); }
.mosaic-empty { width: 100%; height: 100%; background: #f4f4f5; }
.mosaic-main { flex: 2; overflow: hidden; }
.mosaic-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.pean-mosaic-card:hover .mosaic-main img { transform: scale(1.05); }
.mosaic-side { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mosaic-side-item { flex: 1; background: #e4e4e7; overflow: hidden; }
.mosaic-side-item.empty { background: #e4e4e7; }
.mosaic-side-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.pean-mosaic-card:hover .mosaic-side-item img { transform: scale(1.05); }
.mosaic-info { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.mosaic-info h3 { margin: 0; font-size: 16px; font-weight: 800; color: #111; }
.mosaic-info span { font-size: 13px; font-weight: 600; color: #71717a; }

/* =========================================
   8. MOBILE RESPONSIVENESS & FINE TUNING
========================================= */
@media (max-width: 768px) {
    /* سایزها کمی فشرده‌تر برای موبایل‌های کوچک */
    .pean-profile-top-row { gap: 16px; }
    .pean-profile-avatar img { width: 80px !important; height: 80px !important; }
    .pean-profile-stats { gap: 16px; }

    /* دکمه‌های هم‌اندازه در موبایل */
    .pean-profile-actions { width: 100%; margin-top: 12px; }
    
    .pean-message-btn,
    a.pean-message-btn,
    button.pean-message-btn,
    button.pean-follow-btn, 
    a.pean-follow-btn { 
        padding: 10px 16px !important; 
        font-size: 14px !important; 
        min-height: 44px !important;
        flex: 1;
    }

    /* سایر تنظیمات موبایل */
    .pean-profile-grid { gap: 2px; }
    .pean-board-mosaic-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
    .mosaic-images { border-radius: 16px; }
    .pean-dashboard-network { padding: 16px; border-radius: 16px; }
    .pean-social-list li { padding: 12px; }
    .pean-user-info img { width: 48px; height: 48px; }
    .pean-board-icon { width: 48px; height: 48px; border-radius: 12px; }
    
    .pean-board-hero { margin: 20px auto; }
    .pean-board-hero-title { font-size: 24px; }
    .pean-board-hero-desc { font-size: 14px; }
    .pean-board-hero-meta { flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; width: 100%; box-sizing: border-box; }
}

/* =========================================
   9. SINGLE BOARD HEADER (SEO & UI) 
========================================= */
.pean-board-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.pean-board-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    margin: 0 0 16px 0;
}

.pean-board-hero-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #3f3f46;
    margin: 0 0 24px 0;
    max-width: 650px;
}

.pean-board-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    background: #f8fafc;
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid #f4f4f5;
}

.pean-board-hero-author {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: #111;
    font-size: 14px;
}

.pean-board-hero-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.pean-board-hero-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #71717a;
}

.pean-board-hero-stats strong {
    color: #111;
    font-weight: 700;
}

.pean-board-hero-stats .dot {
    font-size: 18px;
    line-height: 0;
}

.pean-board-hero-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* =========================================
   10. MODAL TEXTAREAS & FOLLOWERS LIST
========================================= */
.modern-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    font-family: inherit;
    font-size: 14px;
    color: #111;
    background: #f8fafc;
    resize: vertical;
    transition: all 0.2s;
    margin-top: 8px;
}

.modern-textarea:focus {
    outline: none;
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(17,17,17,0.05);
}

.pean-followers-modal-top {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.pean-followers-modal-top .count-badge {
    background: #f4f4f5;
    padding: 12px 24px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pean-followers-modal-top strong {
    font-size: 24px;
    font-weight: 800;
    color: #111;
}

.pean-followers-modal-top span {
    font-size: 13px;
    color: #71717a;
    font-weight: 600;
}