/* DC Tech Events - Suggest Frontend Styles */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-warning: #d97706;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --max-width: 640px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header */
header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

header .container {
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

header h1 a {
  color: var(--color-text);
  text-decoration: none;
}

/* Navigation */
nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

p {
  margin: 0 0 1rem 0;
}

a {
  color: var(--color-primary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
  line-height: 1.5;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg);
}

.btn-danger {
  background: var(--color-error);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* Forms */
form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

label .required {
  color: var(--color-error);
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  background: var(--color-surface);
  transition: background-color 0.15s;
}

.checkbox-group label:hover {
  background: var(--color-bg);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}

/* Form rows (side-by-side fields) */
.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

/* Event section */
.event-section {
  margin-bottom: 1.5rem;
}

.event-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
}

/* Timing options (radio group) */
.timing-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timing-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.timing-option input[type="radio"] {
  width: auto;
  margin-top: 0.25rem;
}

.timing-label {
  font-weight: 500;
  font-size: 0.875rem;
}

.time-selector {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.time-selector select {
  width: auto;
  min-width: 70px;
}

/* Optional details toggle */
.optional-details {
  margin-top: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0;
}

.optional-details summary {
  padding: 0.625rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  user-select: none;
}

.optional-details summary:hover {
  color: var(--color-text);
}

.optional-fields {
  padding: 0 1rem 1rem;
}

/* Form actions */
.form-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Small hint text */
small {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Status message */
.status-message:empty {
  display: none;
}

/* Response/feedback areas */
.response-area {
  margin-bottom: 1rem;
}

.response-area:empty {
  display: none;
}

/* Submit confirmation notification */
.submit-confirmation {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #166534;
}

.submit-confirmation h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: #166534;
}

.submit-confirmation p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
}

.submit-confirmation code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.8125rem;
}

/* Submissions table */
.submissions-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.875rem;
}

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

.submissions-table th {
  background: var(--color-bg);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.submissions-table tr:last-child td {
  border-bottom: none;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-approved {
  background: #d1fae5;
  color: #065f46;
}

.status-rejected {
  background: #fee2e2;
  color: #991b1b;
}

/* Message styles */
.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.message-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.message-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.message-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

/* User info bar */
.user-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.user-bar .user-email {
  font-weight: 500;
  color: var(--color-text);
}

/* Landing page hero */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn {
  font-size: 1rem;
  padding: 0.75rem 2rem;
}

/* Action links */
.action-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-links .card {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}

.action-links .card:hover {
  box-shadow: var(--shadow-md);
}

/* Loading indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Auth callback page */
.auth-status {
  text-align: center;
  padding: 3rem 1rem;
}

.auth-status p {
  color: var(--color-text-muted);
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 1rem 0.75rem;
  }

  form {
    padding: 1rem;
  }

  .hero {
    padding: 2rem 0.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .action-links {
    flex-direction: column;
    align-items: center;
  }

  .action-links .card {
    max-width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
