/* Brief Form Styles */

:root {
  --primary-color: #F17D04;
  --primary-dark: #d16903;
  --secondary-color: #333;
  --border-color: #ddd;
  --bg-light: #f9f9f9;
  --success-color: #4caf50;
  --error-color: #f44336;
  --text-color: #333;
  --text-light: #666;
}

.brief-form-container {
  min-height: 100vh;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.form-header {
  text-align: center;
  margin-bottom: 60px;
  padding: 40px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-header h1 {
  color: var(--secondary-color);
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.form-header .subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  width: 10%;
  transition: width 0.3s ease;
}

.progress-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

.business-form {
  max-width: 900px;
  margin: 0 auto;
}

.form-section {
  background: white;
  padding: 40px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 4px solid var(--primary-color);
}

.form-section h2 {
  color: var(--secondary-color);
  font-size: 1.8rem;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--bg-light);
}

.form-section h3 {
  color: var(--secondary-color);
  font-size: 1.3rem;
  margin: 30px 0 20px 0;
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(241, 125, 4, 0.1);
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}

.form-group small {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 5px;
}

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

.checkbox-label {
  display: flex;
  align-items: center;
  font-weight: normal !important;
  cursor: pointer;
  user-select: none;
}

.checkbox-label.agreement {
  font-weight: 600 !important;
  color: var(--secondary-color);
  padding: 15px;
  background: var(--bg-light);
  border-radius: 8px;
}

/* Hours Container */
.hours-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hours-row {
  display: grid;
  grid-template-columns: 100px 1fr auto 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 15px;
  background: var(--bg-light);
  border-radius: 8px;
}

.hours-row label:first-child {
  font-weight: 600;
  color: var(--secondary-color);
}

.hours-row input[type="time"] {
  padding: 8px 12px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
}

.hours-row span {
  color: var(--text-light);
  font-weight: 500;
}

/* Competitor Entry */
.competitor-entry {
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 3px solid var(--primary-color);
}

#competitors-container {
  margin-bottom: 20px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn,
.btn-secondary {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Open Sans', sans-serif;
}

.btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(241, 125, 4, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--secondary-color);
  border: 2px solid var(--border-color);
}

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

/* Required field indicator */
label:has(+ input[required])::after,
label:has(+ select[required])::after,
label:has(+ textarea[required])::after {
  content: " *";
  color: var(--error-color);
}

/* Success/Error messages */
.form-message {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.form-message.success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid var(--success-color);
}

.form-message.error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid var(--error-color);
}

/* Character counters */
#shortDescCount,
#longDescCount,
#storyCount {
  font-weight: 600;
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .form-header h1 {
    font-size: 2rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 25px 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .hours-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hours-row label:first-child {
    font-size: 1.1rem;
  }
}

/* Loading state */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Validation states */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
  border-color: var(--error-color);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
  border-color: var(--success-color);
}

/* File Upload Styles */
.file-upload-container {
  margin-top: 10px;
}

.file-upload-container input[type="file"] {
  padding: 12px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  background: var(--bg-light);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.file-upload-container input[type="file"]:hover {
  border-color: var(--primary-color);
  background: white;
}

.file-upload-container input[type="file"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(241, 125, 4, 0.1);
}

.file-preview {
  margin-top: 15px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
  border: 2px solid var(--border-color);
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-preview p {
  margin: 0 0 5px 0;
  color: var(--text-light);
  font-weight: 500;
}

.file-preview small {
  color: var(--text-light);
  font-size: 0.85rem;
  text-align: center;
}

.file-preview.has-files {
  border-color: var(--success-color);
  background: #e8f5e9;
}

.file-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-list {
  width: 100%;
  margin-top: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: white;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.file-item-icon {
  font-size: 1.5rem;
}

.file-item-details {
  flex: 1;
}

.file-item-name {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 3px;
}

.file-item-size {
  font-size: 0.85rem;
  color: var(--text-light);
}

.file-item-remove {
  background: var(--error-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.file-item-remove:hover {
  background: #d32f2f;
  transform: scale(1.05);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  padding: 20px;
}

.gallery-grid.has-files {
  align-items: start;
  justify-content: start;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.gallery-item-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--error-color);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  opacity: 0;
}

.gallery-item:hover .gallery-item-remove {
  opacity: 1;
}

.gallery-item-remove:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

/* File size indicator */
.file-size-warning {
  color: var(--error-color);
  font-weight: 600;
}

.file-size-ok {
  color: var(--success-color);
  font-weight: 600;
}

/* Upload progress */
.upload-progress {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  width: 0%;
  transition: width 0.3s ease;
}
