/* General Body Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2 {
    margin-bottom: 20px;
    font-size: 36px;
    font-weight: bolder;
    color: #333;
}

/* Table Styling */
table {
    width: 80%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    table-layout: fixed; /* Ensures equal column width */
}

th, td {
    padding: 15px 20px;
    text-align: left;
    font-size: 16px;
    border-bottom: 1px solid #e0e0e0;
    width: 25%; /* Adjust to ensure all columns are the same width */
    word-wrap: break-word; /* Prevents text overflow */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap; /* Optional: Keeps text in one line */
}

th {
    background-color: #2a2a2d;
    color: #fff;
    letter-spacing: 0.05em;
    font-weight: bold;
}

tr:last-child td {
    border-bottom: none;
}

/* Styling for version and description */
.record td {
    vertical-align: top;
}

.version {
    font-weight: bold;
    color: #2a2a2d;
    margin-bottom: 5px;
}

.description {
    color: #777;
    font-size: 14px;
    white-space: normal; /* Allows text to wrap */
    word-wrap: break-word; /* Breaks long words if needed */
    overflow-wrap: break-word; /* Ensures wrapping works in all browsers */
}

/* Alternating Row Color */
tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Hover Effect */
tr:hover {
    background-color: #f0f4f8;
    transition: background-color 0.2s ease;
}

/* Action Buttons Styling */
.actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn.edit {
    background-color: #3498db;
    color: #fff;
}

.btn.edit:hover {
    background-color: #217dbb;
}

.btn.delete {
    background-color: #e74c3c;
    color: #fff;
}

.btn.delete:hover {
    background-color: #c0392b;
}

/* Create Button Styling */
.create-button-container {
    width: 80%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.btn.create {
    background-color: #4caf50;
    color: #fff;
}

.btn.create:hover {
    background-color: #45a049;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

/* Form Styling Inside Modal */
form label {
    display: block;
    margin: 10px 0 5px;
    font-weight: bold;
}

form input,
form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form textarea {
    resize: vertical;
    height: 60px;
}

.env-toggle {
    display: inline-flex;
    background: #f0f0f0;
    border-radius: 25px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.env-toggle input {
    display: none;
}

.env-toggle label {
    flex: 1;
    padding: 10px 20px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    color: #555;
    transition: background-color 0.3s, color 0.3s;
}

.env-toggle input:checked + label {
    background-color: #4caf50;
    color: #fff;
}

/* Read More Link */
.read-more {
    color: #3498db;
    cursor: pointer;
    font-weight: bold;
    margin-left: 5px;
    text-decoration: underline;
}

/* Modal Styling */
#fullTextModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

#fullTextModal .modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 60%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

#fullTextModal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #555;
    cursor: pointer;
}

#fullTextModal h2 {
    margin-top: 0;
}

#fullTextModal p {
    white-space: pre-wrap;
    color: #333;
}
