/* File: ./public/stylesheets/styles.css */

/* sytles.css */
/* Stylesheet for the views */

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

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

/* Header Styling */
header {
  background: #4CAF50; /* Green background */
  color: white;
  padding: 10px; /* Reduced padding */
  text-align: center;
}

header h1 {
  font-size: 2em; /* Reduced font size */
}

/* Navigation Bar */
nav {
  margin: 10px 0; /* Reduced margin */
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px; /* Add spacing between items */
}

nav ul li {
  margin: 0;
}

nav ul li a {
  text-decoration: none;
  color: white; /* White text */
  font-weight: bold;
  padding: 5px 10px; /* Reduced padding */
  border-radius: 3px;
}

nav ul li a:hover {
  background-color: #45a049; /* Slightly darker green on hover */
}

/* Section Styling */
section {
  margin: 20px 0;
  padding: 20px;
  background: white;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

section h2 {
  margin-bottom: 15px;
  color: #4CAF50;
}

/* Links Styling */
a {
  color: #4CAF50;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Footer Styling */
footer {
  margin-top: 20px;
  text-align: center;
  color: #777;
  font-size: 0.9em;
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0; /* Add margin to the table */
  background-color: white; /* Background color for the table */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Shadow for the table */
  border-radius: 5px; /* Rounded corners */
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
}

td {
  color: #333;
}

tr:hover {
  background-color: #f9f9f9;
}

/* Common Table Styling */
.table-consistent {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

.table-consistent th, .table-consistent td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.table-consistent th {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
}

.table-consistent td {
  color: #333;
}

.table-consistent tr:hover {
  background-color: #f9f9f9;
}

/* Smaller Checkbox Styling */
.small-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}

/* Adjust column width */
.table-consistent th, .table-consistent td {
  width: auto;
  text-align: center;
}

.table-consistent th.box-number, .table-consistent td.box-number {
  width: 10%;
}

.table-consistent th.color, .table-consistent td.color {
  width: 15%;
}

.table-consistent th.type, .table-consistent td.type {
  width: 15%;
}

.table-consistent th.status, .table-consistent td.status {
  width: 15%;
}

.table-consistent th.phone-number, .table-consistent td.phone-number {
  width: 20%;
}

.table-consistent th.mark-returned, .table-consistent td.mark-returned {
  width: 10%;
}

.table-consistent th.actions, .table-consistent td.actions {
  width: 15%;
}

/* Specific styles for the table in the else block of course-discs.pug */
.table-consistent tbody#discList tr td {
  padding: 15px 20px; /* Increase padding for better spacing */
  text-align: center; /* Center-align text for uniformity */
}

.table-consistent tbody#discList tr td:nth-child(1) { /* Box Number */
  width: 12%;
}

.table-consistent tbody#discList tr td:nth-child(2) { /* Phone Number */
  width: 22%; /* Increase width for longer phone numbers */
}

.table-consistent tbody#discList tr td:nth-child(3) { /* Color */
  width: 18%;
}

.table-consistent tbody#discList tr td:nth-child(4) { /* Type */
  width: 18%;
}

.table-consistent tbody#discList tr td:nth-child(5) { /* Status */
  width: 18%;
}

.table-consistent tbody#discList tr td:nth-child(6) { /* Actions */
  width: 12%;
}


/* Responsive Design */
@media (max-width: 768px) {
  table, th, td {
    display: block;
    width: 100%;
  }

  th, td {
    text-align: right;
  }

  th {
    display: none;
  }

  td {
    text-align: left;
    padding-left: 50%;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    padding-left: 15px;
    font-weight: bold;
    text-transform: uppercase;
  }
}

/* Status-Based Colors */
tr.lost {
  background-color: #f8d7da; /* Light red */
  color: #721c24;           /* Dark red text */
}

tr.returned {
  background-color: #d4edda; /* Light green */
  color: #155724;           /* Dark green text */
}

tr.sold {
  background-color: #d1ecf1; /* Light blue */
  color: #0c5460;           /* Dark blue text */
}

/* Optional: Hover effect for clarity */
tr:hover {
  opacity: 0.9;
}

/* Button Groups */
.course-actions, .disc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.course-actions button, .disc-actions button {
  flex: 1 1 auto;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.course-actions button:hover, .disc-actions button:hover {
  background-color: #45a049;
}

/* Box Number Input Styling */
.box-number-input {
  width: 60px; /* Adjust width as needed */
  padding: 5px;
  text-align: center;
}

/* Captcha Styling */
.small-captcha {
  transform: scale(0.9);
  transform-origin: 0 0;
}

/* Dropdown Menu Styling */
ul.dropdown {
  display: none;
  position: absolute;
  background-color: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

ul.dropdown li {
  display: block;
}

ul.dropdown li a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: black;
}

ul.dropdown li a:hover {
  background-color: #ddd;
}

ul.dropdown.hidden {
  display: none;
}

ul.dropdown.visible {
  display: block;
}


