/* CF7 File Upload Styling */
.files-upload {
  position: relative;
}

.files-upload .wpcf7-form-control-wrap {
  position: relative;
  display: block;
}

.files-upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.files-upload .cf7-upload-visual {
  display: inline-block;
  text-align: center;
  font-weight: 400;
  vertical-align: middle;
  touch-action: manipulation;
  padding: 8px 12px;
  white-space: nowrap;
  line-height: 1.5;
  user-select: none;
  background-color: var(--porto-primary-color);
  color: var(--porto-primary-color-inverse);
}

.files-upload .cf7-upload-visual:hover {
  background-color: var(--porto-primary-dark-5);
  cursor: pointer;
}

.files-upload .cf7-upload-status {
  margin-top: 6px;
  padding: 32px 24px;
  background-color: #fafafa;
  border: 2px dashed #d3d3d3;
  border-radius: 3px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.files-upload .cf7-upload-status.dragover {
  background-color: #e8f4ff;
  border-color: #1e73be;
}

.files-upload .cf7-upload-status.is-selected {
  background-color: #fff;
  align-items: flex-start;
  text-align: left;
  padding: 8px 10px;
  min-height: auto;
  border: 1px solid #ddd;
  border-left-color: #46b450;
  border-left-width: 3px;
}

.files-upload .cf7-upload-text {
  color: #999;
  font-size: 14px;
  display: block;
  width: 100%;
  line-height: 1.6;
}

.files-upload .cf7-upload-status.is-selected .cf7-upload-text {
  color: #666;
  font-weight: 400;
  padding-right: 40px;
  word-break: break-word;
  font-size: 13px;
}

.files-upload .cf7-upload-clear {
  position: absolute;
  top: 6px;
  right: 5px;
  background: transparent;
  border: none;
  color: #dc3232;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  width: auto;
  height: auto;
  display: none;
  transition: color 0.2s ease;
  font-weight: 300;
}

.files-upload .cf7-upload-status.is-selected .cf7-upload-clear {
  display: block;
}

.files-upload .cf7-upload-clear:hover {
  font-weight: bold;
}

.files-upload .cf7-upload-clear:disabled {
  display: none;
}

.files-upload .wpcf7-not-valid-tip {
  display: block;
  margin-top: 8px;
}