/**
 * @file
 * Styles for vintage techsheet dropdown and download button components.
 */

/* =============================================================================
   VINTAGE DROPDOWN SELECTOR (Table column layout)
   ============================================================================= */

.vintage-selector {
  min-width: 80px;
  padding: 8px 28px 8px 12px;
  border: 1px solid #c1c4c6;
  border-radius: 2px;
  background-color: #fff;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #353535;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* Chevron icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23353535' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
}

.vintage-selector:hover {
  border-color: #1d386d;
}

.vintage-selector:focus {
  outline: 2px solid #1d386d;
  outline-offset: 1px;
  border-color: #1d386d;
}

/* =============================================================================
   TECH SHEET DOWNLOAD BUTTON (Table column layout)
   ============================================================================= */

.techsheet-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #a6b7de;
  border-radius: 2px;
  background-color: #fff;
  color: #353535;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.techsheet-download-btn:hover {
  background-color: #f7f7f7;
  border-color: #1d386d;
}

.techsheet-download-btn:focus {
  outline: 2px solid #1d386d;
  outline-offset: 2px;
}

.techsheet-download-btn.is-disabled {
  background-color: #f7f7f7;
  border-color: #c1c4c6;
  color: #999;
  cursor: not-allowed;
  pointer-events: none;
}

/* Download icon using inline SVG - color #353535 */
.techsheet-download-btn .techsheet-icon {
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23353535' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.techsheet-download-btn.is-disabled .techsheet-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}

/* =============================================================================
   COMBINED WRAPPER LAYOUT (Original single-field layout)
   ============================================================================= */

.vintage-techsheet-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vintage-techsheet-wrapper .vintage-selector {
  flex-shrink: 0;
}

.vintage-techsheet-wrapper .vintage-techsheet-download {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid #1d386d;
  border-radius: 2px;
  background-color: #1d386d;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.vintage-techsheet-wrapper .vintage-techsheet-download:hover {
  background-color: #0a2250;
  border-color: #0a2250;
}

.vintage-techsheet-wrapper .vintage-techsheet-download:focus {
  outline: 2px solid #1d386d;
  outline-offset: 2px;
}

.vintage-techsheet-wrapper .vintage-techsheet-download.is-disabled {
  background-color: #ccc;
  border-color: #ccc;
  color: #666;
  cursor: not-allowed;
  pointer-events: none;
}

/* =============================================================================
   TABLE CELL ALIGNMENT
   ============================================================================= */

/* Ensure proper vertical alignment in table cells */
td .vintage-selector,
td .techsheet-download-btn {
  vertical-align: middle;
}

/* Center the download button in its cell */
.views-field-winebow-techsheet-download {
  text-align: center;
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
