/* ============================================================
   PR305 — Specifications Module Styles
   TradeRail Field Management SaaS
   ============================================================ */

/* ── Lily bar ───────────────────────────────────────────────────────────── */
.pr305-lily-bar {
  background: #fff9f3;
  border-left: 3px solid #FF6B00;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 12px;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.5;
}
.pr305-lily-label {
  color: #FF6B00;
  margin-right: 4px;
}
.pr305-lily-advisory {
  color: #aaa;
  font-style: italic;
}

/* ── Summary bar ────────────────────────────────────────────────────────── */
.pr305-summary-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 10px;
  font-size: 12px;
}
.pr305-summary-count { color: #555; font-weight: 600; }
.pr305-summary-issued { color: #2e7d32; font-weight: 600; }
.pr305-summary-warn {
  background: #fff3e0;
  color: #e65100;
  border-radius: 10px;
  padding: 2px 9px;
  font-weight: 700;
  font-size: 11px;
}
.pr305-summary-ok {
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 10px;
  padding: 2px 9px;
  font-weight: 600;
  font-size: 11px;
}

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.pr305-filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.pr305-search {
  flex: 1;
  min-width: 160px;
  border: 1.5px solid #ddd;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.pr305-search:focus { border-color: #FF6B00; }
.pr305-filter-select {
  border: 1.5px solid #ddd;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s;
}
.pr305-filter-select:focus { border-color: #FF6B00; }

/* ── Add button ─────────────────────────────────────────────────────────── */
.pr305-add-btn {
  margin-bottom: 12px;
}

/* ── Table ──────────────────────────────────────────────────────────────── */
.pr305-table-wrap {
  overflow-x: auto;
  border-radius: 7px;
  border: 1.5px solid #e8e8e8;
}
.pr305-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
}
.pr305-th {
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  background: #fafafa;
  border-bottom: 1.5px solid #e8e8e8;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pr305-th-title { min-width: 200px; }
.pr305-td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  color: #333;
}
.pr305-row:last-child .pr305-td { border-bottom: none; }
.pr305-row:hover { background: #fafaf8; }

.pr305-section-num-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: #FF6B00;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  white-space: nowrap;
}
.pr305-section-num-btn:hover { color: #cc5500; }

.pr305-rev-badge {
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.pr305-rev-badge:hover { background: #e8e8e8; }

.pr305-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pr305-doc-btn {
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  padding: 4px 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.pr305-doc-btn:hover { border-color: #FF6B00; }
.pr305-doc-none, .pr305-sub-none-dash { color: #ccc; }

.pr305-submittal-badge {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1.5px solid #c8e6c9;
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.pr305-submittal-badge:hover { background: #c8e6c9; }
.pr305-submittal-none { color: #ccc; font-size: 12px; }

.pr305-empty-row {
  text-align: center;
  color: #aaa;
  padding: 24px;
  font-size: 13px;
}

/* ── Viewer panel ───────────────────────────────────────────────────────── */
.pr305-viewer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 96vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  z-index: 600;
  overflow: hidden;
}
.pr305-viewer-header {
  background: #1A1A2E;
  color: #fff;
  padding: 16px 20px 14px;
  flex-shrink: 0;
  position: relative;
}
.pr305-viewer-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}
.pr305-viewer-close:hover { color: #fff; }
.pr305-viewer-section-num {
  font-size: 11px;
  color: #FF6B00;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.pr305-viewer-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  padding-right: 30px;
}
.pr305-viewer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pr305-viewer-rev {
  font-size: 11px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
}
.pr305-viewer-date {
  font-size: 11px;
  color: #aaa;
}
.pr305-viewer-trade {
  font-size: 11px;
  color: #aaa;
}
.pr305-viewer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── PDF mock ───────────────────────────────────────────────────────────── */
.pr305-pdf-mock {
  background: #f8f8f8;
  border: 1.5px solid #e8e8e8;
  border-radius: 7px;
  overflow: hidden;
}
.pr305-pdf-mock-inner {
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-height: 160px;
  justify-content: center;
}
.pr305-pdf-mock-label {
  font-size: 9px;
  font-weight: 700;
  color: #bbb;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.pr305-pdf-mock-num {
  font-size: 22px;
  font-weight: 700;
  color: #1A1A2E;
}
.pr305-pdf-mock-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-top: 2px;
  max-width: 260px;
}
.pr305-pdf-mock-trade {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
.pr305-pdf-mock-meta {
  font-size: 11px;
  color: #aaa;
  margin-top: 6px;
}
.pr305-pdf-mock-status {
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.pr305-pdf-mock-sub {
  font-size: 10px;
  color: #bbb;
  text-align: center;
  padding: 8px 16px;
  margin: 0;
  border-top: 1px solid #efefef;
}

/* ── Viewer actions ─────────────────────────────────────────────────────── */
.pr305-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pr305-action-btn {
  background: #FF6B00;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}
.pr305-action-btn:hover { background: #cc5500; }
.pr305-action-btn-secondary {
  background: #1A1A2E;
}
.pr305-action-btn-secondary:hover { background: #2e2e4e; }
.pr305-action-btn-outline {
  background: transparent;
  color: #555;
  border: 1.5px solid #ddd;
}
.pr305-action-btn-outline:hover { border-color: #999; color: #333; }
.pr305-action-btn-danger {
  background: #b71c1c;
}
.pr305-action-btn-danger:hover { background: #8b0000; }
.pr305-action-btn-danger-confirm {
  background: #e53935;
  animation: pr305-pulse 0.4s ease;
}
@keyframes pr305-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ── Viewer submittals ──────────────────────────────────────────────────── */
.pr305-viewer-submittals {
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
}
.pr305-sub-label {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
}
.pr305-link-sub-btn {
  background: none;
  border: none;
  color: #FF6B00;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  margin-left: 6px;
}
.pr305-link-sub-btn:hover { text-decoration: underline; }
.pr305-sub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pr305-sub-item {
  background: #f4f4f4;
  border-radius: 4px;
  padding: 5px 9px;
}
.pr305-sub-id {
  font-size: 11px;
  color: #333;
  font-weight: 600;
}
.pr305-no-subs {
  font-size: 12px;
  color: #aaa;
  margin: 0;
}

/* ── Notes ──────────────────────────────────────────────────────────────── */
.pr305-notes-wrap {
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pr305-notes-label {
  font-size: 12px;
  font-weight: 700;
  color: #555;
}
.pr305-notes-input {
  width: 100%;
  border: 1.5px solid #ddd;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.pr305-notes-input:focus { outline: none; border-color: #FF6B00; }
.pr305-save-notes-btn {
  align-self: flex-start;
  background: #FF6B00;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.pr305-save-notes-btn:hover { background: #cc5500; }
.pr305-notes-saved {
  font-size: 11px;
  color: #2e7d32;
  font-weight: 600;
}
.pr305-notes-readonly {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

/* ── Revision history drawer ────────────────────────────────────────────── */
.pr305-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  max-width: 96vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  z-index: 700;
  overflow: hidden;
}
.pr305-drawer-header {
  background: #1A1A2E;
  padding: 16px 20px 14px;
  flex-shrink: 0;
  position: relative;
}
.pr305-drawer-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}
.pr305-drawer-close:hover { color: #fff; }
.pr305-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.pr305-drawer-subtitle {
  font-size: 12px;
  color: #aaa;
}
.pr305-hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  flex: 1;
  overflow-y: auto;
}
.pr305-hist-th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  background: #fafafa;
  border-bottom: 1.5px solid #e8e8e8;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pr305-hist-td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.pr305-hist-row:last-child .pr305-hist-td { border-bottom: none; }
.pr305-hist-doc-btn {
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}
.pr305-hist-doc-btn:hover { border-color: #FF6B00; color: #FF6B00; }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.pr305-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  padding: 16px;
}
.pr305-modal {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-height: 90vh;
  overflow-y: auto;
}
.pr305-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}
.pr305-modal-close:hover { color: #333; }
.pr305-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 4px;
  padding-right: 30px;
}
.pr305-modal-subtitle {
  font-size: 12px;
  color: #888;
  margin-bottom: 16px;
}
.pr305-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.pr305-form-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}
.pr305-required { color: #FF6B00; }
.pr305-form-input {
  border: 1.5px solid #ddd;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}
.pr305-form-input:focus { border-color: #FF6B00; }
.pr305-form-input:disabled { background: #f4f4f4; color: #888; }
.pr305-upload-zone {
  border: 2px dashed #ddd;
  border-radius: 5px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  font-size: 12px;
  color: #888;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s;
}
.pr305-upload-zone:hover { border-color: #FF6B00; color: #FF6B00; }
.pr305-upload-sub { font-size: 10px; color: #bbb; }
.pr305-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.pr305-modal-save {
  background: #FF6B00;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.pr305-modal-save:hover { background: #cc5500; }
.pr305-modal-cancel {
  background: transparent;
  color: #555;
  border: 1.5px solid #ddd;
  border-radius: 5px;
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.pr305-modal-cancel:hover { border-color: #999; }
.pr305-modal-error {
  background: #fce4e4;
  color: #b71c1c;
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 12px;
  margin-top: 10px;
}

/* ── Feedback ───────────────────────────────────────────────────────────── */
.pr305-feedback {
  background: #f4f4f4;
  border-radius: 5px;
  padding: 9px 12px;
  font-size: 12px;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.5;
}
.pr305-feedback-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 3px solid #4caf50;
}
.pr305-feedback-info {
  background: #e3f2fd;
  color: #1565c0;
  border-left: 3px solid #2196f3;
}

/* ── Specs toolbar (add + download all) ─────────────────────────────────── */
.pr305-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.pr305-dl-all-specs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1A1A2E;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.pr305-dl-all-specs:hover { background: #2e2e4e; }
.pr305-dl-all-specs svg { flex-shrink: 0; }

/* ── Spec viewer Download PDF button ────────────────────────────────────── */
.pr305-dl-spec-btn {
  background: #1A1A2E;
}
.pr305-dl-spec-btn:hover { background: #2e2e4e; }
