/* General body and container styles */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Input styles for all input fields */
input[type="password"], input[type="text"], input[type="number"], input, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px; /* Ensures at least 16px font size to prevent zoom on iOS */
}

/* Submit button and general button styles */
input[type="submit"], button.search, button.logout, button.action {
    padding: 8px 16px; /* Reduced padding for smaller buttons */
    font-size: 16px;   /* Match input field text size */
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    width: auto;
    margin-bottom: 10px;
}

/* Hover effects for buttons */
input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Flexbox layout for Search and Logout buttons */
.button-container {
    display: flex;
    gap: 10px; /* Space between buttons */
}

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

button.logout:hover {
    background-color: #c82333;
}

/* Specific button colors */
button.search {
    background-color: #007bff; /* Blue for Search button */
}

button.logout {
    background-color: #dc3545; /* Red for Logout button */
}

/* Layout for items and buttons */
.item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f7f7f7;
}

/* Code block styling */
pre {
    background-color: #f7f7f7;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Responsive input fields */
@media (max-width: 600px) {
    input[type="text"], input[type="number"], input, select {
        width: 100%;
    }
}

/* Buttons stacking vertically */
.stacked-buttons {
    display: flex;
    gap: 10px; /* Space between buttons */
}

.stacked-buttons button {
    display: block;
    width: 52px; /* Fixed width for buttons */
    height: 35px; /* Fixed height for buttons */
    margin-bottom: 10px;
}

button.action {
    background-color: #28a745; /* Green for action buttons */
}

button.action:hover {
    background-color: #218838;
}

/* Additional style for disabled buttons */
button:disabled {
    background-color: #ccc; /* Grey color for disabled state */
    cursor: not-allowed; /* Not allowed cursor */
}

/* Ensure hover does not affect disabled buttons */
button:disabled:hover {
    background-color: #ccc; /* Keep the grey color on hover */
}

/* Basic styles for table */
.table-list {
    width: 100%;
    border-collapse: collapse;
}

.table-list th, .table-list td {
    border: 1px solid #ddd;
    padding: 8px;
    word-wrap: break-word; /* Breaks long words at appropriate points */
    word-break: break-all; /* Forces breaks if necessary */
    overflow: hidden;
    white-space: normal; /* Allow wrapping within table cells */
}

/* Specific style for the size column to minimize space */
.table-list td.size {
    white-space: nowrap; /* Prevent wrapping for size column */
    width: 1%; /* Force the column to take minimal space */
}

.table-list th {
    background-color: #f4f4f4;
}

.table-list tr {
    cursor: default; /* Default cursor for rows */
}

.details {
    display: none;
    padding: 10px;
    background-color: #f9f9f9;
    white-space: normal; /* Allow wrapping inside the details section */
}

.details ul {
    list-style-type: disc; /* Ensure bullet points are shown */
    padding-left: 20px; /* Indent list items */
    margin: 0;
}

.details li {
    margin-bottom: 8px;
}

/* Ensure the table stays responsive */
@media (max-width: 800px) {
    .table-list th, .table-list td {
        font-size: 14px; /* Reduce font size for smaller screens */
        max-width: 150px; /* Adjust max-width for smaller screens */
    }
}
