/* استایل کلی داشبورد */
.fan-dashboard {
    background: #0a0a23; /* bg-gray-900 */
    color: #fff; /* text-white */
    font-family: 'Vazir', sans-serif;
    direction: rtl;
    min-height: 100vh;
}

/* هدر داشبورد */
.fan-dashboard-header {
    position: relative;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); /* gradient blue */
    padding: 60px 20px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* shadow-lg */
    overflow: hidden;
}

.fan-dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    z-index: 0;
}

.fan-dashboard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.fan-dashboard-content {
    position: relative;
    z-index: 2;
}

.fan-dashboard-content h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #ffd700; /* text-yellow-400 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.fan-dashboard-content p {
    font-size: 1.2em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    color: #ddd; /* text-gray-300 */
    text-align: center;
}

/* بخش اطلاعیه‌ها */
.fan-notifications {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: transparent;
}

.fan-notifications h2 {
    color: #ffd700; /* text-yellow-400 */
    margin-bottom: 20px;
    text-align: right;
    font-size: 1.8em;
}

.fan-notification-card {
    position: relative;
    background: #ffffff; /* bg-white */
    color: #333; /* text-gray-800 */
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0; /* border-gray-200 */
    transition: background 0.3s ease;
    min-height: 60px;
}

.fan-notification-card:hover {
    background: #f9f9f9; /* bg-gray-50 */
}

.fan-notification-card h3 {
    color: #333; /* text-gray-800 */
    margin: 5px 0 10px;
    font-size: 1.3em;
    text-align: right;
    font-weight: 500;
    padding-left: 100px;
    padding-right: 40px;
}

.fan-notification-card p {
    color: #555; /* text-gray-600 */
    margin: 0;
    font-size: 1em;
    text-align: right;
    line-height: 1.5;
    padding-left: 10px;
    padding-right: 40px;
}

.fan-notification-card .notification-date {
    position: absolute;
    top: 15px;
    left: 20px;
    color: #888; /* text-gray-500 */
    font-size: 0.9em;
}

.fan-notification-card .notification-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    color: #e63946; /* text-red-500 */
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fan-notification-card .notification-close-btn:hover {
    color: #d00000; /* text-red-700 */
}

/* بخش پروفایل */
.fan-profile-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.fan-profile-container {
    display: flex;
    gap: 30px;
    background: #1a1a2e; /* bg-gray-800 */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4); /* shadow-xl */
}

/* ستون ویرایش */
.fan-edit-column {
    flex: 3;
    min-width: 300px;
    order: 2;
}

.edit-profile-btn, .edit-address-btn, .edit-social-btn {
    background: #ff3434; /* bg-red-500 */
    color: #fff; /* text-white */
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 1.1em;
    transition: background 0.3s ease;
    margin-bottom: 15px;
    display: block;
    text-align: center;
}

.edit-profile-btn:hover, .edit-address-btn:hover, .edit-social-btn:hover {
    background: #e02d2d; /* bg-red-600 */
}

.fan-profile-form-container, .fan-address-form-container, .fan-social-form-container {
    background: #2a2a3e; /* bg-gray-700 */
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.fan-profile-form-container h3, .fan-address-form-container h3, .fan-social-form-container h3 {
    margin-top: 0;
    color: #ffd700; /* text-yellow-400 */
    text-align: right;
    font-size: 1.5em;
}

.fan-profile-form .form-row, .fan-address-form .form-row, .fan-social-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fan-profile-form label, .fan-address-form label, .fan-social-form label {
    flex: 1;
    min-width: 200px;
    text-align: right;
    color: #ccc; /* text-gray-300 */
    font-size: 1em;
}

.fan-profile-form input[type="text"],
.fan-profile-form input[type="date"],
.fan-profile-form input[type="url"],
.fan-profile-form select,
.fan-address-form select,
.fan-address-form textarea,
.fan-social-form input[type="text"],
.fan-social-form input[type="url"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #555; /* border-gray-600 */
    border-radius: 6px;
    background: #333; /* bg-gray-800 */
    color: #fff; /* text-white */
    text-align: right;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.fan-address-form textarea {
    height: 100px;
    resize: vertical;
}

.fan-profile-form input[type="text"]:focus,
.fan-profile-form input[type="date"]:focus,
.fan-profile-form input[type="url"]:focus,
.fan-profile-form select:focus,
.fan-address-form select:focus,
.fan-address-form textarea:focus,
.fan-social-form input[type="text"]:focus,
.fan-social-form input[type="url"]:focus {
    border-color: #ffd700; /* border-yellow-400 */
    outline: none;
}

.fan-profile-form input[type="file"] {
    padding: 5px 0;
    color: #fff; /* text-white */
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.fan-profile-form input[type="submit"],
.fan-profile-form .close-form-btn,
.fan-address-form input[type="submit"],
.fan-address-form .close-address-form-btn,
.fan-social-form input[type="submit"],
.fan-social-form .close-social-form-btn {
    background: #ff3434; /* bg-red-500 */
    color: #fff; /* text-white */
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

.fan-profile-form .close-form-btn,
.fan-address-form .close-address-form-btn,
.fan-social-form .close-social-form-btn {
    background: #666; /* bg-gray-600 */
}

.fan-profile-form input[type="submit"]:hover,
.fan-address-form input[type="submit"]:hover,
.fan-social-form input[type="submit"]:hover {
    background: #e02d2d; /* bg-red-600 */
}

.fan-profile-form .close-form-btn:hover,
.fan-address-form .close-address-form-btn:hover,
.fan-social-form .close-social-form-btn:hover {
    background: #555; /* bg-gray-700 */
}

/* ستون اطلاعات */
.fan-info-column {
    flex: 2;
    order: 1;
}

.fan-info-card {
    background: #222; /* bg-gray-900 */
    padding: 25px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3); /* shadow-lg */
}

.fan-profile-image {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #ffd700; /* border-yellow-400 */
}

.fan-profile-image-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    background: #333; /* bg-gray-800 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888; /* text-gray-500 */
    font-size: 16px;
    margin-bottom: 20px;
}

.fan-info-details {
    text-align: right;
    width: 100%;
}

.fan-info-details h3 {
    margin: 0 0 15px;
    color: #ffd700; /* text-yellow-400 */
    display: flex;
    align-items: center;
    font-size: 1.5em;
    direction: ltr;
    float: right;
}

.fan-info-table {
    width: 100%;
    border-collapse: collapse;
}

.fan-info-table tr {
    border-bottom: 1px solid #444; /* border-gray-700 */
}

.fan-info-table td {
    padding: 10px;
    color: #bbb; /* text-gray-400 */
    font-size: 1em;
    text-align: right;
}

.fan-info-table .label {
    font-weight: bold;
    color: #ddd; /* text-gray-300 */
    text-align: right;
    width: 40%;
}

.fan-info-table .value {
    text-align: right;
    color: #bbb; /* text-gray-400 */
}

/* پیام‌ها */
.fan-message {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: right;
    font-size: 1em;
}

.fan-message.success {
    color: #d4edda; /* text-green-100 */
    background: #155724; /* bg-green-900 */
}

.fan-message.error {
    color: #f8d7da; /* text-red-100 */
    background: #721c24; /* bg-red-900 */
}

.fan-message.warning {
    color: #856404; /* text-yellow-900 */
    background: #fff3cd; /* bg-yellow-100 */
}

/* استایل برای متن راهنما */
.username-hint {
    font-size: 0.9em;
    color: #bbb; /* text-gray-400 */
    margin-top: 5px;
    text-align: right;
}

/* استایل برای سطح کاربری */
.fan-level-normal { color: #bbb; /* text-gray-400 */ }
.fan-level-bronze { color: #cd7f32; /* bronze */ }
.fan-level-silver { color: #c0c0c0; /* silver */ }
.fan-level-gold { color: #ffd700; /* text-yellow-400 */ }

/* استایل برای نشان‌ها */
.fan-info-details h3 i {
    margin-right: 10px;
    font-size: 1.3em;
}

/* استایل‌های جدید برای شبکه‌های اجتماعی */
.fan-social-posts-container {
    margin-top: 24px; /* mt-6 */
}

.fan-social-posts-container h3 {
    color: #ffd700; /* text-yellow-400 */
    font-size: 1.5em;
    margin-bottom: 16px; /* mb-4 */
}

.fan-social-posts-container > div {
    background: #1f2937; /* bg-gray-800 */
    padding: 16px; /* p-4 */
    border-radius: 8px; /* rounded-lg */
    margin-bottom: 16px; /* mb-4 */
}

.fan-social-posts-container .flex.items-center {
    margin-bottom: 16px; /* mb-4 */
}

.fan-social-posts-container i {
    font-size: 1.5em; /* text-2xl */
    margin-right: 8px; /* mr-2 */
    color: #fff; /* text-white */
}

.fan-social-posts-container h4 {
    color: #fff; /* text-white */
    font-size: 1.2em;
}

.fan-social-post-form {
    display: flex;
    flex-direction: column;
}

.fan-social-post-form .form-row {
    margin-bottom: 16px; /* mb-4 */
}

.fan-social-post-form label {
    color: #d1d5db; /* text-gray-300 */
    display: block;
    margin-bottom: 8px; /* mb-2 */
}

.fan-social-post-form input[type="url"] {
    width: 100%;
    padding: 8px; /* p-2 */
    background: #374151; /* bg-gray-700 */
    border: 1px solid #4b5563; /* border-gray-600 */
    border-radius: 4px; /* rounded */
    color: #fff; /* text-white */
}

.fan-social-post-form .form-actions {
    display: flex;
    justify-content: flex-end;
}

.fan-social-post-form input[type="submit"] {
    background: #ff3434; /* bg-red-500 */
    color: #fff; /* text-white */
    padding: 8px 16px; /* px-4 py-2 */
    border-radius: 4px; /* rounded */
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fan-social-post-form input[type="submit"]:hover {
    background: #e02d2d; /* bg-red-600 */
}

.fan-social-posts-list {
    margin-top: 24px; /* mt-6 */
}

.fan-social-posts-list h3 {
    color: #ffd700; /* text-yellow-400 */
    font-size: 1.5em;
    margin-bottom: 16px; /* mb-4 */
}

.fan-social-posts-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fan-social-posts-list li {
    background: #1f2937; /* bg-gray-800 */
    padding: 16px; /* p-4 */
    border-radius: 8px; /* rounded-lg */
    margin-bottom: 16px; /* mb-4 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fan-social-posts-list li i {
    font-size: 1.5em; /* text-2xl */
    margin-right: 8px; /* mr-2 */
    color: #fff; /* text-white */
}

.fan-social-posts-list li a {
    color: #3b82f6; /* text-blue-500 */
    text-decoration: none;
}

.fan-social-posts-list li a:hover {
    text-decoration: underline;
    color: #2563eb; /* text-blue-600 */
}

.fan-social-posts-list li span {
    font-size: 0.9em;
}

/* استایل دکمه نمایش بیشتر */
#load-more-posts {
    background: #ff3434; /* bg-red-500 */
    color: #fff; /* text-white */
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

#load-more-posts:hover {
    background: #e02d2d; /* bg-red-600 */
}

#load-more-posts:disabled {
    background: #666; /* bg-gray-600 */
    cursor: not-allowed;
}

/* استایل لودینگ */
#posts-loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* پاسخ‌گویی برای موبایل */
@media (max-width: 768px) {
    .fan-dashboard-header {
        padding: 40px 15px;
    }

    .fan-dashboard-content h1 {
        font-size: 1.8em; /* text-2xl */
        text-align: center;
    }

    .fan-dashboard-content p {
        font-size: 1em; /* text-base */
        text-align: center;
    }

    .fan-profile-container {
        flex-direction: column;
        padding: 20px;
    }

    .fan-edit-column, .fan-info-column {
        flex: 1;
        width: 100%;
        order: unset;
    }

    .fan-profile-image {
        width: 150px;
        height: 150px;
    }

    .fan-info-table {
        font-size: 14px;
    }

    .fan-profile-form .form-row, .fan-address-form .form-row, .fan-social-form .form-row {
        flex-direction: column;
    }

    .fan-profile-form label, .fan-address-form label, .fan-social-form label {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions input[type="submit"],
    .form-actions .close-form-btn,
    .form-actions .close-address-form-btn,
    .form-actions .close-social-form-btn {
        width: 100%;
        margin-bottom: 15px;
    }

    .fan-notifications {
        padding: 15px;
    }

    .fan-notification-card {
        padding: 10px 15px;
    }

    .fan-notification-card h3 {
        font-size: 1.2em;
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 10px;
    }

    .fan-notification-card p {
        font-size: 0.9em;
        padding-left: 10px;
        padding-right: 10px;
        text-align: justify;
    }

    .fan-notification-card .notification-date {
        font-size: 0.8em;
        top: 10px;
        left: 15px;
    }

    .fan-notification-card .notification-close-btn {
        font-size: 1.2em;
        top: 8px;
        right: 10px;
        width: 20px;
        height: 20px;
    }

    .fan-social-posts-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .fan-social-posts-container > div {
        padding: 12px; /* p-3 */
    }

    .fan-social-post-form input[type="submit"] {
        width: 100%;
    }

    #load-more-posts {
        width: 100%;
        padding: 12px;
    }
}

/* غیرفعال کردن استایل‌های پیش‌فرض ووکامرس */
.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content {
    display: none !important;
}

.fan-admin-social .wp-list-table .approve-post,
.fan-admin-social .wp-list-table .reject-post {
    background: #10b981; /* green-500 */
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 2px;
    cursor: pointer;
    display: inline-block;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.fan-admin-social .wp-list-table .approve-post:hover {
    background: #059669; /* green-600 */
}

.fan-admin-social .wp-list-table .reject-post {
    background: #ef4444; /* red-500 */
}

.fan-admin-social .wp-list-table .reject-post:hover {
    background: #dc2626; /* red-600 */
}

.fan-admin-social .wp-list-table .approve-post:disabled,
.fan-admin-social .wp-list-table .reject-post:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* اطمینان از اینکه دکمه‌ها مخفی نیستند */
.fan-admin-social .wp-list-table td:last-child {
    text-align: center;
    min-width: 120px;
    visibility: visible;
}

/* استایل دکمه‌های موبایل */
.fan-club-mobile-button,
.fan-club-logout-btn-mobile {
    display: inline-block;
    margin: 5px;
}

.fan-club-btn-mobile,
.fan-club-logout-btn-mobile {
    display: flex;
    align-items: center;
    background-color: #FF3434; /* bg-red-500 */
    color: #fff; /* text-white */
    padding: 6px 10px;
    font-size: 0.8em;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.fan-club-btn-mobile:hover,
.fan-club-logout-btn-mobile:hover {
    background-color: #E02D2D; /* bg-red-600 */
}

.fan-club-btn-mobile i,
.fan-club-logout-btn-mobile i {
    margin-left: 5px;
    font-size: 1em;
}

/* مخفی کردن دکمه‌های دسکتاپ در موبایل */
@media (max-width: 768px) {
    .whb-column.whb-col-right.whb-visible-lg {
        display: none !important;
    }

    .fan-club-mobile-button,
    .fan-club-logout-btn-mobile {
        display: inline-block !important;
    }
}

/* نمایش دکمه‌های دسکتاپ در دسکتاپ */
@media (min-width: 769px) {
    .fan-club-mobile-button,
    .fan-club-logout-btn-mobile {
        display: none !important;
    }

    .whb-column.whb-col-right.whb-visible-lg {
        display: block !important;
    }
}
/* ظرف کلی دکمه‌های موبایل */
.mobile-fan-club-buttons {
    display: flex;
    justify-content: center; /* مرکز کردن دکمه‌ها */
    align-items: center;
    gap: 10px; /* فاصله بین دکمه‌ها */
    margin-bottom: 15px; /* فاصله 15 پیکسل از آیتم‌های منوی زیرین */
}

/* استایل دکمه باشگاه هواداران موبایل */
.wd-button-wrapper-mobile {
    display: inline-block;
}

.wd-button-wrapper-mobile .btn {
    background-color: #FF3434 !important;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.8em;
    border-radius: 12px; /* نیمه‌گرد */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.wd-button-wrapper-mobile .btn:hover {
    background-color: #E02D2D !important;
}

.wd-button-wrapper-mobile .wd-btn-icon img {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

/* استایل دکمه خروج موبایل */
.fan-club-logout-mobile {
    display: inline-block;
}

.fan-club-logout-btn-mobile {
    background-color: #FF3434;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%; /* دایره‌ای برای آیکون */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.fan-club-logout-btn-mobile:hover {
    background-color: #E02D2D;
}

.fan-club-logout-btn-mobile i {
    font-size: 1.5em; /* آیکون بزرگ‌تر */
}

/* مخفی کردن دکمه‌های دسکتاپ در موبایل */
@media (max-width: 768px) {
    .whb-column.whb-col-right.whb-visible-lg {
        display: none !important;
    }

    .mobile-fan-club-buttons {
        display: flex !important;
    }
}

/* مخفی کردن دکمه‌های موبایل در دسکتاپ */
@media (min-width: 769px) {
    .mobile-fan-club-buttons {
        display: none !important;
    }

    .whb-column.whb-col-right.whb-visible-lg {
        display: block !important;
    }
}