th.field-name{
    text-align: left !important;
}

/* ============================================
   Email Template Admin - Full Width Editor
   ============================================ */

/* Apply box-sizing to prevent overflow */
body.app-builder.model-emailtemplate.change-form * {
    box-sizing: border-box;
}

/* 1) Make ALL column classes full-width in the form (but without explicit width) */
body.app-builder.model-emailtemplate.change-form .row > [class*="col-"],
body.app-builder.model-emailtemplate.change-form .col-md-9,
body.app-builder.model-emailtemplate.change-form .col-lg-9,
body.app-builder.model-emailtemplate.change-form .col-md-6,
body.app-builder.model-emailtemplate.change-form .col-lg-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* 2) Override the form row/column layout */
body.app-builder.model-emailtemplate.change-form form .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 3) Ensure content areas respect max-width */
body.app-builder.model-emailtemplate.change-form .content,
body.app-builder.model-emailtemplate.change-form #content {
    max-width: 100% !important;
    overflow-x: hidden;
}

/* 4) Target the card that contains the form */
body.app-builder.model-emailtemplate.change-form .card-primary,
body.app-builder.model-emailtemplate.change-form .card {
    max-width: 100% !important;
}

/* 5) Ensure tab content is constrained */
body.app-builder.model-emailtemplate.change-form .tab-content,
body.app-builder.model-emailtemplate.change-form .tab-pane {
    max-width: 100% !important;
}

/* 6) Make CKEditor and its container full width within constraints */
body.app-builder.model-emailtemplate.change-form .field-body_html,
body.app-builder.model-emailtemplate.change-form .field-body_html .cke,
body.app-builder.model-emailtemplate.change-form .field-body_html .cke_chrome,
body.app-builder.model-emailtemplate.change-form .field-body_html textarea,
body.app-builder.model-emailtemplate.change-form .field-body_html .django-ckeditor-widget {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 7) Make the CKEditor editing area taller */
body.app-builder.model-emailtemplate.change-form .field-body_html .cke_contents {
    min-height: 500px !important;
}

/* 8) Ensure form rows respect container width */
body.app-builder.model-emailtemplate.change-form .form-row,
body.app-builder.model-emailtemplate.change-form .form-group {
    max-width: 100% !important;
}

/* 9) Card body with proper padding */
body.app-builder.model-emailtemplate.change-form .card-body {
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 10) Submit row constrained */
body.app-builder.model-emailtemplate.change-form .submit-row {
    max-width: 100% !important;
}

/* 11) Prevent horizontal overflow on the body */
body.app-builder.model-emailtemplate.change-form {
    overflow-x: hidden;
}


/* ============================================
   User Permissions - Text Readability Fix
   ============================================ */

/* Make permission select boxes taller for better visibility */
.selector select {
    height: 400px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Make permission text wrap instead of truncate */
.selector select option {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    padding: 8px 10px !important;
    line-height: 1.5 !important;
    min-height: 40px !important;
}