/* General Body Styling */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f7f6;
  color: #333;
  line-height: 1.6;
}

/* Header Styling */
header {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 2.5em;
}

header p {
  margin-top: 5px;
  font-size: 1.1em;
  opacity: 0.9;
}

/* Main Content Area */
main {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Global Actions Section */
.global-actions {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  text-align: center;
}

.global-actions h2 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.8em;
}

/* Form Grid Layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

/* Individual Input Block Styling */
.input-block {
  background-color: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-in-out;
}

.input-block:hover {
  transform: translateY(-5px);
}

.input-block label {
  font-weight: bold;
  margin-bottom: 10px;
  color: #34495e;
  font-size: 1.1em;
}

/* Date Inputs Specific Styling */
.date-inputs {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.date-inputs label {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-weight: normal; /* Override bold for inner labels */
  font-size: 0.95em;
  color: #555;
}

.date-inputs input[type="date"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-top: 5px;
  box-sizing: border-box; /* Include padding in width */
}

/* Textarea Styling */
textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95em;
  min-height: 120px;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

textarea:focus {
  border-color: #3498db;
  outline: none;
}

/* Button Group Styling */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: auto; /* Push buttons to the bottom */
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Button Base Styling */
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.1s ease;
  flex-grow: 1; /* Allow buttons to grow */
  min-width: 100px; /* Minimum width for buttons */
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Button Color Variations */
.btn.primary {
  background-color: #3498db;
  color: white;
}

.btn.primary:hover {
  background-color: #2980b9;
}

.btn.danger {
  background-color: #e74c3c;
  color: white;
}

.btn.danger:hover {
  background-color: #c0392b;
}

.btn.gray {
  background-color: #95a5a6;
  color: white;
}

.btn.gray:hover {
  background-color: #7f8c8d;
}

/* Output Box Styling */
.output-box {
  background-color: #ecf0f1;
  border: 1px solid #bdc3c7;
  padding: 15px;
  margin-top: 20px;
  border-radius: 6px;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.9em;
  white-space: pre-wrap; /* Preserve whitespace and wrap text */
  word-wrap: break-word; /* Break long words */
  display: none; /* Hidden by default */
  color: #2c3e50;
}

.output-box.error {
  background-color: #fdeded;
  border-color: #e74c3c;
  color: #c0392b;
}

.output-box.warning {
  background-color: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  background-color: #34495e;
  color: #ecf0f1;
  font-size: 0.9em;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr; /* Single column on smaller screens */
  }

  .btn {
    flex-grow: unset; /* Remove flex-grow for better stacking */
    width: 100%; /* Full width buttons */
  }

  .button-group {
    flex-direction: column; /* Stack buttons vertically */
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8em;
  }

  .global-actions h2 {
    font-size: 1.5em;
  }

  .input-block {
    padding: 20px;
  }
}
