/* Upload Page Specific Styles */

.upload-body {
  background: #f8f8f8;
}

.upload-topbar {
  background: white;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 0;
  min-height: calc(100vh - var(--header-height));
  margin-left: var(--sidebar-width);
  padding-top: var(--header-height);
  transition: margin-left 0.18s ease;
}

.upload-header {
  padding: 24px 40px;
  background: white;
  border-bottom: 1px solid #e5e5e5;
}

.upload-header h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #0f0f0f;
}

.upload-subtitle {
  margin: 0;
  color: #606060;
  font-size: 14px;
}

.upload-container {
  flex: 1;
  padding: 32px 40px;
  background: #f8f8f8;
  max-width: 900px;
}

/* Upload Form */
.upload-form {
  position: relative;
}

/* Upload Steps */
.upload-step {
  display: none;
}

.upload-step.is-active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-header {
  margin-bottom: 24px;
}

.step-header h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 650;
  color: #0f0f0f;
}

.step-header p {
  margin: 0;
  color: #606060;
  font-size: 14px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  border-radius: 50%;
  background: #1a73e8;
  color: white;
  font-size: 14px;
  font-weight: 650;
  vertical-align: middle;
}

/* Upload Drop Zone */
.upload-drop-zone {
  margin-bottom: 24px;
  border: 2px dashed #bcbcbc;
  border-radius: 16px;
  background: white;
  overflow: hidden;
  transition: all 0.2s ease;
}

.upload-drop-zone:hover {
  border-color: #606060;
}

.upload-drop-zone.drag-enter {
  border-color: #1a73e8;
  background: #e8f0fe;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
}

.drop-zone-content .icon {
  width: 48px;
  height: 48px;
  color: #606060;
}

.drop-zone-content h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f0f0f;
}

.drop-zone-hint {
  margin: 0;
  color: #606060;
  font-size: 14px;
}

.file-requirements {
  margin: 16px 0 0;
  color: #777;
  font-size: 12px;
  line-height: 1.6;
}

.upload-drop-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  cursor: pointer;
}

/* Video Preview */
.video-preview {
  padding: 16px;
  border-top: 1px solid #e5e5e5;
  background: white;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.preview-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f0f0f;
}

.preview-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #606060;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preview-close:hover {
  background: #f2f2f2;
  color: #0f0f0f;
}

.preview-close .icon {
  width: 18px;
  height: 18px;
}

.preview-video {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: 12px;
  background: #0f0f0f;
  object-fit: contain;
}

.preview-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
}

.preview-info span {
  color: #606060;
  font-size: 13px;
}

/* Step Actions */
.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.step-actions .button {
  min-height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.step-actions .button .icon {
  width: 18px;
  height: 18px;
}

/* Form Fields */
.form-fields {
  display: grid;
  gap: 20px;
}

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

.form-group label {
  color: #303030;
  font-size: 13px;
  font-weight: 550;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
  padding: 12px 14px;
  border: 1px solid #d3d3d3;
  border-radius: 8px;
  background: white;
  color: #0f0f0f;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #909090;
}

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

.form-group select {
  cursor: pointer;
}

.field-hint {
  color: #777;
  font-size: 11px;
}

/* Thumbnail Upload */
.thumbnail-upload {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.thumbnail-drop {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 24px;
  border: 2px dashed #bcbcbc;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.thumbnail-drop:hover {
  border-color: #606060;
}

.thumbnail-drop .icon {
  width: 32px;
  height: 32px;
  color: #606060;
}

.thumbnail-drop span {
  color: #0f0f0f;
  font-size: 14px;
  font-weight: 550;
}

.thumbnail-drop small {
  color: #777;
  font-size: 11px;
}

.thumbnail-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.thumbnail-preview {
  position: relative;
  width: 160px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
}

.thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.thumbnail-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.thumbnail-remove:hover {
  background: #c00;
}

.thumbnail-remove .icon {
  width: 14px;
  height: 14px;
}

/* Settings Grid */
.settings-grid {
  display: grid;
  gap: 24px;
}

.setting-card {
  padding: 20px;
  background: white;
  border-radius: 12px;
}

.setting-card h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 650;
  color: #0f0f0f;
}

.setting-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.setting-option:hover {
  border-color: #d3d3d3;
  background: #fafafa;
}

.setting-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.setting-option.is-selected {
  border-color: #1a73e8;
  background: #e8f0fe;
}

.option-icon {
  width: 24px;
  height: 24px;
  font-size: 16px;
}

.option-label {
  font-size: 14px;
  font-weight: 550;
  color: #0f0f0f;
}

.option-desc {
  font-size: 12px;
  color: #606060;
}

/* Setting Toggles */
.setting-toggle {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.setting-toggle label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.setting-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.setting-toggle span {
  color: #0f0f0f;
  font-size: 14px;
}

/* Upload Progress Overlay */
.upload-progress-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 400px;
  width: 100%;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.progress-spinner {
  position: relative;
  width: 60px;
  height: 60px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid #f2f2f2;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.progress-container h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  color: #0f0f0f;
}

.progress-container > p {
  margin: 0;
  color: #606060;
  font-size: 14px;
}

.progress-bar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e5e5;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #1a73e8;
  border-radius: 3px;
  transition: width 0.3s ease;
}

#upload-progress-text {
  color: #606060;
  font-size: 13px;
  font-weight: 550;
}

/* Success Message */
.upload-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 400px;
  text-align: center;
}

.success-content .icon {
  width: 64px;
  height: 64px;
  color: #2e7d32;
  background: #e8f5e9;
  border-radius: 50%;
  padding: 16px;
}

.success-content h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  color: #0f0f0f;
}

.success-content > p {
  margin: 0;
  color: #606060;
  font-size: 14px;
  line-height: 1.6;
}

.success-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

.success-actions .button {
  flex: 1;
  min-height: 40px;
  padding: 0 20px;
}

/* Requirements Panel */
.requirements-panel {
  flex: 0 0 320px;
  padding: 24px;
  background: white;
  border-left: 1px solid #e5e5e5;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.requirements-panel h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 650;
  color: #0f0f0f;
}

.requirements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #606060;
  transition: all 0.2s ease;
}

.requirement-item .icon {
  width: 18px;
  height: 18px;
}

.requirement-item.is-fulfilled {
  background: #e8f5e9;
  color: #2e7d32;
}

.requirement-item.is-fulfilled .icon {
  color: #2e7d32;
}

.requirements-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f8f8f8;
  border-radius: 8px;
  color: #606060;
  font-size: 12px;
}

.requirements-hint .icon {
  width: 16px;
  height: 16px;
  color: #606060;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  width: calc(100% - 32px);
  padding: 24px;
  background: white;
  border-radius: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  color: #0f0f0f;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #606060;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f2f2f2;
  color: #0f0f0f;
}

.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.modal-body .icon {
  width: 48px;
  height: 48px;
  color: #f03;
}

.modal-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f0f0f;
}

.modal-body p {
  margin: 0;
  color: #606060;
  font-size: 13px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.modal-actions .button {
  min-height: 38px;
  padding: 0 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .upload-layout {
    grid-template-columns: 1fr;
  }

  .requirements-panel {
    display: none;
  }

  .upload-container {
    padding: 24px;
  }
}

@media (max-width: 760px) {
  .upload-layout {
    margin-left: 0;
    padding-top: 104px;
  }

  .upload-header {
    padding: 16px;
  }

  .upload-header h1 {
    font-size: 20px;
  }

  .upload-container {
    padding: 16px;
  }

  .step-header h2 {
    font-size: 18px;
  }

  .upload-drop-zone {
    border-radius: 12px;
  }

  .drop-zone-content {
    padding: 32px 16px;
  }

  .drop-zone-content h3 {
    font-size: 16px;
  }

  .preview-video {
    max-height: 250px;
  }

  .form-group input[type="text"],
  .form-group textarea,
  .form-group select {
    padding: 10px 12px;
    font-size: 13px;
  }

  .thumbnail-upload {
    flex-direction: column;
  }

  .thumbnail-drop {
    min-height: 100px;
  }

  .thumbnail-preview {
    width: 100%;
    height: 180px;
  }

  .step-actions {
    flex-direction: column;
    gap: 8px;
  }

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

/* Toast for upload page */
.toast {
  position: fixed;
  z-index: 1001;
  bottom: 24px;
  right: 24px;
  max-width: 360px;
  padding: 12px 18px;
  border-radius: 16px;
  background: #484848;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(20px);
}

/* Button Styles */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-primary {
  background: #0f0f0f;
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: #333;
}

.button-secondary {
  border: 1px solid #d3d3d3;
  background: white;
  color: #0f0f0f;
}

.button-secondary:hover:not(:disabled) {
  background: #f2f2f2;
  border-color: #c3c3c3;
}

.button .icon {
  width: 18px;
  height: 18px;
}
