//                                      Copyright 2026 WebPros International, LLC
//                                                           All rights reserved.
// copyright@cpanel.net                                         http://cpanel.net
// This code is subject to the cPanel license. Unauthorized copying is prohibited.

.table-striped > tbody > tr.inline-form td {
    vertical-align: top;
}

html[dir="rtl"] .table-striped > tbody > tr.inline-form td {
    padding-right: 5px;
}

html[dir="ltr"] .table-striped > tbody > tr.inline-form td {
    padding-left: 5px;
}

html[dir="ltr"] .actions-column {
    padding-left: 22px !important; // marked important to override the inline-form setting above
}

html[dir="rtl"] .actions-column {
    padding-right: 22px !important;
}

.record_elements {
    display: table;
    width: 100%;
}

.record_element {
    display: table-row;
}

.record_subelement {
    display: table-cell;
}

html[dir="ltr"] .add-record-btn span.fas.fa-plus {
    padding-right: 5px;
}

html[dir="rtl"] .add-record-btn span.fas.fa-plus {
    padding-left: 5px;
}

.validation-row {
    min-height: 21px;
}

.table-form-label {
    display: none;
}

.key-name-editor-container,
.key-value-editor-container {
    width: 100%;
}

@media (max-width: 600px) {
    html[dir="ltr"] .responsive-table > tbody > tr > td.action-buttons .btn {
        padding-left: 0;
    }

    html[dir="rtl"] .responsive-table > tbody > tr > td.action-buttons .btn {
        padding-right: 0;
    }

    .responsive-table > tbody > tr > td.expand-panel-data:before {
        content: none;
    }

    .table-form-label {
        display: inline-block;
    }

    .record_elements,
    .record_element,
    .record_subelement {
        display: block;
    }
}

@media (min-width: 601px) {
    .key-name-editor-container,
    .key-value-editor-container {
        width: 300px;
    }
}

@media (min-width: 1200px) {
    .key-name-editor-container,
    .key-value-editor-container {
        width: 400px;
    }
}

/* ------------------------------------------------------------------------------ */
/* Override for modal dialog styles
/* ------------------------------------------------------------------------------ */
.modal-header {
    background-color: #333333;
    color: #ffffff;
    font-weight: 400;
    height: 40px;
    padding: 10px;
    text-overflow: ellipsis;
}

.modal-header h4 {
    margin: 0;
    padding: 0;
}

.modal-footer {
    height: 50px;
    padding: 10px;
}

html[dir="rtl"] .modal-footer {
    text-align: left;
}

.modal-dialog {
    margin-top: 70px;
    max-width: 500px;
}

.modal-body {
    padding: 10px;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
    word-wrap: break-word;
}

/* ------------------------------------------------------------------------------ */
/* Override for pagination form-group styles
/* ------------------------------------------------------------------------------ */
.page-size .form-group {
    margin-bottom: 0;
}

/* ------------------------------------------------------------------------------ */
/* Bootstrap RTL updates that we don't have yet
/* ------------------------------------------------------------------------------ */
html[dir="rtl"] .dropdown-menu-right {
    left: 0;
    right: auto;
}

html[dir="rtl"] .text-right.flip {
    text-align: left;
}

html[dir="rtl"] .text-left.flip {
    text-align: right;
}

html[dir="rtl"] .pull-right {
    float: left !important;
}

.table > tbody > tr > td.expand-panel-data {
    padding: 0;
    border: 0;
}

.ensure-in-progress {
    padding: 10px;
}

.ensure-in-progress .list-types {
    padding-bottom: 5px;
    overflow: hidden;

    html[dir="ltr"] & {
        margin-left: 15px;
    }
    html[dir="rtl"] & {
        margin-right: 15px;
    }
}

.ensure-in-progress .list-types code {
    white-space: normal;
}

.ensure-in-progress .list-types .message {
    font-style: italic;
}

.ensure-in-progress .list-types > label {
    html[dir="ltr"] & {
        padding-right: 10px;
    }
    html[dir="rtl"] & {
        padding-left: 10px;
    }
}

#toggle-all-help-link {
    cursor: pointer;
}

#add_app,
#application-details-description {
    max-width: 750px;
}

#add_app {
    .panel-heading {
        display: flex;
        justify-content: space-between;
    }

    .validation-container {
        margin-top: 3px;
    }
}

.btn-select-path {
    margin-bottom: 8px;
    cursor: pointer;
}

.btn-select-path[disabled],
.btn-select-path:disabled {
    cursor: default;
}

.directory-browser {
    min-height: 200px;
}

.directory-browser-breadcrumb {
    padding: 8px 10px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.directory-browser-path-label {
    color: #777;
    html[dir="ltr"] & {
        margin-right: 5px;
    }
    html[dir="rtl"] & {
        margin-left: 5px;
    }
}

.directory-browser-path-icon {
    color: #337ab7;
    html[dir="ltr"] & {
        margin-right: 3px;
    }
    html[dir="rtl"] & {
        margin-left: 3px;
    }
}

.directory-browser-path-value {
    font-weight: 600;
}

.directory-browser-loading {
    padding: 20px;
    text-align: center;
    color: #777;
}

.directory-browser-error {
    padding: 20px;
    text-align: center;
    color: #a94442;

    html[dir="ltr"] & {
        .fas {
            margin-right: 6px;
        }
    }
    html[dir="rtl"] & {
        .fas {
            margin-left: 6px;
        }
    }
}

.directory-browser-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.directory-browser-create-form {
    margin-bottom: 0;
}

.directory-browser-create-label {
    display: block;
    margin-bottom: 5px;
}

.directory-browser-create-error {
    padding-bottom: 10px;
    color: #a94442;

    html[dir="ltr"] & {
        text-align: left;

        .fas {
            margin-right: 6px;
        }
    }
    html[dir="rtl"] & {
        text-align: right;

        .fas {
            margin-left: 6px;
        }
    }
}

.directory-browser-item {
    display: flex;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.15s;

    &:last-child {
        border-bottom: none;
    }

    &:hover {
        background-color: #f0f0f0;
    }

    &.active {
        background-color: #337ab7;
        color: #fff;

        .directory-browser-item-select {
            color: #fff;
        }

        .directory-browser-item-arrow {
            color: #fff;
        }
    }
}

.directory-browser-item-home,
.directory-browser-item-parent {
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font-size: inherit;
    padding: 8px 12px;

    &:focus-visible {
        outline: 2px solid #337ab7;
        outline-offset: -2px;
    }
}

html[dir="rtl"] .directory-browser-item-home,
html[dir="rtl"] .directory-browser-item-parent {
    text-align: right;
}

.directory-browser-item-select {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: inherit;

    &:focus-visible {
        outline: 2px solid #337ab7;
        outline-offset: -2px;
    }
}

html[dir="rtl"] .directory-browser-item-select {
    text-align: right;
}

.directory-browser-item-icon {
    html[dir="ltr"] & {
        margin-right: 8px;
    }
    html[dir="rtl"] & {
        margin-left: 8px;
    }
    color: #f0ad4e;
    font-size: 16px;

    .directory-browser-item-home &,
    .directory-browser-item-parent & {
        color: #337ab7;
    }

    .directory-browser-item.active & {
        color: #fff;
    }
}

.directory-browser-item-arrow {
    html[dir="ltr"] & {
        margin-left: auto;
    }
    html[dir="rtl"] & {
        margin-right: auto;
    }
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    padding: 0 5px;
    cursor: pointer;
    line-height: inherit;

    &:hover {
        color: #337ab7;
    }

    &:focus-visible {
        outline: 2px solid #337ab7;
        outline-offset: 1px;
        border-radius: 2px;
    }
}
