/**
 * Member Dashboard Styles
 * All classes prefixed with cb_p6_a1_ for namespace isolation
 */

/* Main Dashboard Container */
.cb_p6_a1_member_dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.cb_p6_a1_member_dashboard h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #2271b1;
}

.cb_p6_a1_member_dashboard h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 20px 0;
}

/* Dashboard Sections */
.cb_p6_a1_dashboard_section {
    background: #ffffff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Login Required */
.cb_p6_a1_login_required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.cb_p6_a1_login_card {
    background: #ffffff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cb_p6_a1_login_card h2 {
    margin-bottom: 15px;
    color: #1d2327;
}

.cb_p6_a1_login_card p {
    color: #646970;
    margin-bottom: 20px;
}

/* No Membership */
.cb_p6_a1_no_membership {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.cb_p6_a1_no_membership_card {
    background: #f6f7f7;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 500px;
}

.cb_p6_a1_no_membership_card h2 {
    color: #1d2327;
    margin-bottom: 10px;
}

.cb_p6_a1_no_membership_card p {
    color: #646970;
    margin: 0;
}

/* Membership Card */
.cb_p6_a1_membership_card {
    background: #f6f7f7;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    padding: 20px;
}

.cb_p6_a1_membership_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dcdcde;
}

.cb_p6_a1_tier_name {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

/* Status Badges */
.cb_p6_a1_status_badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cb_p6_a1_status_active {
    background-color: #46b450;
}

.cb_p6_a1_status_inactive {
    background-color: #a7aaad;
}

.cb_p6_a1_status_cancelled,
.cb_p6_a1_status_canceled {
    background-color: #d63638;
}

.cb_p6_a1_status_pending {
    background-color: #ffb900;
}

.cb_p6_a1_status_expired {
    background-color: #dba617;
}

/* Membership Details */
.cb_p6_a1_membership_details {
    display: grid;
    gap: 12px;
}

.cb_p6_a1_detail_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e4e7;
}

.cb_p6_a1_detail_row:last-child {
    border-bottom: none;
}

.cb_p6_a1_detail_label {
    font-size: 14px;
    color: #646970;
    font-weight: 500;
}

.cb_p6_a1_detail_value {
    font-size: 14px;
    color: #1d2327;
    font-weight: 600;
}

.cb_p6_a1_subscription_status_active {
    color: #46b450;
}

.cb_p6_a1_subscription_status_canceled {
    color: #d63638;
}

.cb_p6_a1_subscription_status_past_due {
    color: #dba617;
}

.cb_p6_a1_subscription_status_trialing {
    color: #2271b1;
}

/* Tier Comparison */
.cb_p6_a1_tier_comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.cb_p6_a1_tier_card {
    background: #f6f7f7;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cb_p6_a1_tier_card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.cb_p6_a1_tier_current {
    border-color: #46b450;
    background: #f0f7f0;
}

.cb_p6_a1_current_badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #46b450;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cb_p6_a1_tier_title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 10px 0;
}

.cb_p6_a1_tier_price {
    font-size: 28px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 15px;
}

.cb_p6_a1_tier_description {
    font-size: 14px;
    color: #646970;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cb_p6_a1_tier_actions {
    margin-top: auto;
}

/* Notices */
.cb_p6_a1_notice {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

/* Action Buttons */
.cb_p6_a1_action_button {
    display: inline-block;
    background: #2271b1;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cb_p6_a1_action_button:hover {
    background: #135e96;
    color: #ffffff;
}

.cb_p6_a1_action_button.cb_p6_a1_secondary {
    background: #f6f7f7;
    color: #2271b1;
    border: 1px solid #2271b1;
}

.cb_p6_a1_action_button.cb_p6_a1_secondary:hover {
    background: #f0f6fc;
}

.cb_p6_a1_cancel_button {
    display: inline-block;
    background: #d63638;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cb_p6_a1_cancel_button:hover {
    background: #a00;
    color: #ffffff;
}

.cb_p6_a1_change_tier_button {
    width: 100%;
}

/* Actions Container */
.cb_p6_a1_actions_container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb_p6_a1_action_description {
    font-size: 13px;
    color: #646970;
    margin: 5px 0 0 0;
}

/* History Tables */
.cb_p6_a1_history_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cb_p6_a1_history_table thead {
    background: #f6f7f7;
}

.cb_p6_a1_history_table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 2px solid #ccd0d4;
}

.cb_p6_a1_history_table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e4e7;
    color: #3c434a;
}

.cb_p6_a1_history_table tbody tr:hover {
    background: #f9f9f9;
}

.cb_p6_a1_empty_message {
    color: #646970;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cb_p6_a1_member_dashboard {
        padding: 15px;
    }

    .cb_p6_a1_member_dashboard h1 {
        font-size: 22px;
    }

    .cb_p6_a1_dashboard_section {
        padding: 16px;
    }

    .cb_p6_a1_membership_header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cb_p6_a1_tier_comparison {
        grid-template-columns: 1fr;
    }

    .cb_p6_a1_history_table {
        font-size: 13px;
    }

    .cb_p6_a1_history_table th,
    .cb_p6_a1_history_table td {
        padding: 8px 10px;
    }

    .cb_p6_a1_detail_row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .cb_p6_a1_login_card {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .cb_p6_a1_member_dashboard h1 {
        font-size: 20px;
    }

    .cb_p6_a1_tier_price {
        font-size: 24px;
    }

    .cb_p6_a1_history_table th:nth-child(3),
    .cb_p6_a1_history_table td:nth-child(3) {
        display: none;
    }
}

