/* FILE: docs/styles.css */
@import url("./src/ui/styles.css");
@import url("./src/ui/modern-theme.css");

/* Build Options UI (v1.8) — scoped to avoid impacting existing UI */
#buildOptions {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#buildOptions .bo-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 2px 0;
}

#buildOptions .bo-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #444;
  margin: 0 0 10px 0;
}

#buildOptions details.bo-section {
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  margin: 10px 0;
  overflow: hidden;
}

#buildOptions details.bo-section > summary {
  cursor: pointer;
  user-select: none;
  padding: 10px 12px;
  font-weight: 700;
  list-style: none;
}

#buildOptions details.bo-section > summary::-webkit-details-marker {
  display: none;
}

#buildOptions details.bo-section > summary::before {
  content: "▸";
  display: inline-block;
  width: 16px;
  margin-right: 6px;
  color: #444;
}

#buildOptions details.bo-section[open] > summary::before {
  content: "▾";
}

#buildOptions .bo-box {
  padding: 10px 12px 12px 12px;
  border-top: 1px solid #eee;
}

#buildOptions .bo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0;
}

#buildOptions .bo-row.one {
  grid-template-columns: 1fr;
}

#buildOptions label.bo-field {
  display: block;
  font-size: 12px;
  color: #222;
}

#buildOptions label.bo-field > span {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

#buildOptions input[type="number"],
#buildOptions input[type="text"],
#buildOptions select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

#buildOptions input[readonly] {
  background: #f4f4f4;
  color: #555;
}

#buildOptions .bo-divider {
  height: 1px;
  background: #eee;
  margin: 10px 0;
}

#buildOptions .bo-roof-block-title {
  font-size: 12px;
  font-weight: 700;
  color: #444;
  margin: 8px 0 2px 0;
}

#buildOptions .bo-note {
  font-size: 12px;
  color: #666;
  margin: 6px 0 0 0;
}

#buildOptions .bo-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

#buildOptions .bo-actions button {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

#buildOptions .bo-actions button:disabled,
#buildOptions button.bo-disabled,
#buildOptions [aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.ftInHint {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

/* Profile system - disabled controls */
.profile-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Profile system - select with all options restricted */
/* Dropdown can still be opened to view options, but options are greyed out and not selectable */
select.profile-options-restricted {
  /* Slight visual indication that selections are restricted */
  border-color: #999;
}

select.profile-options-restricted option:disabled {
  color: #999;
}

/* ============================================================
   Attachment Editor UI (Sub-building editor)
   ============================================================ */

.attachment-editor {
  border: 2px solid #4a90d9;
  border-radius: 8px;
  margin: 8px 0;
  background: #f8fbff;
  overflow: hidden;
}

.attachment-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #4a90d9;
  color: #fff;
  cursor: pointer;
}

.attachment-editor-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.attachment-editor-header .att-wall-label {
  font-size: 11px;
  opacity: 0.9;
  margin-left: 8px;
}

.attachment-editor-header .att-toggle-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.attachment-editor-body {
  padding: 10px;
}

.attachment-editor.collapsed .attachment-editor-body {
  display: none;
}

.attachment-editor .att-section {
  margin: 8px 0;
  padding: 8px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.attachment-editor .att-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  margin: 0 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.attachment-editor .att-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0;
}

.attachment-editor .att-row.three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.attachment-editor .att-row.full {
  grid-template-columns: 1fr;
}

.attachment-editor label {
  display: block;
  font-size: 11px;
  color: #444;
}

.attachment-editor label span {
  display: block;
  margin-bottom: 3px;
}

.attachment-editor input[type="number"],
.attachment-editor select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}

.attachment-editor input[type="number"]:focus,
.attachment-editor select:focus {
  border-color: #4a90d9;
  outline: none;
}

.attachment-editor .att-remove-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: #d9534f;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.attachment-editor .att-remove-btn:hover {
  background: #c9302c;
}

/* Attachment openings list */
.attachment-editor .att-openings-list {
  margin-top: 8px;
}

.attachment-editor .att-opening-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  margin: 4px 0;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 11px;
}

.attachment-editor .att-opening-item button {
  padding: 2px 6px;
  font-size: 10px;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
}

.attachment-editor .att-add-opening-btns {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.attachment-editor .att-add-opening-btns button {
  flex: 1;
  padding: 6px;
  font-size: 11px;
  background: #5cb85c;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.attachment-editor .att-add-opening-btns button:hover {
  background: #449d44;
}

/* Hint text inside attachments */
.attachment-editor .att-hint {
  font-size: 10px;
  color: #666;
  margin: 4px 0;
  font-style: italic;
}