/* practical-drills.css — interactive drill forms for practical writings */

.pd-wrapper {
  margin: 1.6em 0;
}

.pd-toggle {
  display: inline-block;
  padding: 0.5em 1.4em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
  background: transparent;
  border: 1px solid #222;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.pd-toggle:hover,
.pd-toggle:focus {
  color: #888;
  border-color: #444;
  outline: none;
}
.pd-toggle[aria-expanded="true"] {
  color: #888;
  border-color: #444;
}

.pd-toggle--example {
  color: #6a6a55;
  border-color: #2a2a1a;
}
.pd-toggle--example:hover,
.pd-toggle--example:focus {
  color: #999980;
  border-color: #444430;
}

.pd-btn-row {
  display: flex;
  gap: 0.6em;
}

.pd-panel--example .pd-input {
  color: #8a8870;
  border-bottom-color: #2a2a1a;
  background: #0c0c0a;
}

.pd-example { display: none; }

.pd-panel {
  margin-top: 0.8em;
  padding: 1.6em 1.8em;
  border: 1px solid #1a1a1a;
  background: #080808;
  overflow: hidden;
}

.pd-form {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #999;
}

.pd-text {
  white-space: pre-wrap;
  color: #333;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  min-height: 0.4em;
  margin: 0.2em 0;
}

.pd-sep {
  border: none;
  border-top: 1px solid #111;
  margin: 0.8em 0;
}

.pd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6em;
  margin: 0.6em 0;
}

.pd-label {
  white-space: nowrap;
  color: #555;
  font-size: 0.76rem;
  flex-shrink: 0;
}

.pd-input {
  flex: 1 1 140px;
  min-width: 80px;
  max-width: 100%;
  padding: 0.5em 0.7em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #e0e0e0;
  background: #0a0a0a;
  border: none;
  border-bottom: 1px solid #252525;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
}
.pd-input:focus {
  border-bottom-color: #444;
  background: #0e0e0e;
}
.pd-input::placeholder {
  color: #1a1a1a;
}

.pd-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
  color: #777;
  font-size: 0.78rem;
  margin-right: 0.8em;
  padding: 0.2em 0;
}

.pd-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 1px solid #333;
  background: #0e0e0e;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.pd-checkbox:checked {
  border-color: #555;
  background: #1a1a1a;
}
.pd-checkbox:checked::after {
  content: '\00d7';
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 11px;
  color: #888;
}

.pd-clear {
  display: inline-block;
  margin-top: 1.4em;
  padding: 0.35em 1em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333;
  background: transparent;
  border: 1px solid #1a1a1a;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.pd-clear:hover {
  color: #666;
  border-color: #333;
}

/* Mobile */
@media (max-width: 600px) {
  .pd-panel {
    padding: 1.2em 1em;
  }
  .pd-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2em;
    margin: 0.8em 0;
  }
  .pd-label {
    font-size: 0.7rem;
    color: #444;
    margin-bottom: 0.1em;
    white-space: normal;
    flex-shrink: 1;
  }
  .pd-input {
    width: 100%;
    flex: none;
    padding: 0.6em 0.7em;
  }
}
