/*
 * 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.
 */

.filters {
  margin: 1rem 0;
  padding: 1rem;
  background-color: var(--nav-bg);
  border-radius: 8px;
}

.filter-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.filter-form .form-field {
  margin: 0;
  flex: 1;
  max-width: 300px;
}

:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --nav-bg: #f8f9fa;
}

.dark {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --nav-bg: #2d2d2d;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  transition: background-color 0.3s, color 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 2rem;
}

.footer {
  background-color: var(--nav-bg);
  padding: 2rem 1rem;
  margin-top: auto;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
}

.footer-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Table styles */
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background-color: var(--bg-color);
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--nav-bg);
}

.table th {
  font-weight: bold;
  background-color: var(--nav-bg);
}

/* Hash cell styles */
.hash-cell code {
  font-family: monospace;
  background-color: var(--nav-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive table */
@media (max-width: 768px) {
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Container spacing */
.container {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Button spacing */
.container .btn {
  margin-bottom: 1rem;
}

.btn-change {
  background-color: #4CAF50;
}

.btn-change:hover {
  background-color: #45a049;
}

.navbar {
  background-color: var(--nav-bg);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--text-color);
}

.navbar-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
}

.btn:hover {
  background-color: #0056b3;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-color);
}

.auth-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--nav-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.form-actions {
  margin-top: 1rem;
}

.auth-links {
  margin-top: 1rem;
  text-align: center;
}

.error-messages {
  color: #dc3545;
  margin-bottom: 1rem;
}

.toast-container {
  position: fixed;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 600px;
  padding: 0 1rem;
}

.toast {
  padding: 1rem 1.5rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  transform: translateY(-1rem);
  opacity: 0;
  transition: all 0.5s ease-in-out;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.hiding {
  transform: translateY(-1rem);
  opacity: 0;
}

.toast.notice {
  background-color: rgba(52, 168, 83, 0.85);
  color: white;
}

.toast.alert {
  background-color: rgba(234, 67, 53, 0.85);
  color: white;
}

.toast-close {
  background: none;
  border: none;
  color: currentColor;
  padding: 0.25rem;
  cursor: pointer;
  margin-left: auto;
  opacity: 0.7;
}

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

.dark .toast:not(.notice):not(.alert) {
  background-color: rgba(45, 45, 45, 0.85);
  color: white;
}

.subscription-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.subscription-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--nav-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subscription-form .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

#payment-container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
}

#payment-element {
  margin-bottom: 1.5rem;
}

#payment-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  background-color: #fef2f2;
}

#payment-message.hidden {
  display: none;
}

#submit {
  width: 100%;
  margin-top: 1rem;
}

#spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

#spinner.hidden {
  display: none;
}

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

.current-plan {
  background-color: var(--nav-bg);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid #007bff;
}

.current-plan h3 {
  margin-top: 0;
}

.current-plan p {
  margin: 0.5rem 0;
}

.btn-danger {
  background-color: #dc3545;
}

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

.btn-success {
  background-color: #28a745;
}

.btn-success:hover {
  background-color: #218838;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.plan-card {
  background-color: var(--nav-bg);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.plan-card .price {
  font-size: 2rem;
  font-weight: bold;
  margin: 1rem 0;
  color: #007bff;
}

.plan-card .features {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: left;
}

.plan-card .features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.plan-card .features li:last-child {
  border-bottom: none;
}

.btn-change {
  background-color: #4CAF50;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.btn-change:hover {
  background-color: #45a049;
  transform: translateY(-1px);
}

.btn-change:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-change:disabled:hover {
  transform: none;
}
