/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    padding: 0 20px;
    margin: 0;
}

header {
    background-color: #01adb9;
    color: white;
    padding: 10px 0;
    text-align: center;
}

h1, h2, h3 {
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

/* Main Layout */
main {
    max-width: 110%;
    margin: 15px auto;
    padding: 15px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Table Container */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Enables horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for touch devices */
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed; /* Change to auto to allow content to resize properly */
}

th, td {
    min-width: 350px;
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
    white-space: normal; /* Prevent wrapping */
    word-wrap: break-word;
    overflow: hidden; /* Prevent content overflow */
    text-overflow: ellipsis; /* Show ellipsis for overflowing text */
}

/* Tooltip for Long Text */
/*td[data-full-text]:hover::after {
    content: attr(data-full-text); 
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    white-space: normal;
    z-index: 10;
    max-width: 300px;
    word-wrap: break-word;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}*/

/* Mobile View Fix */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto; /* Allow horizontal scrolling */
    }
    
    table, thead, tbody, th, td, tr {
        display: block; /* Stack rows vertically */
    }
    
    thead tr {
        display: none; /* Hide table headers */
    }
    
    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }
    
    td {
        border: none;
        border-bottom: 1px solid #ddd;
        position: relative;
        padding-left: 50%;
        text-align: left;
        white-space: normal; /* Allow wrapping */
    }
    
    td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 10px);
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }
}

/* Tablet-Specific Styles */
@media (min-width: 769px) and (max-width: 1240px) {
    .table-responsive {
        overflow-x: auto;
    }

    table {
        width: 100%;
        table-layout: fixed; /* Fix width to manage layout */
    }

    th, td {
        padding: 10px;
        white-space: normal; /* Allow wrapping */
    }

    th, td:nth-child(1) {
        width: 10%;
    }

    th, td:nth-child(2),
    th, td:nth-child(3),
    th, td:nth-child(4),
    th, td:nth-child(5) {
        width: 15%;
    }

    th, td:nth-child(10),
    th, td:nth-child(11) {
        width: 10%;
    }

    th, td:nth-child(6),
    th, td:nth-child(7),
    th, td:nth-child(8),
    th, td:nth-child(9) {
        width: 15%;
    }
}

/* Form Styles */
form {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: #e51e71;
}

/* Edit Button Styles */
.edit-button {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.edit-button:hover {
    background-color: #0056b3;
}

.edit-button.disabled {
    background-color: #ccc;
    color: #777;
    cursor: not-allowed;
    pointer-events: none; /* Disable the link */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
}
