/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.form-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .form-container {
    padding: 1.5rem;
  }
}

.form-group {
  margin-bottom: 15px;
}

.form-field {
  margin-bottom: 10px;
}

.form-field label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.text-area, .text-field {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.submit-button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
}

.submit-button:hover {
  background-color: #45a049;
}

/* Links styling to match form */
.form-container a {
  color: #4CAF50;
  text-decoration: none;
  text-align: center;
  font-size: 14px;
}

.form-container a:hover {
  color: #45a049;
  text-decoration: underline;
}

/* Center the links container */
.form-links {
  margin-top: 20px;
  text-align: center;
}

/* Add spacing between links */
.form-links a {
  margin: 8px 0;
  display: block;
  margin-top: 10px;
}

.nav-bar {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
  color: #45a049;
  text-decoration: underline;
}

#flash-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 80%;
  max-width: 600px;
}

.flash-message {
  padding: 15px 20px;
  margin: 10px auto;
  border-radius: 4px;
  position: relative;
  animation: slideIn 0.5s ease-out;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.flash-notice {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.flash-alert, .flash-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.flash-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
}

.flash-close:hover {
  opacity: 1;
}

@keyframes slideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.project-details {
  margin-bottom: 30px;
}

.detail-group {
  margin-bottom: 20px;
}

.detail-group label {
  font-weight: bold;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

.detail-value {
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  word-break: break-word;
}

.detail-value a {
  color: #4CAF50;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

.status-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.status-pending {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.status-building {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.status-error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.project-details {
  margin-bottom: 30px;
}

.detail-group {
  margin-bottom: 20px;
}

.detail-group label {
  font-weight: bold;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

.detail-value {
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  word-break: break-word;
}

.detail-value a {
  color: #4CAF50;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

.status-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.status-pending {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.status-error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.form-field-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
}

.form-field-checkbox input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form-field-checkbox label {
  font-weight: normal;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.template-list {
  margin-top: 20px;
}

.template-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.template-header h5 {
  margin: 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 200px;
}

.template-header a {
  color: #4CAF50;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.template-header a:hover {
  text-decoration: underline;
}

.template-description {
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.header-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-with-actions .submit-button {
  width: auto;
  padding: 8px 16px;
  margin: 0;
  color: white;
}

.header-with-actions h2 {
  margin: 0;
}

/* Add min-height to body and set up flex container */
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Push footer to bottom with flex */
.main-content {
  flex: 1 0 auto;
  padding: 20px;
}

/* Update footer styles */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 20px;
  margin-top: auto;
  color: #666;
  font-size: 14px;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
}

.copyright {
  margin: 0;
}

.hidden {
  display: none;
}

.delete-button {
  background-color: #dc3545;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

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

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
}

.admin-actions .delete-button,
.admin-actions .submit-button {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 100%;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 640px) {
  .admin-actions {
    flex-direction: column;
  }
  
  .admin-actions .delete-button,
  .admin-actions .submit-button {
    width: 100%;
  }
}

.retry-button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.retry-button:hover {
  background-color: #45a049;
}

.delete-button {
  background-color: #f44336;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

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

/* Invite Tokens Styles */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .container {
    padding: 1.5rem;
  }
}

.container h1 {
  margin-bottom: 20px;
}

/* Style for the user limit number field and date field */
input[type="number"].text-field,
input[type="date"].text-field {
  width: 240px;
}

.form-field small {
  display: block;
  margin-top: 5px;
}

.table-container {
  margin-top: 2rem;
  overflow-x: auto;
  width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.table th {
  background-color: #f8fafc;
  font-weight: 600;
}

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

.delete-button {
  background-color: #ef4444;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}

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

.overflow-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.flex {
  display: flex;
}

.code-snippet {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: monospace;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-snippet button {
  background-color: #2d2d2d;
  color: #d4d4d4;
  border: 1px solid #3d3d3d;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  margin-left: 8px;
}

.code-snippet button:hover {
  background-color: #3d3d3d;
}

.whitespace-nowrap {
  white-space: nowrap;
}