/**
 * WooCommerce File Uploads - Frontend Styles
 */

.wfu-upload-container {
  margin: 0 0 20px 0;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 0;
}

.wfu-upload-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #737a80;
  text-transform: none;
}

.wfu-upload-description {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
}

.wfu-upload-area {
  margin-bottom: 12px;
}

.wfu-drop-zone {
  border-radius: 35px;
  padding: 30px 20px 10px;
  text-align: center;
  background: #f4f6fa;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wfu-drop-zone:hover {
  border-color: #999;
  background: #f5f5f5;
}

.wfu-drop-zone.wfu-dragover {
  border-color: #666;
  background: #f0f0f0;
  border-width: 2px;
}

.wfu-icon {
  display: block;
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.6;
}

/* Remove custom button styles - use WP defaults */

.wfu-drop-text {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #646970;
  text-align: center;
}

.wfu-file-list {
  margin: 15px 0;
}

.wfu-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-left: 3px solid #ddd;
  border-radius: 0;
  transition: all 0.3s ease;
}

.wfu-file-item.wfu-uploaded {
  border-left-color: #46b450;
  background: #fff;
}

.wfu-file-item.wfu-error {
  border-left-color: #dc3232;
  background: #fef7f7;
}

.wfu-file-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wfu-file-name {
  font-weight: 500;
  font-size: 14px;
  color: #1d2327;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.wfu-file-size {
  font-size: 13px;
  color: #646970;
  white-space: nowrap;
  flex-shrink: 0;
}

.wfu-file-status {
  font-size: 13px;
  color: #646970;
  font-style: italic;
  white-space: nowrap;
}

.wfu-progress {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.wfu-progress-bar {
  height: 100%;
  background: #2271b1;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.wfu-remove-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: normal;
  background: #f0f0f0;
  color: #dc3232;
  border: 1px solid #ddd;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.wfu-remove-btn:hover {
  background: #dc3232;
  color: #fff;
  border-color: #dc3232;
}

.wfu-remove-btn:focus {
  outline: none;
}

.wfu-upload-info {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.wfu-upload-info small {
  font-size: 12px;
  line-height: 1.5;
}

.wfu-error-message {
  padding: 12px 16px;
  margin-bottom: 15px;
  background: #fef7f7;
  border-left: 4px solid #dc3232;
  border-radius: 4px;
  color: #dc3232;
  font-size: 14px;
  line-height: 1.5;
}

/* File list display (for cart, checkout, order pages) */
.wfu-file-list-display {
  margin: 15px 0;
  padding: 15px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.wfu-file-list-display h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1d2327;
}

.wfu-files {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wfu-file-item-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.wfu-file-item-display:last-child {
  border-bottom: none;
}

.wfu-file-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.wfu-download-link {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #2271b1;
  text-decoration: none;
  border: 1px solid #2271b1;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.wfu-download-link:hover {
  background: #2271b1;
  color: #fff;
}

.wfu-download-link:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .wfu-upload-container {
    padding: 15px;
  }

  .wfu-drop-zone {
    padding: 30px 20px;
  }

  .wfu-icon {
    font-size: 36px;
  }

  .wfu-select-btn {
    width: 100%;
    padding: 12px 24px;
  }

  .wfu-file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .wfu-file-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }

  .wfu-file-name {
    max-width: 100%;
  }

  .wfu-remove-btn {
    width: 100%;
    padding: 10px;
  }

  .wfu-file-item-display {
    flex-wrap: wrap;
  }

  .wfu-download-link {
    width: 100%;
    text-align: center;
    margin-left: 0;
  }

  .wfu-upload-info small {
    font-size: 12px;
  }
}

/* Order files display */
.wfu-order-files {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e5e5;
}

.wfu-order-files strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.wfu-files-list-order {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wfu-files-list-order li {
  padding: 5px 0;
  font-size: 13px;
}

.wfu-files-list-order a {
  color: #2271b1;
  text-decoration: none;
}

.wfu-files-list-order a:hover {
  text-decoration: underline;
}

.wfu-files-list-order .wfu-file-size {
  font-size: 12px;
  color: #666;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .wfu-drop-zone,
  .wfu-file-item,
  .wfu-select-btn,
  .wfu-remove-btn,
  .wfu-download-link,
  .wfu-progress-bar {
    transition: none;
  }
}
