body {
  margin: 0;
  /*padding: 0;*/
  font-family: 'Arial', sans-serif;
  background-color: #1e1e1e; /* Dark background */
  color: #e0e0e0;
  /*display: flex;*/
  justify-content: center;
  align-items: center;
  height: 100vh; /* Full height */ 
  /*height: 100%; */
  box-sizing: border-box;
  overflow: auto; /* Hide scrollbars */
}

/* Centering Flexbox only for the login page */
body.centered {
  display: flex; /* Flexbox for centering login box */
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Prevent scrolling */
}

/* Header styles (logo and logout button) */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #2e2e2e;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-sizing: border-box;
}

header img {
  margin-left: 20px;
  width: 100px;
}

/* Container for the search input */
.search-container {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 0px; /* Adjust margin based on your layout */
  gap: 10px;
}

/* Search input styling */
.search-box {
  width: 300px; /* Adjust width as needed */
  padding: 10px 40px 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  background-color: #2a2a2a; /* Dark background to match the theme */
  color: #fff;
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
}

.search-box::placeholder {
  color: #888; /* Light placeholder color */
}

.search-box:focus {
  background-color: #1e1e1e; /* Slightly darker on focus */
  outline: 2px solid #ff4c4c; /* Highlight border on focus */
}

/* Page counter styling */
.page-counter {
  font-size: 16px;
  color: #e0e0e0; /* Light text color to match the theme */
  background-color: #333; /* Dark background */
  padding: 10px 15px;
  border-radius: 5px;
  display: inline-block;
  margin-left: 10px;
  margin-right: 10px;
}

.search-container input:focus + .search-icon {
  color: #007bff; /* Change icon color on focus */
}

/* Button container for alignment */
.header-buttons {
  display: flex;
  gap: 10px; /* Spacing between buttons */
}

/* Logout and Settings buttons */
.add-button, .settings-button {
    background-color: #ff4c4c;
    color: white;
    border: none;
    padding: 10px 10px;
    cursor: pointer;
    border-radius: 5px;
  }

/* Logout and Settings buttons */
.logout-button, .settings-button {
  background-color: #ff4c4c;
  color: white;
  border: none;
  padding: 10px 10px;
  cursor: pointer;
  border-radius: 5px;
  width: 80px;
}

/* Logout and Settings buttons */
.save-button {
  background-color: #ff4c4c;
  color: white;
  border: none;
  padding: 10px 10px;
  cursor: pointer;
  border-radius: 5px;
  width: 105px;
  margin-top: 2px;
}

.pagination-button {
  background-color: #ff4c4c;
  color: white;
  border: none;
  padding: 0px 0px;
  cursor: pointer;
  border-radius: 5px;
  width: 40px;
}

.logout-button:hover, .settings-button:hover, .pagination-button:hover, .save-button:hover {
  background-color: #ff1f1f;
}

/* Settings button with a gear icon */
.settings-button {
  align-items: center;
}


/* Pagination container */
.pagination {
  display: flex;
  justify-content: center; /* Center the pagination */
  align-items: center;
  margin-top: 0px;
  gap: 10px; /* Space between the buttons */
}

.pagination-button:disabled {
  background-color: #777; /* Disabled state styling */
  cursor: not-allowed;
}

/* Main content styles */
.container {
  margin-top: 20px; /* Offset for fixed header */
  padding: calc(100vh - 80px);
  overflow-y: auto;
  padding: 20px;
  /*max-height: calc(100vh - 80px);*/
  box-sizing: border-box;
  overflow-x: hidden; /* Hide horizontal scrollbar */
}

input[type="text"] {
  width: 100%;
  padding: 12px 20px;
  margin-bottom: 0px;  /* Adjusted to remove space from the bottom of the painting modal */
  box-sizing: border-box;
  border: none;
  border-radius: 4px;
  background-color: #2A2A2A;
  color: #FFFFFF;
  font-size: 16px;
}

input[type="text"]::placeholder {
  color: #B0B0B0;
}

/* Table styles */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  background-color: #1e1e1e;
  color: #e0e0e0;
  box-sizing: border-box;
}

table th, table td {
  padding: 10px 15px;
  border: 1px solid #333;
  text-align: left;
  word-wrap: break-word;
  max-width: 400px;
  box-sizing: border-box;
}

table tr {
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

table tr:hover {
  background-color: #2a2a2a;
  transform: scale(1.02);
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
}

table thead tr:hover {
  background-color: #2e2e2e;
  transform: scale(1.00);
  box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
}

table thead tr {
  background-color: #2e2e2e;
}

table tbody tr:nth-child(odd) {
  background-color: #252525;
}

table tbody tr:nth-child(even) {
  background-color: #1e1e1e;
}

/* Pagination styles */
.pagination {
  margin: 20px 0;
  text-align: center;
}

.pagination button {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 10px 15px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 3px;
}

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

.pagination button.disabled {
  background-color: #777;
  cursor: not-allowed;
}

/* Container for the login box */
.login-container {
  background-color: #2e2e2e; /* Slightly lighter background for contrast */
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5); /* Subtle shadow for depth */
  width: 350px; /* Fixed width */
  text-align: center;
  
}

/* Logo styles */
.login-container img {
  width: 120px;
  margin-bottom: 20px;
}

/* Input field styles */
.login-container input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  background-color: #444;
  border: 1px solid #555;
  border-radius: 5px;
  color: #fff;
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
  transition: background-color 0.3s ease;
}

/* Input field focus effect */
.login-container input[type="text"]:focus {
  background-color: #555;
}

/* Login button styles */
.login-container button {
  width: 100%;
  padding: 10px;
  background-color: #ff4c4c;
  border: none;
  border-radius: 5px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Button hover effect */
.login-container button:hover {
  background-color: #ff1f1f;
}

.login-footer {
  margin-top: 20px;
  color: #777;
  font-size: 12px;
  text-align: center;
}

/* Style for sortable headers */
th.sortable {
  cursor: pointer;
  color: #ddd;
}

th.sortable:hover {
  color: #fff;
}

/* Indicator for sort direction */
th.sort-asc::after {
  content: " ▲"; /* Upward triangle */
}

th.sort-desc::after {
  content: " ▼"; /* Downward triangle */
}



/* Modal */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed position ensures it stays on the screen */
  z-index: 1000; /* High z-index to overlay above other elements */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  background-color: rgba(0, 0, 0, 0.8); /* Dark background with transparency */
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Prevents background content from being scrolled */
  animation: fadeIn 0.3s ease; /* Fade-in animation */
}

/* Modal content */
.modal-content {
  background-color: #2e2e2e;
  padding: 20px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 95%;
  display: flex;
  gap: 20px;
  box-sizing: border-box;
  overflow: auto;
  color: #e0e0e0;
}

/* Modal body with left (image) and right (attributes) sections 
.modal-body {
  display: flex;
  gap: 20px;
  width: 100%;
}
*/
/*
.modal-left {
  flex: 1;
  display: flex;
  justify-content: center;  /* Horizontally centers the image 
  align-items: flex-start;   /* Aligns the image to the top 
  height: 100%;              /* Ensures it takes the full height of the modal */

/*  
.modal-left {
  display: flex;
  flex-direction: column; /* Stack the image and chip vertically 
  align-items: center;    /* Center the image and chip horizontally 
  justify-content: flex-start; /* Align them at the top of the container 
}
*/

.modal-left img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
/*
.modal-right {
  flex: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Grid layout for the attributes 
.painting-details {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal-width columns 
  gap: 20px; /* Space between form fields 
  width: 100%;
}
*/

.modal-body {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: space-between; /* Ensure space between image and right columns */
}

.modal-left {
  flex: 0 0 25%; /* Fixed 30% width for the image container */
  display: flex;
  flex-direction: column; /* Stack the image and chip vertically */
  align-items: center;    /* Center the image and chip horizontally */
  justify-content: flex-start; /* Align them at the top of the container */
}

.modal-right {
  width: 75%; /* Ensure the right side takes up 60% of the modal */
  display: flex;
  flex-direction: column;
}

.painting-details {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal-width columns */
  gap: 20px; /* Space between form fields */
  width: 100%;
}

.painting-details .attribute {
  display: flex;
  flex-direction: column;
}

.painting-details label {
  margin-left: 2px;
  margin-top: 5px;
  color: #e0e0e0;
  font-size: 14px;
}

.painting-details input[type="text"],
.painting-details select,
.painting-details textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 5px;
  background-color: #1e1e1e;
  color: #e0e0e0;
  font-size: 16px;
  box-sizing: border-box;
}

.painting-details textarea {
  resize: vertical;
  min-height: 120px; /* Set minimum height for text area */
}

.painting-details select:focus,
.painting-details input[type="text"]:focus,
.painting-details textarea:focus {
  background-color: #2a2a2a;
  border: 1px solid #ff4c4c;
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #fff;
}

/* Make sure the modal content scrolls if it overflows */
.modal-content {
  overflow-y: auto;
}

@media (max-width: 768px) {
  .painting-details {
    grid-template-columns: 1fr; /* On smaller screens, switch to a single column */
  }
}

/* Fade-in effect */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Style the chip container */
.chip-container {
  margin-top: 10px;      /* Add space between the image and chip */
  text-align: center;    /* Center the chip horizontally */
  width: 100%;           /* Ensure the chip takes up the full width */
}

/* Basic chip styling */
.status-chip {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 25px;
  background-color: #757575; /* Green background for live */
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Chip appearance when status is off */
.status-chip.off {
  background-color: #dc3545; /* Red background for off */
  color: #fff;
}

/* Chip appearance when status is off */
.status-chip.on {
  background-color: #28a745; /* Red background for off */
  color: #fff;
}

/* Hover effect */
.status-chip:hover {
  opacity: 0.8; /* Slight transparency on hover */
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #dc3545;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999; /* Ensures it's on top */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

.rotate-button {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 10px 10px;
    font-size: 14px;
    background-color: #ff4c4c;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.rotate-button:hover {
    background-color: #ff1f1f;
}


.delete-button {
    margin-top: auto; /* Push the button to the bottom */
    margin-bottom: 20px;
    padding: 10px 15px;
    font-size: 14px;
    color: #fff;
    background-color: #d9534f; /* Bootstrap danger color */
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.delete-button:hover {
    background-color: #c9302c; /* Darker danger color */
}
