/**
 * FUNDAAHE - Form Components
 * Dual theme: dark default + light overrides
 */

/* ===== FORM INPUT (Dark default) ===== */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--teal, #03888A);
  box-shadow: 0 0 0 3px rgba(3, 136, 138, 0.1);
  background-color: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

html.light .form-input {
  border-color: #E5E7EB;
  background-color: white;
  color: #1f2937;
}

html.light .form-input::placeholder {
  color: #6b7280;
}

/* ===== FORM LABEL ===== */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

html.light .form-label {
  color: #374151;
}

/* ===== FORM ERROR ===== */
.form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ===== FORM GROUP ===== */
.form-group {
  margin-bottom: 1.5rem;
}

/* ===== FORM SELECT ===== */
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba(255,255,255,0.5)'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5rem;
  padding-right: 2.5rem;
}

.form-select:focus {
  outline: none;
  border-color: var(--teal, #03888A);
  box-shadow: 0 0 0 3px rgba(3, 136, 138, 0.1);
}

html.light .form-select {
  border-color: #E5E7EB;
  background-color: white;
  color: #1f2937;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

/* ===== FORM TEXTAREA ===== */
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
  min-height: 120px;
  resize: vertical;
  transition: all 0.2s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--teal, #03888A);
  box-shadow: 0 0 0 3px rgba(3, 136, 138, 0.1);
}

html.light .form-textarea {
  border-color: #E5E7EB;
  background-color: white;
  color: #1f2937;
}

/* ===== CHECKBOX & RADIO ===== */
.form-checkbox,
.form-radio {
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  background-color: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-checkbox:checked,
.form-radio:checked {
  background-color: var(--teal, #03888A);
  border-color: var(--teal, #03888A);
}

html.light .form-checkbox,
html.light .form-radio {
  border-color: #cbd5e1;
  background-color: #E8EEF4;
}

/* ===== FORM GRID ===== */
.form-grid {
  display: grid;
  gap: 1.5rem;
}

.form-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===== DARK FORM INPUTS (Login, collaboration) ===== */
.dark-card input[type="text"],
.dark-card input[type="email"],
.dark-card input[type="password"] {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: all 0.3s;
}

.dark-card input:focus {
  border-color: #03888A !important;
  box-shadow: 0 0 0 3px rgba(3,136,138,0.15) !important;
  outline: none;
}

.dark-card input::placeholder {
  color: rgba(255,255,255,0.2) !important;
}

.dark-card input[type="checkbox"] {
  accent-color: #03888A;
}

.dark-card input[type="text"],
.dark-card input[type="email"],
.dark-card input[type="tel"],
.dark-card input[type="url"],
.dark-card input[type="number"],
.dark-card textarea,
.dark-card select {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.8) !important;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: all 0.3s;
}

.dark-card input:focus,
.dark-card textarea:focus,
.dark-card select:focus {
  border-color: #03888A !important;
  box-shadow: 0 0 0 3px rgba(3,136,138,0.15) !important;
  outline: none;
}

.dark-card input::placeholder,
.dark-card textarea::placeholder {
  color: rgba(255,255,255,0.2) !important;
}

html.light .dark-card input[type="text"],
html.light .dark-card input[type="email"],
html.light .dark-card input[type="password"],
html.light .dark-card input[type="tel"],
html.light .dark-card input[type="url"],
html.light .dark-card input[type="number"],
html.light .dark-card textarea,
html.light .dark-card select {
  background: white !important;
  border: 1px solid #E5E7EB !important;
  color: #1f2937 !important;
}

html.light .dark-card input::placeholder,
html.light .dark-card textarea::placeholder {
  color: #6b7280 !important;
}

/* Custom checkbox styles (attendance) */
input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 2px solid #d1d5db;
  cursor: pointer;
  transition: all 0.2s;
}

input[type="checkbox"]:checked {
  background-color: #10b981;
  border-color: #10b981;
}

input[type="checkbox"]:hover {
  border-color: #6b7280;
}

input[type="checkbox"]:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ===== FORM CARD ===== */
.form-card {
  background: linear-gradient(135deg, rgba(10,14,26,0.95), rgba(3,136,138,0.05));
  border: 1px solid rgba(3,136,138,0.15);
  border-radius: 1rem;
  padding: 2rem;
}

html.light .form-card {
  background: white;
  border: 1px solid rgba(29,78,137,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ===== LOGOUT FORM ===== */
.logout-form {
  display: inline;
}

.logout-btn {
  background: none;
  border: none;
  cursor: pointer;
}
