/* General Styling */
body {
  background-color: #0d0d0d;
  color: white;
  font-family: 'Arial', sans-serif;
  justify-content: center;
  align-items: center;
  margin: 0;
}

/* Form Container */
.form-container {
  background-color: #1a1a1a;
  padding: 22px;
  border-radius: 12px;
  width: 80%;
  box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.1);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 40px;
}

h1 {
  font-size: 30px;
  margin-bottom: 15px;
  font-weight: bold;
}

/* Labels & Inputs */
label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: bold;
}

p {
  font-size: 12px;
  color: #b3b3b3;
}

/* Input Fields */
input,
select,
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  background-color: #262626;
  border: 1px solid #333;
  color: white;
  border-radius: 6px;
  transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: orange;
  outline: none;
  box-shadow: 0 0 5px orange;
}

.condition-group input:focus {
  box-shadow: none;
}

/* Media Preview Container */
.media-preview-container {
  margin: 15px 0;
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.media-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background-color: #262626;
  border-radius: 6px;
  overflow: hidden;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item .remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.media-item .remove-btn:hover {
  background-color: rgba(255, 0, 0, 0.8);
}

.media-item .cover-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 10px;
  padding: 3px 0;
  text-align: center;
}

.media-item .video-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 10px;
  padding: 3px 0;
  text-align: center;
}

/* Photo Buttons */
.photo-buttons {
  display: flex;
  gap: 10px;
  margin-top: -17px;
  flex-wrap: wrap;
}

.search-box {
  padding: 0px 17px !important;
}

.upload-btn,
.take-btn {
  background-color: #333;
  color: white;
  border: 1px solid #444;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
  display: inline-block;
  text-align: center;
}

.upload-btn:hover,
.take-btn:hover {
  background-color: orange;
  border-color: orange;
}

/* Condition Section */
.condition-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 5px;
}

.condition-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-top: 5px;
  font-weight: normal;
}

.condition-group input[type="radio"] {
  width: auto;
  margin: 0;
}

/* Product Details Section */
.product-details-section {
  margin-top: 20px;
}

.product-detail-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.detail-key,
.detail-value {
  flex: 1;
}

.remove-detail-btn {
  background-color: #333;
  color: #999;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.remove-detail-btn:hover {
  background-color: #ff4d4d;
  color: white;
}

.add-detail-btn {
  background: none;
  border: none;
  color: orange;
  font-size: 14px;
  cursor: pointer;
  padding: 5px 0;
  margin-top: 5px;
  transition: color 0.2s;
}

.add-detail-btn:hover {
  color: darkorange;
  text-decoration: underline;
}

/* Price Section */
.price-group {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.price-group input {
  flex: 1;
  min-width: 120px;
}

.shipping-btn {
  background-color: #333;
  color: white;
  border: 1px solid #444;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
}

.shipping-btn.active {
  background-color: orange;
  border-color: orange;
}

.shipping-btn:hover {
  background-color: orange;
  border-color: orange;
}

/* Form Actions (Buttons) */
.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.cancel-btn {
  background: none;
  color: #b3b3b3;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.list-btn {
  background-color: orange;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.list-btn:hover {
  background-color: darkorange;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.6);
}

/* Error messages */
.error-message {
  color: #ff4d4d;
  font-size: 12px;
  margin-top: 4px;
}

/* Camera UI */
.camera-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.camera-view {
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 4/3;
  background-color: #000;
  position: relative;
  overflow: hidden;
}

.take-btn {
  height: 44px;
  margin-top: 12px;
}

.camera-view video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.camera-btn {
  background-color: #333;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.camera-btn.capture {
  background-color: orange;
}

.camera-btn.capture:hover {
  background-color: darkorange;
}

.camera-btn.close:hover {
  background-color: #ff4d4d;
}

/* Responsive styles */
@media (max-width: 768px) {
  .form-container {
    width: 90%;
    padding: 15px;
  }

  .price-group {
    flex-direction: column;
  }

  .shipping-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .form-container {
    width: 95%;
    padding: 12px;
  }

  h1 {
    font-size: 24px;
  }

  .photo-buttons {
    flex-direction: column;
  }

  .upload-btn,
  .take-btn {
    width: 100%;
  }

  .media-preview {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
}