/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    box-sizing: border-box;
    line-height: 1.6;
}

head {
    font-family: Arial, sans-serif;
}

.custom-font {
    font-family: "Arial", sans-serif;
}

h1, h2, h3 {
    color: #333;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Button styles */
.btn,
button {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    border-radius: 0.25rem;
}

button {
    background-color: #007A35;
    color: white;
    padding: 6px 10px;
    border: none;
    font-size: 1rem;
}

button:hover {
    background-color: #0F612F;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-md {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
}

.btn-custom {
    background-color: #007A35;
    border-color: #007A35;
    color: white;
}

.btn-custom:hover {
    background-color: #0D5228;
    border-color: #0D5228;
    color: white;
}

.btn-outline-custom {
    color: #007A35 !important;
    border-color: #007A35 !important;
    background-color: transparent !important;
}

.btn-outline-custom:hover {
    color: white !important;
    background-color: #0F612F !important;
    border-color: #0F612F !important;
}

.custom-small-btn {
    font-size: 0.75rem;
    padding: 0.1rem 0.2rem;
}

.custom-light-grey {
    background-color: #e0e0e0;
    border-color: #d0d0d0;
    color: #333;
}

.custom-light-grey:hover {
    background-color: #d0d0d0;
    border-color: #c0c0c0;
    color: #333;
}

.cancel-btn {
    background-color: #f44336;
    border-color: #f44336;
    color: white;
}

.cancel-btn:hover {
    background-color: #d32f2f;
    border-color: #d32f2f;
    color: white;
}

/* Form styles */
.form-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.form-control {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

textarea.form-control {
    font-family: Arial, sans-serif;
    font-size: 16px;
}

/* Admin Tables */
/* Admin Table Styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem auto;
    font-family: Arial, sans-serif;
    table-layout: auto;
    overflow-x: auto;
}

/* Header Styling */
.admin-table th {
    background-color: #f2f2f2;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    padding: 10px;
    border: 1px solid #ddd;
}

/* Cell Styling */
.admin-table td {
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 15px;
    color: #333;
    vertical-align: top;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 200px;
}

/* Optional Wrap Class */
.admin-table td.wrap {
    white-space: normal;
    word-wrap: break-word;
}

/* Zebra Striping */
.admin-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Responsive Tables */
@media screen and (max-width: 768px) {
    .admin-table {
        font-size: 14px;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table, 
    .admin-table tbody, 
    .admin-table tr, 
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table tr {
        margin-bottom: 1rem;
        border-bottom: 2px solid #ccc;
    }

    .admin-table td {
        white-space: normal;
        text-align: right;
        position: relative;
        padding-left: 50%;
    }

    .admin-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
}

/* Action Buttons */
.admin-edit-btn,
.admin-delete-btn {
    font-size: 14px;
    padding: 4px 8px;
    margin-right: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    border-radius: 4px;
}

.admin-edit-btn {
    background-color: #4CAF50;
    color: white;
}

.admin-delete-btn {
    background-color: #f44336;
    color: white;
}


.column-status { width: 120px; max-height: 100px; }
.column-edit { width: 50px; max-height: 100px; }
.column-atamis { max-height: 100px; }
.column-very-very-small { width: 40px; max-height: 100px; }
.column-very-small { width: 80px; max-height: 100px; }
.column-small { max-height: 100px; }
.column-medium { max-height: 100px; }
.column-large { width: 220px; max-height: 100px; }
.column-very-large { max-height: 100px; }

.column-small button {
    background: none;
    border: none;
    padding: 0;
}

td div.scrolling-cell {
    overflow: auto;
    max-height: 120px;
    min-width: 250px;
}

.transparent-background {
    background: none;
    display: block;
}

.module-row-edit-button {
    font-family: Arial, sans-serif;
    background: none;
    border: none;
    padding: 0;
}

.module-row-edit-button:hover {
    background: #D7D7D9;
}

table.dataTable.dtr-inline.collapsed tr {
    border-bottom: 0.5px solid #eeecec;
}

table.dataTable thead th {
    background-color: #D7D7D9 !important;
}

.dt-button { margin-right: 5px !important; }
#reset-col-order { margin-left: 10px; }

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Responsive Tables */
@media screen and (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
    }

    td {
        border: none;
        position: relative;
        padding-left: 50%;
    }

    td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        content: attr(data-label);
        font-weight: bold;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }
}

/* Variable list */
.variable-list {
    background-color: #f5f5f5;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border-left: 4px solid #007A35;
}

.variable-list code {
    background-color: #e0e0e0;
    padding: 2px 4px;
    border-radius: 3px;
    margin-right: 5px;
}

/* Tab styles */
.tab {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.tab button {
    background-color: #f8f9fa;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: -1px;
    border-bottom: 1px solid #dee2e6;
}

.tab button:hover {
    background-color: #e9ecef;
}

.tab button.active {
    background-color: #007A35;
    color: white;
    border-color: #007A35;
    border-bottom-color: transparent;
}

.tabcontent {
    display: none;
    padding: 1rem 0;
}

/* Layout */
.actions-container {
    margin: 1.25rem 0;
}

.global-settings {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.global-settings h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #495057;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* Responsive Form */
@media screen and (max-width: 768px) {
    .form-row .form-group {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media screen and (min-width: 769px) {
    .form-row .form-group {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 15px;
        box-sizing: border-box;
    }
}

/* Status Indicators */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.bg-success {
    background-color: #28a745;
    color: white;
}

.bg-warning {
    background-color: #ffc107;
    color: #212529;
}

/* Additional Styles */
.custom-input-height {
    min-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.bold-group label.bold-label,
.bold-group input.bold-input,
.bold-label {
    font-weight: bold;
}

.checkbox-green,
.checkbox-amber,
.checkbox-red {
    display: inline-block;
    width: 25px;
    height: 25px;
    margin-right: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    vertical-align: middle;
}

.checkbox-green { background-color: #5a9f6c; }
.checkbox-amber { background-color: #d7962e; }
.checkbox-red { background-color: #f26e5f; }

input[type="radio"]:checked + label .checkbox-green,
input[type="radio"]:checked + label .checkbox-amber,
input[type="radio"]:checked + label .checkbox-red {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='white' class='bi bi-check' viewBox='0 0 16 16'><path d='M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}

.half-break {
    height: 0.5em;
}

.tag-input {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ccc;
    padding: 5px;
    margin-bottom: 10px;
}

.tag {
    background-color: #f0f0f0;
    border-radius: 3px;
    padding: 2px 5px;
    margin: 2px;
}

.tag-input input {
    border: none;
    outline: none;
    flex-grow: 1;
}

.nav-item-spacing {
    margin-top: 6px;
    margin-right: 10px;
}

.custom-font-size {
    font-size: 40px;
}

.custom-font-size-p {
    font-size: 18px;
}

h3.custom-font-size {
    position: relative;
}

h3.custom-font-size::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background-color: #007A35;
    position: absolute;
    bottom: -10px;
    left: 0;
}
