/* Basic styling - can be expanded or replaced with a CSS framework */
body {
  font-family: "Segoe UI", "Microsoft JhengHei", Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding-top: 2rem;
}

.container {
  background: #fff;
  width: 450px; /* Increased width for better layout */
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.navbar {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 0.75rem 2rem;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 2px;
}

.nav-link {
  font-size: 1.1rem;
  margin-right: 1.5rem;
}

.main-content {
  max-width: 61.8vw; /* Golden ratio of viewport width */
  width: 100%;
  margin: 2.5rem auto 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  padding: 2.5rem 2.5rem 2rem 2.5rem;
}

.footer {
  margin-top: 3rem;
  padding: 1.5rem 0 0.5rem 0;
  color: #888;
  font-size: 1rem;
  text-align: right;
}


.hidden {
  display: none;
}

.description {
  text-align: left;
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #222;
  background: #e9eaeb;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 8px rgba(60, 72, 88, 0.06);
  transition: box-shadow 0.2s, background 0.2s;
}

textarea.form-control,
input[type="text"].form-control,
input[type="tel"].form-control,
input[type="email"].form-control {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box; /* Added for consistent sizing */
}

.preview {
  margin: 1rem 0;
  padding: 0.5rem;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 4px;
  min-height: 60px;
  font-size: 0.95rem;
  word-break: break-all; /* Prevent long ISBNs from breaking layout */
}

.preview span {
  display: block;
}

.invalid {
  text-decoration: line-through;
  color: #d00;
}

.info {
  text-align: center;
  margin-bottom: 1rem;
  color: #555;
  white-space: pre-line;
}

.formats {
  margin-bottom: 1rem;
}

.formats p {
  margin: 0.5rem 0;
  font-weight: bold;
}

.formats .form-check {
  margin-bottom: 0.3rem;
}

.formats input[type="text"].form-control {
  margin-top: 0.3rem;
  /* width: calc(100% - 0.6rem); */ /* Adjusted for Bootstrap form-control */
}

.buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem; /* Spacing between buttons */
  margin-top: 1.5rem; /* Added margin for better separation */
}

.buttons .btn,
.buttons a.btn {
  flex: 1;
  /* Padding and font-size are handled by Bootstrap .btn class */
}

.form-group {
  margin-bottom: 1rem; /* Spacing for form groups */
}

.text-danger {
  font-size: 0.875em; /* Smaller font for validation messages */
}

/* Language dropdown styling */
.dropdown-item-form {
    margin: 0;
    padding: 0;
}

.dropdown-item-form button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.375rem 1rem;
    color: #212529;
    text-decoration: none;
    display: block;
    clear: both;
    font-weight: 400;
    white-space: nowrap;
    border-radius: 0;
}

.dropdown-item-form button:hover {
    background-color: #e9ecef;
    color: #16181b;
}

.flag-icon {
    vertical-align: middle;
}

@media (max-width: 768px) {
  .main-content {
    max-width: 95vw; /* Use more screen space on mobile */
    padding: 1.2rem 0.5rem;
  }
  .navbar {
    padding: 0.5rem 1rem;
  }
}

/* Order Management Specific Styles */
.order-card {
  transition: transform 0.2s ease-in-out;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.status-badge {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
}

.flag-icon {
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-group .btn {
  border-radius: 0.375rem;
}

.table th {
  font-weight: 600;
  color: #495057;
  border-bottom-width: 2px;
}

.dropdown-item-form {
  margin: 0;
  padding: 0;
}

.dropdown-item-form button {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0.375rem 1rem;
}

.dropdown-item-form button:hover {
  background-color: #f8f9fa;
}

/* Alert animations */
.alert {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
