/* ================= ROOT LAYOUT ================= */

:host {
  display: block;
  min-height: 100vh;
  background: #f8fafc;
  padding: 28px;
  font-family: Inter, Arial, sans-serif;
}
/* ================= DRAWER CONTAINER ================= */
/* ================= HEADERS ================= */

.headers-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-card {

  border: 1px solid #e2e8f0;

  border-radius: 10px;

  padding: 14px;

  background: #f8fafc;
}

.header-key {

  font-weight: 600;

  margin-bottom: 10px;

  color: #0f172a;
}

.header-input {

  width: 100%;

  border: 1px solid #cbd5e1;

  border-radius: 8px;

  padding: 10px;

  font-size: 14px;
}

.login-textarea {

  width: 100%;

  min-height: 240px;

  resize: vertical;

  border: 1px solid #cbd5e1;

  border-radius: 8px;

  padding: 14px;

  font-family: monospace;

  font-size: 13px;

  background: #ffffff;

  line-height: 1.5;
}
.drawer-container {
  position: relative;

  padding: 28px;

  height: 90vh;

  min-height: 600px;

  overflow: auto;

  resize: both;

  background: #ffffff;

  border-radius: 12px;
}

/* FULLSCREEN MODE */

.drawer-container.expanded {
  position: fixed;

  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;

  width: auto;
  height: auto;

  z-index: 9999;

  background: white;

  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* EXPAND BUTTON */

.expand-btn {
  position: absolute;

  top: 16px;
  right: 16px;

  z-index: 10;
}

/* RESIZE HANDLE */

.resize-handle {
  position: absolute;

  width: 18px;
  height: 18px;

  right: 4px;
  bottom: 4px;

  cursor: nwse-resize;

  background:
    linear-gradient(
      135deg,
      transparent 0%,
      transparent 40%,
      #94a3b8 40%,
      #94a3b8 60%,
      transparent 60%,
      transparent 100%
    );
}

/* TAB FIX */

.mat-mdc-tab-body-wrapper {
  overflow: auto !important;
  height: 100%;
}

/* TRY BODY FIX */

.try-body {
  min-height: 500px;
}

/* RESPONSE FIX */

.response-content {
  overflow: auto;
  max-height: 70vh;
}

/* MOBILE */

@media (max-width: 768px) {

  .drawer-container {
    resize: none;
    height: auto;
  }

}
.container {
  background: transparent; 
}


/* ================= METADATA CARD ================= */

.meta-card {
  padding: 22px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.label {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.value {
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
}


/* ================= INTERFACE CARDS ================= */

.section h3 {
  margin-bottom: 14px;
  color: #0f172a;
}

.iface-card {
  margin-bottom: 14px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.iface-card:hover {
  border: 1px solid #6366f1;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

.iface-card.deprecated {
  opacity: 0.55;
}

.row {
  display: flex;
  align-items: center;
  gap: 16px;
}


/* ================= METHOD BADGES ================= */

.method {
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.3px;
}

.method-get { background: #16a34a; }
.method-post { background: #2563eb; }
.method-put { background: #d97706; }
.method-delete { background: #dc2626; }

.content .name {
  font-weight: 600;
  color: #0f172a;
}

.path {
  font-family: monospace;
  font-size: 13px;
  color: #64748b;
}


/* ================= DRAWER ================= */

/* ================= DRAWER CONTAINER ================= */

.drawer-container {

  position: relative;

  padding: 28px;

  width: 100%;
  height: 90vh;

  overflow: auto;

  background: #ffffff;

  border-radius: 12px;

  transition: all 0.3s ease;
}

/* ================= FULLSCREEN ================= */

.drawer-container.expanded {

  position: fixed !important;

  top: 0 !important;
  left: 0 !important;

  width: 100vw !important;
  height: 100vh !important;

  z-index: 99999 !important;

  background: #ffffff !important;

  border-radius: 0 !important;

  padding: 24px;

  overflow: auto;
}

/* ================= EXPAND BUTTON ================= */

.expand-btn {

  position: absolute;

  top: 16px;
  right: 16px;

  z-index: 100000;
}

/* ================= TAB FIX ================= */

.mat-mdc-tab-body-wrapper {
  height: calc(100vh - 220px);
  overflow: auto !important;
}

/* ================= RESPONSE FIX ================= */

pre {
  max-height: 70vh;
  overflow: auto;
}

/* ================= HEADER ================= */

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-btn {
  margin-left: auto;
}

.title {
  margin: 14px 0 10px;
  font-weight: 600;
  font-size: 20px;
  color: #0f172a;
}


/* ================= METHOD TAG ================= */

.method-badge {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.method-badge.POST {
  background: #dbeafe;
  color: #2563eb;
}

.method-badge.GET {
  background: #dcfce7;
  color: #16a34a;
}

.method-badge.PUT {
  background: #fef3c7;
  color: #b45309;
}

.method-badge.DELETE {
  background: #fee2e2;
  color: #dc2626;
}


/* ================= SPEC BADGE ================= */

.spec-badge {
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  background: #f8fafc;
  color: #475569;
}


/* ================= PATH BOX ================= */

.path-box {
  background: #f1f5f9;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: monospace;
  margin-bottom: 12px;
  font-size: 13px;
  color: #334155;
}


/* ================= DESCRIPTION ================= */

.description {
  color: #64748b;
  margin-bottom: 18px;
  line-height: 1.5;
}


/* ================= ACTION BUTTONS ================= */

.action-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.action-buttons button {
  border-radius: 8px;
}


/* ================= VIEW TOGGLE ================= */

.view-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.view-toggle button.active {
  background: #e2e8f0;
  border-radius: 6px;
  font-weight: 600;
}


/* ================= CODE BLOCK ================= */

.code-wrapper {
  position: relative;
  margin-top: 12px;
}

.copy-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #94a3b8;
}

pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,0.1);
}


/* ================= HEADERS ================= */

.header-row {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
}

.header-desc {
  font-size: 12px;
  color: #64748b;
}

.empty-text {
  color: #94a3b8;
  padding: 20px;
  text-align: center;
}
.schema-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.schema-table th,
.schema-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.type {
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.required {
  background: #dbeafe;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}
/* ===== SCHEMA CLEAN DESIGN ===== */

.schema-section {
  margin-top: 16px;
}

.schema-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: #0f172a;
}

.schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.schema-table th {
  text-align: left;
  padding: 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.schema-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.type {
  background: #e2e8f0;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.required {
  background: #dbeafe;
  color: #2563eb;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.try-container {
  padding: 16px;
}

/* HEADER */
.try-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.badge-mode,
.badge-env {
  background: #f1f5f9;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-right: 6px;
}

/* ENDPOINT */
.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
}

.endpoint .method-post {
  background: #dbeafe;
  color: #2563eb;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.endpoint .path {
  font-family: monospace;
}

/* BODY GRID */
/* ================= TRY IT RESPONSE IMPROVEMENTS ================= */

/* Responsive split layout */
.try-body {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.4fr);
  gap: 18px;
  align-items: start;
}

/* Better response container */
.box.response-box {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: 70vh;
}

/* Sticky response header */
.box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

/* Expandable / scrollable response */
.response-content {
  flex: 1;
  overflow: auto;
  border-radius: 8px;
  background: #0f172a;
  position: relative;
}

/* Compressed JSON view */
.response-content pre {
  margin: 0;
  min-height: 320px;
  max-height: 100%;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  padding: 16px;
  color: #e2e8f0;
}

/* Error response styling */
.error-response {
  background: #7f1d1d;
  color: #fee2e2;
  border-left: 4px solid #ef4444;
}

/* Empty response */
.empty {
  color: #94a3b8;
  font-size: 13px;
  padding: 28px;
  text-align: center;
}

/* Request textarea improved */
textarea {
  width: 100%;
  min-height: 320px;
  max-height: 70vh;
  resize: vertical;
  border: none;
  outline: none;
  font-family: monospace;
  font-size: 13px;
  background: #f8fafc;
  padding: 14px;
  border-radius: 8px;
  line-height: 1.5;
}

/* Response actions */
.response-actions {
  display: flex;
  gap: 8px;
}

.response-actions button {
  color: #64748b;
}

/* Mobile responsive */
@media (max-width: 1024px) {
  .try-body {
    grid-template-columns: 1fr;
  }

  .box.response-box,
  textarea,
  .response-content pre {
    min-height: 260px;
  }
}
.endpoint-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.query-editors {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.query-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.query-box label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.query-box input {
  width: 120px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  background: white;
}

.query-box input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.1);
}