/**
 * Subscribers Management Styles
 *
 * Styles for subscribers management page and subscriber forms
 * Loaded on: Subscribers management pages
 */

/* Enhanced Subscribers Management Styles */
.ipb_subscription_wrapper {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px;
}

/* Native WordPress admin layout overrides */
.wrap.ipb_subscription_wrapper {
    background: transparent;
    min-height: 0;
    padding: 0 20px 0 0;
}

.wrap.ipb_subscription_wrapper .wrapper {
    width: auto;
    margin: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.wrap.ipb_subscription_wrapper .wp-heading-inline {
    color: #1d2327;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    padding: 9px 0 4px;
}

.wrap.ipb_subscription_wrapper .page-title-action {
    display: inline-block;
}

.wrap.ipb_subscription_wrapper .ipb_filters_section {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: none;
    margin: 12px 0 16px;
    padding: 12px;
}

.wrap.ipb_subscription_wrapper .ipb_filter_group label {
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
}

.wrap.ipb_subscription_wrapper .ipb_filter_group select,
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="date"],
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="email"],
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="search"],
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="text"],
.wrap.ipb_subscription_wrapper .ipb_bulk_actions select {
    border: 1px solid #8c8f94;
    border-radius: 3px;
    min-height: 30px;
    padding: 0 8px;
}

.wrap.ipb_subscription_wrapper .ipb_filter_group select:focus,
.wrap.ipb_subscription_wrapper .ipb_filter_group input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.wrap.ipb_subscription_wrapper .tablenav {
    clear: both;
    height: auto;
    margin: 6px 0 4px;
}

.wrap.ipb_subscription_wrapper .ipb_bulk_actions {
    background: transparent;
    border: 0;
    gap: 6px;
    padding: 0;
}

.wrap.ipb_subscription_wrapper .ipb_table_container {
    clear: both;
}

.wrap.ipb_subscription_wrapper .wp-list-table.ipb_subscribers_table {
    table-layout: auto;
}

.wrap.ipb_subscription_wrapper .ipb_subscribers_table thead {
    background: #fff;
    border-bottom: 1px solid #c3c4c7;
}

.wrap.ipb_subscription_wrapper .ipb_subscribers_table th {
    color: #2c3338;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    padding: 8px 10px;
    text-transform: none;
}

.wrap.ipb_subscription_wrapper .ipb_subscribers_table td {
    padding: 8px 10px;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_row {
    border-bottom: 0;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_row:hover {
    background: transparent;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_avatar,
.wrap.ipb_subscription_wrapper .ipb_campaign_badge,
.wrap.ipb_subscription_wrapper .ipb_subscription_status {
    border-radius: 3px;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_avatar {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    color: #2c3338;
}

.wrap.ipb_subscription_wrapper .ipb_campaign_badge {
    background: #f0f6fc;
    color: #135e96;
}

.wrap.ipb_subscription_wrapper .ipb_action_btn {
    background: transparent;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    color: #2271b1;
    height: 28px;
    width: 28px;
}

.wrap.ipb_subscription_wrapper .ipb_action_btn:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #135e96;
    transform: none;
}

.wrap.ipb_subscription_wrapper .ipb_delete_btn {
    color: #b32d2e;
}

.wrap.ipb_subscription_wrapper .ipb_pagination_wrapper {
    align-items: center;
    background: transparent;
    border: 0;
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.ipb_subscription_wrapper .wrapper {
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header Section */
.ipb_subscribers_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: 1px solid #e5e7eb;
}

.ipb_subscribers_header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: white;
}

.ipb_header_actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Enhanced Button Styles */
.ipb_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ipb_btn_primary {
    background: #4f46e5;
    color: white;
}

.ipb_btn_primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.ipb_btn_secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.ipb_btn_secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* Enhanced Filters Section */
.ipb_filters_section {
    padding: 20px 30px;
    background: #fefefe;
    border-bottom: 1px solid #e5e7eb;
}

.ipb_filters_form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ipb_filters_row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.ipb_filter_group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ipb_filter_group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.ipb_filter_group select,
.ipb_filter_group input[type="date"],
.ipb_filter_group input[type="email"],
.ipb_filter_group input[type="text"] {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: white;
}

.ipb_filter_group select:focus,
.ipb_filter_group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ipb_search_group {
    flex: 1;
}

.ipb_filter_actions {
    display: flex;
    gap: 12px;
    align-items: end;
    justify-content: flex-end;
}

/* Enhanced Import Modal */
.ipb_enhanced_modal {
    max-width: 500px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Settings Modal - Wider horizontally, shorter vertically */
#ipb_settings_modal.ipb_enhanced_modal {
    max-width: 650px !important;
}

/* Subscriber Modal Styles */
.ipb_subscriber_modal {
    max-width: 800px !important;
}

.ipb_subscriber_modal .ipb_modal_body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px 30px;
}

.ipb_subscriber_modal .ipb_form_section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ipb_subscriber_modal .ipb_form_section:last-child {
    margin-bottom: 0;
}

.ipb_subscriber_modal .ipb_section_header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.ipb_subscriber_modal .ipb_section_header h4 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ipb_subscriber_modal .ipb_section_header h4 i {
    color: #667eea;
}

.ipb_subscriber_modal .ipb_form_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: start;
}

.ipb_subscriber_modal .ipb_form_group_full {
    grid-column: 1 / -1;
}

.ipb_subscriber_modal .ipb_form_group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ipb_subscriber_modal .ipb_form_label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.ipb_subscriber_modal .ipb_form_label .required {
    color: #ef4444;
}

.ipb_subscriber_modal .ipb_form_input,
.ipb_subscriber_modal .ipb_form_select {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.ipb_subscriber_modal .ipb_form_input:focus,
.ipb_subscriber_modal .ipb_form_select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ipb_subscriber_modal .ipb_form_input.ipb_field_invalid,
.ipb_subscriber_modal .ipb_form_select.ipb_field_invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.ipb_subscriber_modal .ipb_form_input[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.ipb_subscriber_modal .ipb_field_error {
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    display: none;
}

.ipb_subscriber_modal .ipb_toggle_container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ipb_subscriber_modal .ipb_toggle_switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.ipb_subscriber_modal .ipb_toggle_switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ipb_subscriber_modal .ipb_toggle_label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2px;
}

.ipb_subscriber_modal .ipb_toggle_slider {
    height: 20px;
    width: 20px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ipb_subscriber_modal .ipb_toggle_switch input:checked + .ipb_toggle_label {
    background-color: #10b981;
}

.ipb_subscriber_modal .ipb_toggle_switch input:checked + .ipb_toggle_label .ipb_toggle_slider {
    transform: translateX(26px);
}

.ipb_subscriber_modal .ipb_toggle_text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.ipb_modal_content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.ipb_modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.ipb_modal_header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.ipb_modal_close {
    font-size: 24px;
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ipb_modal_close:hover {
    color: #dc2626;
}

.ipb_modal_body {
    padding: 30px;
}

.ipb_file_upload_area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ipb_file_upload_area:hover {
    border-color: #4f46e5;
    background: #f8fafc;
}

.ipb_file_upload_area i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.ipb_file_upload_area p {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 16px;
}

.ipb_import_settings h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.ipb_checkbox_label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

/* Override for Column Visibility group - horizontal layout */
.ipb_column_visibility_group .ipb_checkbox_label {
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: row !important;
}

.ipb_checkbox_label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
}

.ipb_modal_footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px 30px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

/* Bulk Actions */
.ipb_bulk_actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 40px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.ipb_bulk_actions select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

/* Enhanced Table Styles */
.ipb_table_container {
    overflow: visible;
    margin: 0;
}

.ipb_subscribers_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    table-layout: fixed;
}

.ipb_subscribers_table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.ipb_subscribers_table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ipb_subscribers_table th.ipb_sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.ipb_subscribers_table th.ipb_sortable:hover {
    background: #e5e7eb;
}

.ipb_checkbox_column,
.ipb_actions_column {
    width: 4%;
    text-align: center;
}

.ipb_subscriber_row {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.ipb_subscriber_row:hover {
    background: #fafbfc;
}

.ipb_subscribers_table td {
    padding: 12px 16px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Enhanced Cell Styles */
.ipb_name_cell {
    width: 20%;
}

.ipb_subscriber_info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ipb_subscriber_avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    flex-shrink: 0;
}

.ipb_subscriber_details strong {
    color: #1e293b;
    font-weight: 600;
}

.ipb_email_cell {
    width: 25%;
}

.ipb_email_with_status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
}

.ipb_email_status {
    font-size: 16px;
}

.ipb_email_status.ipb_active {
    color: #10b981;
}

.ipb_email_status.ipb_inactive {
    color: #ef4444;
}

.ipb_campaign_cell {
    width: 15%;
}

.ipb_campaign_badge {
    display: inline-block;
    padding: 4px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ipb_no_campaign {
    color: #9ca3af;
    font-style: italic;
    font-size: 12px;
}

.ipb_privacy_cell {
    width: 12%;
}

.ipb_privacy_status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.ipb_privacy_status.ipb_agreed {
    color: #10b981;
}

.ipb_privacy_status.ipb_not_agreed {
    color: #f59e0b;
}

.ipb_status_cell {
    width: 12%;
}

.ipb_subscription_status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ipb_subscription_status.ipb_subscribed {
    background: #d1fae5;
    color: #065f46;
}

.ipb_subscription_status.ipb_unsubscribed {
    background: #fee2e2;
    color: #991b1b;
}

.ipb_date_cell {
    width: 12%;
    color: #64748b;
    font-size: 12px;
}

.ipb_actions_cell {
    width: 4%;
}

.ipb_checkbox_column {
    width: 4%;
    text-align: center;
}

.ipb_action_buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.ipb_action_btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 12px;
}

.ipb_edit_btn {
    background: #dbeafe;
    color: #1e40af;
}

.ipb_edit_btn:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}

.ipb_export_btn {
    background: #d1fae5;
    color: #065f46;
}

.ipb_export_btn:hover {
    background: #a7f3d0;
    transform: translateY(-1px);
}

.ipb_delete_btn {
    background: #fee2e2;
    color: #991b1b;
}

.ipb_delete_btn:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* Empty State */
.ipb_no_data {
    text-align: center;
    padding: 60px 20px;
}

.ipb_empty_state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #64748b;
}

.ipb_empty_state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.ipb_empty_state h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #475569;
}

.ipb_empty_state p {
    margin: 0;
    font-size: 14px;
}

/* Enhanced Pagination */
.ipb_pagination_wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.ipb_pagination_info {
    font-size: 14px;
    color: #64748b;
}

.ipb_pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ipb_pagination .page-numbers:hover,
.ipb_pagination .page-numbers.current {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.ipb_pagination .page-numbers.dots {
    border: none;
    background: none;
    color: #9ca3af;
}

/* Legacy Subscriber Form Styles */
.input_field {
    position: relative;
    flex: 0 0 30%;
}

.input_fields {
    flex-wrap: wrap;
    margin-bottom: 100px;
}

div#ipb_new_subscriber_ {
    margin: 100px 0;
    background: white;
    width: 98%;
    box-sizing: border-box;
    padding: 50px 100px 30px 30px;
}

#ipb_new_subscribe_ .ipb_sub_wrapper {
    display: flex !important;
}

.ipb_sub_wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.ipb_sub_wrapper .ipb_sub_fields {
    display: flex;
    width: 49%;
    flex: 1 0 48%;
    gap: 20px;
}

.ipb_sub_wrapper .ipb_sub_fields label {
    width: 150px;
    color: black;
    font-size: 20px;
}

.ipb_sub_wrapper .ipb_sub_fields input,
.ipb_sub_wrapper .ipb_sub_fields select {
    padding: 2px 15px;
    border-radius: 6px;
    font-weight: 400;
    max-width: 100%;
    border: 1px solid #E0E0E0;
    width: 100% !important;
    font-size: 18px;
}

.ipb_sub_wrapper .ipb_sub_fields input::placeholder {
    color: black;
}

.ipb_sub_fields.check_sub_field {
    padding: 10px 0 20px 0;
    gap: 30px;
    flex: 0 0 50% !important;
}

.ipb_sub_fields.check_sub_field .check_field {
    display: flex;
    width: 48%;
    gap: 30px;
    align-items: center;
}

.check_sub_field .check_field label {
    width: 74%;
    flex: 0 0 58%;
}

.check_sub_field .check_field .input.ipb_tog {
    width: 30% !important;
}

.ipb_sub_fields.check_sub_field .check_field:nth-child(2) label {
    text-align: right;
}

.ipb_submit_scriber {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 20px;
}

.popup_lists svg {
    position: relative;
    width: 10%;
    top: 3px;
}

.sub_message p.success {
    display: none;
    font-size: 18px;
    background: #00c700;
    width: fit-content;
    padding: 5px 30px;
    color: white;
    border-radius: 5px;
}

.sub_message a {
    color: yellow;
    font-weight: bold;
}

.sub_message p.error {
    background-color: red;
}

#sub_cancel_btn,
#ipb_new_user_btn,.sub_btn {
    text-decoration: none;
    cursor: pointer;
    color: #1E1F21;
    padding: 10px 35px;
    border: none;
    background: #D8E7FB;
    border-radius: 6px;
    font-size: 18px;
}

button.sub_btn {
    display: flex;
    margin: 0 auto;
}

input#ipb_new_user_btn,.sub_btn  {
    background: #1A73E8;
    color: white;
}

.check_sub_field .slider:before {
    width: 32px;
    background: #00000042;
    height: 32px;
    bottom: 1px;
    left: 2px;
}

input#ipb_privacy_policy:after {
    content: '';
    width: 6px;
    height: 14px;
    border-width: 0px 3px 3px 0px;
    position: absolute;
    display: block;
    border-style: solid;
    border-color: #fdfdfd;
    transform: rotate(46deg);
    top: 0px;
    left: 4px;
}

input#ipb_privacy_policy:before {
    position: absolute;
    content: '';
    width: 25px !important;
    height: 25px !important;
    background: #03e334;
    border-radius: 0px;
    left: 0;
}

input#ipb_privacy_policy {
    pointer-events: none;
    appearance: none;
    position: relative;
    width: 25px;
    border: none;
    height: 25px;
    background: transparent !important;
    box-shadow: none !important;
}

.ipb_sub_import a{
    color:black;
}

input#ipb_privacy_policy:after:checked:after {
    left: 6px;
    opacity: 1;
}

td.is_sub {
    color: #1a73e8;
}

div#ipb_sub_import_csv {
    max-width: 400px !important;
}

/* Column visibility improvements */
.ipb_subscribers_table th,
.ipb_subscribers_table td {
    transition: all 0.3s ease;
}

.ipb_subscribers_table th:not(.ipb_checkbox_column),
.ipb_subscribers_table td:not(:first-child) {
    min-width: 120px;
}

.ipb_subscribers_table .ipb_checkbox_column {
    width: 40px;
    min-width: 40px;
}

.ipb_subscribers_table .ipb_actions_column {
    width: 120px;
    min-width: 120px;
}

/* Bulk actions campaign selection */
.ipb_campaign_selection {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.ipb_campaign_selection select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 14px;
    min-width: 200px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ipb_campaign_selection select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ipb_campaign_selection select:hover {
    border-color: #9ca3af;
}

.ipb_campaign_help {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}

/* Final native WordPress admin layout overrides. Keep this block last. */
.wrap.ipb_subscription_wrapper {
    background: transparent;
    min-height: 0;
    padding: 0 20px 0 0;
}

.wrap.ipb_subscription_wrapper .wrapper {
    width: auto;
    margin: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.wrap.ipb_subscription_wrapper .wp-heading-inline {
    color: #1d2327;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    padding: 9px 0 4px;
}

.wrap.ipb_subscription_wrapper .ipb_filters_section {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: none;
    margin: 12px 0 16px;
    padding: 12px;
}

.wrap.ipb_subscription_wrapper .ipb_filter_group label {
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
}

.wrap.ipb_subscription_wrapper .ipb_filter_group select,
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="date"],
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="email"],
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="search"],
.wrap.ipb_subscription_wrapper .ipb_filter_group input[type="text"],
.wrap.ipb_subscription_wrapper .ipb_bulk_actions select,
.wrap.ipb_subscription_wrapper .ipb_campaign_selection select {
    border: 1px solid #8c8f94;
    border-radius: 3px;
    box-shadow: none;
    min-height: 30px;
    padding: 0 8px;
}

.wrap.ipb_subscription_wrapper .ipb_filter_group select:focus,
.wrap.ipb_subscription_wrapper .ipb_filter_group input:focus,
.wrap.ipb_subscription_wrapper .ipb_campaign_selection select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.wrap.ipb_subscription_wrapper .ipb_filters_form {
    gap: 10px;
}

.wrap.ipb_subscription_wrapper .ipb_filters_row_single {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(120px, 0.8fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(220px, 1.6fr) auto;
    gap: 10px;
}

.wrap.ipb_subscription_wrapper .ipb_filter_group {
    gap: 4px;
    min-width: 0;
}

.wrap.ipb_subscription_wrapper .ipb_search_group input {
    width: 100%;
}

.wrap.ipb_subscription_wrapper .ipb_filter_actions {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: flex-start;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .wrap.ipb_subscription_wrapper .ipb_filters_row_single {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .wrap.ipb_subscription_wrapper .ipb_search_group {
        grid-column: span 2;
    }
}

@media (max-width: 782px) {
    .wrap.ipb_subscription_wrapper .ipb_filters_row_single {
        grid-template-columns: 1fr;
    }

    .wrap.ipb_subscription_wrapper .ipb_search_group {
        grid-column: auto;
    }

    .wrap.ipb_subscription_wrapper .ipb_filter_actions {
        flex-wrap: wrap;
    }
}

.wrap.ipb_subscription_wrapper .tablenav {
    clear: both;
    height: auto;
    margin: 6px 0 4px;
}

.wrap.ipb_subscription_wrapper .ipb_bulk_actions {
    align-items: center;
    background: transparent;
    border: 0;
    gap: 6px;
    padding: 0;
}

.wrap.ipb_subscription_wrapper .ipb_table_container {
    clear: both;
}

.wrap.ipb_subscription_wrapper .wp-list-table.ipb_subscribers_table {
    table-layout: auto;
}

.wrap.ipb_subscription_wrapper .ipb_subscribers_table thead {
    background: #fff;
    border-bottom: 1px solid #c3c4c7;
}

.wrap.ipb_subscription_wrapper .ipb_subscribers_table th {
    color: #2c3338;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    padding: 8px 10px;
    text-transform: none;
}

.wrap.ipb_subscription_wrapper .ipb_subscribers_table td {
    padding: 8px 10px;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_row {
    border-bottom: 0;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_row:hover {
    background: transparent;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_avatar,
.wrap.ipb_subscription_wrapper .ipb_campaign_badge,
.wrap.ipb_subscription_wrapper .ipb_subscription_status {
    border-radius: 3px;
}

.wrap.ipb_subscription_wrapper .ipb_subscriber_avatar {
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    color: #2c3338;
}

.wrap.ipb_subscription_wrapper .ipb_campaign_badge {
    background: #f0f6fc;
    color: #135e96;
}

.wrap.ipb_subscription_wrapper .ipb_action_btn {
    background: transparent;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    color: #2271b1;
    height: 28px;
    width: 28px;
}

.wrap.ipb_subscription_wrapper .ipb_action_btn:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #135e96;
    transform: none;
}

.wrap.ipb_subscription_wrapper .ipb_delete_btn {
    color: #b32d2e;
}

.wrap.ipb_subscription_wrapper .ipb_pagination_wrapper {
    align-items: center;
    background: transparent;
    border: 0;
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}
