/* ══════════════════════════════════════
   CLIENT PORTAL — Requests Styles
   Split-pane, form, list, detail, messages
   ══════════════════════════════════════ */

/* ── Requests split-pane layout ── */
.pd-requests-split {
  display: flex;
  height: 100%;
  min-height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.pd-requests-sidebar {
  width: 260px;
  min-width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.pd-new-request-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--ll-gold), var(--ll-amber));
  color: #111;
  font-family: "Share Tech Mono", monospace;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.pd-new-request-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.pd-new-request-btn .material-symbols-outlined {
  font-size: 20px;
}

.pd-requests-list {
  flex: 1;
  overflow-y: auto;
}

.pd-requests-viewer {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Request form ── */
.pd-requests-form {
  width: 100%;
  padding: 32px;
  align-self: flex-start;
}

.pd-form-heading {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 24px;
}

.pd-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.pd-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-form-field--grow {
  flex: 1;
  min-width: 0;
}

.pd-form-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pd-input,
.pd-select,
.pd-textarea {
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.pd-input:focus,
.pd-select:focus,
.pd-textarea:focus {
  border-color: rgba(255, 180, 0, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.pd-input::placeholder,
.pd-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.pd-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.pd-select option {
  background: #1a1a1e;
  color: #fff;
}

.pd-textarea {
  resize: vertical;
  min-height: 120px;
}

.pd-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.pd-form-cancel {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.pd-form-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.pd-form-submit {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--ll-gold), var(--ll-amber));
  color: #111;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
}

.pd-form-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ── Request list rows ── */
.req-row {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.15s;
}

.req-row:hover {
  background: rgba(255, 180, 0, 0.04);
}

.req-row--active {
  background: rgba(255, 180, 0, 0.08);
  border-left: 3px solid var(--ll-gold);
  padding-left: 13px;
}

.req-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.req-row__title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.req-row__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.req-row__type {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

.req-row__badge {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.req-row__badge--low {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.req-row__badge--medium {
  color: var(--ll-amber);
  background: rgba(255, 180, 0, 0.10);
}

.req-row__badge--high {
  color: #ff8a65;
  background: rgba(255, 138, 101, 0.12);
}

.req-row__badge--urgent {
  color: #ef5350;
  background: rgba(239, 83, 80, 0.12);
}

.req-row__status {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.req-row__status--pending     { color: rgba(255, 255, 255, 0.4); }
.req-row__status--in_progress { color: var(--ll-amber); }
.req-row__status--completed   { color: #90caf9; }

/* ── Request detail view ── */
.pd-request-detail {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  align-self: stretch;
}

.req-detail-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.req-detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.req-detail-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.req-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.req-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.req-detail-meta-item .material-symbols-outlined {
  font-size: 18px;
  color: rgba(255, 180, 0, 0.4);
}

/* ── Message thread ── */
.req-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.req-msg {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 12px;
}

.req-msg--client {
  align-self: flex-end;
  background: rgba(255, 180, 0, 0.08);
  border: 1px solid rgba(255, 180, 0, 0.15);
}

.req-msg--admin {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.req-msg__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.req-msg__author {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  color: var(--ll-amber);
  font-weight: 600;
}

.req-msg--admin .req-msg__author {
  color: #90caf9;
}

.req-msg__time {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
}

.req-msg__text {
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  white-space: pre-wrap;
}

.req-msg-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.25);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.9rem;
  padding: 40px 0;
}

/* ── Compose bar ── */
.req-compose {
  display: flex;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  align-items: flex-end;
}

.req-compose-input {
  flex: 1;
  min-height: 42px;
  resize: none;
}

.req-compose-send {
  padding: 10px 14px;
  min-width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.req-compose-send .material-symbols-outlined {
  font-size: 20px;
}

/* ── Small empty state for sidebar ── */
.pd-empty-tab--sm {
  padding: 30px 12px;
}

.pd-empty-tab--sm .material-symbols-outlined {
  font-size: 36px;
}

.pd-empty-tab--sm p {
  font-size: 0.85rem;
}

/* ── Mobile overrides ── */
@media (max-width: 768px) {
  .pd-requests-split {
    flex-direction: column;
  }
  .pd-requests-sidebar {
    width: 100%;
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .pd-form-row {
    flex-direction: column;
  }
  .pd-requests-form {
    padding: 20px 16px;
  }
}
