/* Code gốc từ style.css */
.ben-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ben-form h2 {
    margin-top: 0;
}

.ben-form .step {
    display: none;
}

.ben-form .step.active {
    display: block !important;
}

.ben-form .next-step,
.ben-form .prev-step {
    display: inline-block;
    visibility: visible;
    margin: 8px 6px 8px 0;
}

.ben-form #post-preview {
    min-height: 80px;
}

.ben-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.ben-form input[type="text"],
.ben-form input[type="url"],
.ben-form textarea,
.ben-form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.ben-form input[type="submit"],
.ben-form button {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block !important;
    visibility: visible !important;
}

.ben-form input[type="submit"]:hover,
.ben-form button:hover {
    background: #006ba1;
}

.ben-notice {
    padding: 10px;
    margin: 10px 0;
    border-left: 4px solid #007cba;
    background: #f8f9fa;
}

.ben-notice-error {
    border-left-color: #dc3545;
}

.ben-stats-shortcode {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ben-stats-shortcode .stat {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    flex: 1;
    min-width: 150px;
}

/* CSS mới từ admin-dashboard.php */
.ben-tabs .nav-tab-wrapper {
    margin-bottom: 20px;
}

.ben-tabs .nav-tab {
    padding: 10px 20px;
    margin-right: 5px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.ben-tabs .nav-tab-active {
    background: #007BFF;
    color: #fff;
}

.tab-content {
    display: none;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.tab-content.active {
    display: block;
}

.ben-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    flex: 1;
    min-width: 150px;
}

.stat-box:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 10;
}

.button-danger {
    background: #dc3545;
    color: #fff;
    border: none;
}

.button-danger:hover {
    background: #c82333;
}

.invite-link {
    width: 300px;
}

.share-facebook,
.share-instagram,
.share-pinterest,
.share-linkedin,
.share-zalo,
.share-twitter {
    margin-right: 5px;
}

.ben-actions {
    margin-bottom: 20px;
}

.ben-actions button {
    margin-right: 10px;
}

/* Điều chỉnh để tránh xung đột */
.ben-form .stat-box,
.ben-stats-shortcode .stat-box {
    flex: unset;
    min-width: unset;
}

/* Thêm style cho form nâng cấp gói */
.ben-upgrade-package {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ben-upgrade-package h3 {
    margin-top: 0;
}

.ben-upgrade-package .form-table {
    width: 100%;
    margin-bottom: 20px;
}

.ben-upgrade-package .form-table th {
    width: 30%;
    padding: 10px 0;
    vertical-align: top;
}

.ben-upgrade-package .form-table td {
    padding: 10px 0;
}

.ben-upgrade-package select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.ben-upgrade-package input[type="submit"] {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.ben-upgrade-package input[type="submit"]:hover {
    background: #006ba1;
}

/* Thêm style cho shortcode [ben_posts_list] */
.ben-posts-list {
    max-width: 800px;
    margin: 20px auto;
}

.ben-posts-list h3 {
    margin-top: 0;
}

.ben-posts-list-table {
    width: 100%;
}

.ben-posts-list-table th,
.ben-posts-list-table td {
    padding: 10px;
    text-align: left;
}

/* Thêm style cho điểm số trong [ben_upgrade_package] */
.ben-upgrade-points {
    margin-bottom: 15px;
    font-weight: bold;
}

/* Thêm style cho shortcode [ben_points_history] */
.ben-points-history {
    max-width: 800px;
    margin: 20px auto;
}

.ben-points-history h3 {
    margin-top: 0;
}

.ben-points-history-table {
    width: 100%;
}

.ben-points-history-table th,
.ben-points-history-table td {
    padding: 10px;
    text-align: left;
}

/* Thêm style cho TinyMCE và các thành phần khác */
.ben-form .mce-tinymce {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

.ben-form #post-preview {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.create-new-post {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.create-new-post:hover {
    background: #218838;
}


/* Rank Math-style wizard UI */
.ben-wizard-progress {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0 auto 22px;
    padding: 0;
    max-width: 760px;
    counter-reset: ben-step;
}
.ben-wizard-progress li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    color: #7a8494;
    font-size: 13px;
}
.ben-wizard-progress li:not(:last-child)::after {
    content: '';
    height: 2px;
    flex: 1;
    margin: 0 10px;
    background: #dfe5ec;
}
.ben-wizard-progress li.is-complete::after,
.ben-wizard-progress li.is-active::after { background: #2271b1; }
.ben-wizard-progress span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #e8edf3;
    color: #536170;
    font-weight: 700;
}
.ben-wizard-progress .is-active span,
.ben-wizard-progress .is-complete span { background: #2271b1; color: #fff; }
.ben-wizard-progress .is-active strong { color: #1d2327; }
.ben-form .step { padding: 4px 0; }
.ben-form .step.active { animation: benWizardIn .18s ease-out; }
.ben-field-error { border-color: #d63638 !important; box-shadow: 0 0 0 1px #d63638 !important; }
.ben-wizard-inline-error { padding: 10px 12px; border-left: 4px solid #d63638; background: #fff1f1; color: #8a2424; }
@keyframes benWizardIn { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 640px) {
    .ben-wizard-progress { display: grid; gap: 8px; }
    .ben-wizard-progress li:not(:last-child)::after { display: none; }
    .ben-wizard-progress li { flex: none; }
    .ben-form { margin: 12px auto; padding: 14px; }
}
