/* Comtelco Cable Default Inline - Field Widths & Button Removal */

/* DEBUG: If this CSS is loading, this text should be RED */
#simpleproductcabledefault_set-group h2,
#comtelcocabledetail_set-group h2 {
    color: red !important;
}

/* ============================================
   HIDE ADD/EDIT/VIEW BUTTONS on autocomplete fields
   ============================================ */

a[id*="add_id_simpleproductcabledefault_set"],
a[id*="change_id_simpleproductcabledefault_set"],
a[id*="view_id_simpleproductcabledefault_set"],
a[id*="add_id_default_cable_details"],
a[id*="change_id_default_cable_details"],
a[id*="view_id_default_cable_details"],
a[id*="add_id_comtelcocabledetail_set"],
a[id*="change_id_comtelcocabledetail_set"],
a[id*="view_id_comtelcocabledetail_set"],
a[id*="add_id_cable_details"],
a[id*="change_id_cable_details"],
a[id*="view_id_cable_details"],
.related-widget-wrapper-link {
    display: none !important;
}

/* ============================================
   HIDE THE INLINE OBJECT LABEL/DESCRIPTION TEXT
   (The "A113249B - LMR-100 with N Jack 8" text)
   ============================================ */

#simpleproductcabledefault_set-group .inline-related h3,
#simpleproductcabledefault_set-group .inline_label,
#simpleproductcabledefault_set-group .djn-inline-form > h3,
#comtelcocabledetail_set-group .inline-related h3,
#comtelcocabledetail_set-group .inline_label,
#comtelcocabledetail_set-group .djn-inline-form > h3 {
    display: none !important;
}

/* Hide any inline object string representation */
.inline-group .inline-related .inline_label,
.inline-group span.inline_label {
    display: none !important;
}

/* ============================================
   MAKE TABLE USE FULL WIDTH
   ============================================ */

#simpleproductcabledefault_set-group table,
#comtelcocabledetail_set-group table {
    width: 100% !important;
    table-layout: fixed !important;
}

/* ============================================
   INPUT FIELD WIDTHS - by NAME attribute
   ============================================ */

/* Sort order - TINY */
input[name$="-sort_order"] {
    width: 40px !important;
    max-width: 50px !important;
    text-align: center;
}

/* Length in inches - SMALL */
input[name$="-length_in_inches"] {
    width: 50px !important;
    max-width: 70px !important;
    text-align: center;
}

/* Application code - MEDIUM */
input[name$="-application_code"] {
    width: 80px !important;
    max-width: 100px !important;
}

/* ============================================
   COLUMN WIDTHS - Fixed layout
   ============================================ */

/* Sort order column - FIXED TINY */
#simpleproductcabledefault_set-group th:first-child,
#simpleproductcabledefault_set-group td:first-child,
#comtelcocabledetail_set-group th:first-child,
#comtelcocabledetail_set-group td:first-child {
    width: 60px !important;
    max-width: 70px !important;
}

/* Cable type column - LARGE (grow to fill) */
#simpleproductcabledefault_set-group th:nth-child(2),
#simpleproductcabledefault_set-group td:nth-child(2),
#comtelcocabledetail_set-group th:nth-child(2),
#comtelcocabledetail_set-group td:nth-child(2) {
    width: 30% !important;
    min-width: 200px !important;
}

/* Connector column - LARGE (grow to fill) */
#simpleproductcabledefault_set-group th:nth-child(3),
#simpleproductcabledefault_set-group td:nth-child(3),
#comtelcocabledetail_set-group th:nth-child(3),
#comtelcocabledetail_set-group td:nth-child(3) {
    width: 30% !important;
    min-width: 200px !important;
}

/* Length column - SMALL */
#simpleproductcabledefault_set-group th:nth-child(4),
#simpleproductcabledefault_set-group td:nth-child(4),
#comtelcocabledetail_set-group th:nth-child(4),
#comtelcocabledetail_set-group td:nth-child(4) {
    width: 80px !important;
    max-width: 100px !important;
}

/* Application code column - SMALL */
#simpleproductcabledefault_set-group th:nth-child(5),
#simpleproductcabledefault_set-group td:nth-child(5),
#comtelcocabledetail_set-group th:nth-child(5),
#comtelcocabledetail_set-group td:nth-child(5) {
    width: 100px !important;
    max-width: 120px !important;
}

/* Delete column - TINY */
#simpleproductcabledefault_set-group th:last-child,
#simpleproductcabledefault_set-group td:last-child,
#comtelcocabledetail_set-group th:last-child,
#comtelcocabledetail_set-group td:last-child {
    width: 60px !important;
    max-width: 80px !important;
}

/* ============================================
   MAKE SELECT2 DROPDOWNS FILL THEIR CELLS
   ============================================ */

#simpleproductcabledefault_set-group .select2-container,
#comtelcocabledetail_set-group .select2-container,
#simpleproductcabledefault_set-group .related-widget-wrapper,
#comtelcocabledetail_set-group .related-widget-wrapper {
    width: 100% !important;
    display: block !important;
}

#simpleproductcabledefault_set-group .select2-selection,
#comtelcocabledetail_set-group .select2-selection {
    width: 100% !important;
}
