/*
 Theme Name:   RMI
 Theme URI:    https://rmi.emcorp-group.com
 Description:  Divi Child Theme for RMI – Emcorp Group
 Author:       Aussie Web & IT Solutions
 Author URI:   https://aussieit.net.au
 Template:     Divi
 Version:      2.0.1
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  rmi
*/

/* =====================================================================
   LIST MARKERS
   ===================================================================== */

ul li::marker {
    content: ' ';
}

/* =====================================================================
   TABLE STYLING
   ===================================================================== */

table thead th {
    background-color: #2b3990;
    color: #ffffff;
}

table tbody tr:nth-child(odd) {
    background-color: #e9ecef;
}

table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

table.dataTable tbody tr td {
    color: #212529;
}

table.dataTable tbody tr td:hover {
    color: #007bff;
}

table.dataTable tbody tr.selected td {
    background-color: #007bff !important;
    color: white !important;
}

/* Hide default DataTable sorting icons */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before {
    content: "";
}

/* =====================================================================
   BUTTON STYLING
   ===================================================================== */

.btn-outline-danger.btn-sm:hover,
.btn-outline-info.btn-sm:hover {
    color: white !important;
}

.btn-outline-danger.btn-sm:hover a,
.btn-outline-info.btn-sm:hover a {
    color: white !important;
}

/* =====================================================================
   DATATABLES – BUTTONS
   ===================================================================== */

.dt-buttons .btn {
    margin: 2px;
}

.dt-buttons .btn-outline-primary {
    background-color: white;
    border-color: #007bff;
    color: #007bff;
}

.dt-buttons .btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
}

/* =====================================================================
   DATATABLES – PAGINATION
   ===================================================================== */

.dataTables_wrapper .dataTables_paginate {
    margin-top: 20px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: transparent !important;
    color: #007bff !important;
    border: 1px solid #007bff !important;
    padding: 3px 8px !important;
    margin: 2px !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    font-size: 0.75rem !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.previous:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.next:hover {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:focus {
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button a {
    display: inline-block;
    background: none !important;
    border: none !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
    box-shadow: none !important;
}

/* =====================================================================
   DATATABLES – LENGTH MENU
   ===================================================================== */

.dataTables_length select {
    width: auto !important;
    min-width: 30px;
    display: inline-block;
    padding: 5px;
    margin: 0 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
}

/* =====================================================================
   FORMS
   ===================================================================== */

.form-group {
    flex: 1;
    margin-right: 10px;
}

.form-group:last-child {
    margin-right: 0;
}

#site-creation-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#site-creation-form .form-group {
    display: flex;
    align-items: center;
    width: 100%;
}

#site-creation-form label {
    flex: 0 0 100px;
}

#site-creation-form input[type="text"] {
    width: 300px;
    margin-right: 10px;
}

#site-creation-form button[type="submit"] {
    margin-left: auto;
}

/* =====================================================================
   ROLES
   ===================================================================== */

.roles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.role-column {
    flex: 1 1 22%;
    min-width: 150px;
}

.role-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.role-item input[type="checkbox"] {
    margin: 0;
}

.role-item label {
    margin-left: 5px;
}

.submit-row {
    width: 100%;
    text-align: right;
}

/* =====================================================================
   STATUS MESSAGES
   ===================================================================== */

.success-message {
    color: green;
    font-weight: bold;
}

.error-message {
    color: red;
    font-weight: bold;
}

/* =====================================================================
   TRASH-SESSION MODAL
   ===================================================================== */

.trash-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trash-modal-content {
    background: #fff;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.download-block {
    margin-bottom: 20px;
    padding: 10px 0;
}

.download-block h4 {
    margin: 0 0 5px;
}

.download-block button {
    margin-right: 10px;
}

/* =====================================================================
   DIVI MENU – AUTO-WIDTH DROPDOWNS
   ===================================================================== */

@media only screen and (min-width: 981px) {
    .nav li ul {
        width: fit-content;
        display: flex;
        flex-direction: column;
    }

    .nav li li {
        white-space: nowrap;
    }

    .nav li li a {
        width: auto !important;
    }
}
