/* Table */
#tabular3-table tbody tr:nth-child(even),
.dtr-details li:nth-child(even) {
    background-color: #f3f3f0;
}
#tabular3-table tbody tr:nth-child(odd),
.dtr-details li:nth-child(odd)   {
    background-color: #f9f9f9;
}
#tabular3-table tbody tr:nth-child(even):hover,
.dtr-details li:nth-child(even):hover  {
    background-color: #fbfbfc;
}
#tabular3-table tbody tr:nth-child(odd):hover,
.dtr-details li:nth-child(odd) {
    background-color: #ffffff;
}

#tabular3-table tbody tr {
  border-top: 1px solid #cccccc66;
}

#tabular3-table tbody td {
    max-height: 240px;
    overflow-y: auto;
    min-height: 32px !important;
    padding: 4px 6px 4px 6px;
    vertical-align: top;    
    -webkit-line-clamp: 5; /* Number of lines to show */
}

#tabular3-table tbody td.wysiwyg {
    display: block;
    max-height: 232px;
    overflow-y: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.media_uploader {
    width: 100%;
}

.media_uploader button {
    text-align: right;
    float: right;
    margin: 16px;
}

.featured_image input.form-control,
.media_upload input.form-control,
.media_list input.form-control {
    display: none;
}

/*
#tabular3-table tbody td.wysiwyg::after {
  content: "...";
}
*/

/* Tabular Admin */
.tabular3-fields-list label {
    min-width: 240px;
    max-width: calc(24% - 16px);   
    display: inline-block;
    margin-right: 8px;
    padding-right: 8px;
}

.tabular3-fields-list label label {
    min-width: 72px;
    max-width: 128px;
    display: inline-block;
    margin-right: 0px;
    padding-right: 8px;
}

/* settings */

.tabular3-fields-list strong {
  width: 128px !important;
  display: inline-block;
  color: white;
  background-color: #655;
  padding: 4px;
  margin-right: 12px;
}

li.tabular3-field-item label {
  display: inline;
  width: 360px; 
  margin-right: 24px;
  vertical-align: top !important;
}

li.tabular3-field-item label span {
    max-width: 128px;   
    display: inline;
    margin-bottom: 8px;
    font-weight: 600;
}

li.tabular3-field-item .conditional-settings {
    display: block;
    width: 420px;
    vertical-align: top !important;
    margin-left: calc(100% - 426px);
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem; /* Optional spacing between sections */
}

.conditional-section {
    margin-top: 12px;
    max-width: 600px;
    margin-bottom: 12px;    
}

.conditional-section label {
    width: initial !important;
}

li.tabular3-field-item .conditional-settings div {
  display: inline;
  vertical-align: top !important;
}

.tabular3-field-item {
  width: fit-content;
}


/* Media upload field styles */
.media-upload-wrapper, 
.featured-image-wrapper {
    position: relative;
    padding: 10px 0;
}

.media-preview, 
.featured-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.media-item, 
.featured-image-item {
    position: relative;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 3px;
    background: #f9f9f9;
}

.remove-media, 
.remove-featured-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.media-count {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 11px;
    position: absolute;
    bottom: 5px;
    right: 5px;
}

/* DataTables Editor field type styles */
.DTE_Field_Type_media_upload .media-upload-wrapper,
.DTE_Field_Type_featured_image .featured-image-wrapper {
    margin-top: 10px;
}

.DTE_Field_Type_media_upload .media-upload-btn,
.DTE_Field_Type_featured_image .featured-image-btn {
    margin-bottom: 10px;
}

.DTE_Field_Type_media_upload .media-preview,
.DTE_Field_Type_featured_image .featured-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.DTE_Field_Type_media_upload .media-item,
.DTE_Field_Type_featured_image .featured-image-item {
    position: relative;
    border: 1px solid #ddd;
    padding: 3px;
    border-radius: 3px;
}

.DTE_Field_Type_media_upload .remove-media,
.DTE_Field_Type_featured_image .remove-featured-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
}

div.DTE.DTE_Action_Edit.modal-content div.DTE_Footer.modal-footer {
    display: initial !important;
}
    
    