/**
 * Gang Sheet Product Page Styles
 */

/* Builder Button */
#gang-sheet-builder-button {
  display: inline-block;
  padding: 12px 24px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  width: 100%;
  text-align: center;
}

#gang-sheet-builder-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#gang-sheet-builder-button:active {
  transform: translateY(0);
}

/* Cart Item Thumbnail Override */
.woocommerce-cart-form .product-thumbnail img.gs-thumbnail {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Gang Sheet Info in Cart */
.gs-cart-info {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.gs-cart-info .gs-design-id {
  font-family: monospace;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Order Page Design Preview */
.gs-order-preview {
  margin-top: 10px;
}

.gs-order-preview img {
  max-width: 150px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.gs-order-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.gs-order-actions a {
  padding: 6px 12px;
  background: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
}

.gs-order-actions a:hover {
  background: #005a87;
}

/* ================================================
   Extra Options on Product Page
   ================================================ */
.gs-extra-options {
  margin: 20px 0 15px;
}

.gs-option-group {
  margin-bottom: 20px;
}

.gs-option-label {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #1a1a2e;
}

/* Table display type */
.gs-option-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
}

.gs-extra-options .gs-option-table thead th,
.gs-option-group .gs-option-table thead th,
table.gs-option-table thead th {
  background: #f8f9fa;
  padding: 12px 14px;
  text-align: left !important;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.gs-option-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f0f0f0;
}

.gs-option-table tbody tr:last-child {
  border-bottom: none;
}

.gs-option-table tbody tr:hover {
  background: #f8fafc;
}

.gs-option-table tbody tr.selected {
  background: #eff6ff;
}

.gs-option-table tbody td {
  padding: 12px 14px;
  color: #374151;
}

.gs-option-table tbody td:first-child {
  width: 30px;
  text-align: center;
}

.gs-option-table input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Pricing table display type (read-only) */
.gs-pricing-table tbody tr {
  cursor: default;
}
.gs-pricing-table tbody tr:hover {
  background: transparent;
}
.gs-pricing-table thead th,
.gs-pricing-table tbody td {
  text-align: left !important;
  padding: 10px 14px !important;
}
.gs-pricing-table thead th:first-child,
.gs-pricing-table tbody td:first-child {
  width: auto;
  text-align: left !important;
}
.gs-pricing-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

/* Radio display type */
.gs-option-radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gs-option-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.gs-option-radio-label:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.gs-option-radio-label.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.gs-option-radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.gs-radio-text {
  flex: 1;
  font-weight: 500;
  color: #374151;
}

.gs-radio-price {
  font-weight: 600;
  color: #2563eb;
  font-size: 13px;
}

/* Select display type */
.gs-option-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}

.gs-option-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Checkbox display type */
.gs-option-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gs-option-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.gs-option-checkbox-label:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.gs-option-checkbox-label.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.gs-option-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.gs-checkbox-text {
  flex: 1;
  font-weight: 500;
  color: #374151;
}

.gs-checkbox-price {
  font-weight: 600;
  color: #2563eb;
  font-size: 13px;
}

/* Input-based types (text, textarea, number, date, color) */
.gs-option-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gs-option-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gs-option-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

textarea.gs-option-input {
  resize: vertical;
  min-height: 60px;
}

input[type="color"].gs-option-color {
  width: 50px;
  height: 40px;
  padding: 2px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

input[type="date"].gs-option-input {
  max-width: 220px;
}

input[type="number"].gs-option-input {
  max-width: 180px;
}

.gs-input-fee {
  font-weight: 600;
  color: #2563eb;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Cart extra option display */
.gs-cart-extra-option {
  font-size: 13px;
  color: #555;
  margin-top: 3px;
}

.gs-cart-extra-option .gs-extra-fee {
  color: #2563eb;
  font-weight: 600;
}
