/* Reset some default styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General styles */
html, body {
    height: 100%; /* Ensure the body fills the viewport */
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    margin: 0;
}

/* Layout styles */
body {
    display: flex;
    flex-direction: column; /* Makes footer stay at bottom for short pages */
    min-height: 100%;
}

/* Main content container */
.container {
    flex: 1; /* Pushes the footer down for short pages */
    width: 80%;
    margin: auto;
    padding-bottom: 20px; /* Adds space between content and footer */
}

/* Header styling */
h2 {
    color: #333;
    margin: 1rem 0;
    text-align: center;
}

/* Table styling */
table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #333;
    color: #fff;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Ensure form has no padding or margin */
form {
    display: inline;  /* Prevent form from affecting layout */
    padding: 0;
    margin: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

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

a {
    color: #333;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Flash message styling */
ul {
    list-style-type: none;
    margin: 1rem 0;
    padding: 0;
}

.success {
    color: green;
}

.danger {
    color: red;
}

.info {
    color: blue;
}

/* Action button styling for Edit and Delete buttons */
.action-button {
    padding: 5px 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0;             /* Remove margin to avoid extra spacing */
    display: inline-block;  /* Ensure they stay inline within the cell */
    vertical-align: middle; /* Align button within the row */
    text-decoration: none;  /* Remove any underline */
}

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

/* Specific styling for Delete button */
.delete-button {
    background-color: #c0392b; /* Red color for delete */
}

.delete-button:hover {
    background-color: #e74c3c;
}

/* Green Add Show button */
.add-button {
    background-color: #28a745; /* Green color */
}

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


/* Container to center and constrain form width */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;          /* Center form vertically */
}

/* Centered form styling */
.show-form {
    width: 100%;               /* Allow form to fit within container width */
    max-width: 500px;          /* Constrain to 500px max */
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Ensure labels and fields are aligned properly */
.show-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.show-form input[type="text"],
.show-form input[type="password"],
.show-form input[type="time"],
.show-form input[type="datetime-local"],
.show-form input[type="number"],
.show-form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Styling for the submit button */
.show-form button {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.show-form button:hover {
    background-color: #555;
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: flex-end;
    background-color: #333;
    padding: 7px;
}

.nav-button {
    color: white;
    text-decoration: none;
    padding: 7px 12px;
    margin-right: 7px;
    font-weight: bold;
    background-color: #444;
    border-radius: 4px;
}

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

/* Footer styling */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    width: 100%;
    margin-top: 20px; /* Adds spacing above the footer */
}
