/* Developer portal — Windows 7 Aero (extends styles.css) */

/* Use same window shell as home: .page centering + topbar drag (see developers.js) */
body.dev-body {
  overflow: hidden;
  height: 100vh;
}

.dev-page--compact {
  width: min(560px, 94vw);
  height: min(520px, 70vh);
}

.dev-chrome {
  min-height: 0;
}

.dev-content {
  padding: 18px 20px 24px;
  overflow-y: auto;
  overflow-x: visible;
}

.account-card .dev-select-wrap {
  overflow: visible;
}

.dev-sidebar-hint {
  margin-top: auto;
  padding: 10px 8px 4px;
  font-size: 11px;
  color: #5a6d85;
  line-height: 1.45;
}

.dev-sidebar-hint code {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 1px 4px;
  border-radius: 2px;
  border: 1px solid #c0ccd8;
}

.dev-h1 {
  font-size: 20px;
  color: #003399;
  font-weight: normal;
  margin: 0 0 6px;
}

.dev-sub {
  font-size: 13px;
  color: #444;
  margin: 0 0 16px;
  line-height: 1.5;
}

.dev-sub a {
  color: var(--link);
}

.dev-app-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}

.dev-app-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(to bottom, #fbfcfe, #f0f5fb);
  border: 1px solid #d9e2f0;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dev-app-item:hover {
  transform: translateY(-1px);
  border-color: #9eb9d4;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.08), inset 0 1px 0 #fff;
}

.dev-app-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dev-app-avatar {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid #aebcd0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  object-fit: cover;
  flex-shrink: 0;
  background: #e8eef5;
}

.dev-app-item a.dev-app-name {
  color: #003399;
  font-weight: bold;
  text-decoration: none;
}

.dev-app-item a.dev-app-name:hover {
  text-decoration: underline;
}

.dev-app-item .btn {
  text-decoration: none !important;
}

.dev-app-meta {
  font-size: 11px;
  color: #5a6d85;
}

.dev-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dev-badge--bot {
  background: linear-gradient(to bottom, #eef4fc, #c2dcf7 50%, #b2d3f5);
  border: 1px solid #7da2ce;
  color: #1e395b;
  box-shadow: inset 0 0 1px #fff;
}

.dev-badge--verified {
  background: linear-gradient(to bottom, #f4fff4, #c8e6c9);
  border: 1px solid #6ea86e;
  color: #1b5e20;
}

.dev-pfp-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 10px 0 14px;
}

.dev-pfp-preview {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  border: 1px solid #aebcd0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 1px 3px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  background: #e8eef5;
}

.dev-pfp-controls {
  flex: 1;
  min-width: 0;
}

.dev-token-box {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.45;
  word-break: break-all;
  background: #f5f8fc;
  border: 1px solid #c0ccd8;
  border-radius: 3px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  color: #1e1e1e;
}

.dev-token-box:empty {
  display: none;
}

.dev-form-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 12px;
  color: #1e395b;
}

.dev-form-label:first-child {
  margin-top: 0;
}

.dev-perm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  margin: 10px 0 14px;
}

.dev-perm-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  margin: 0;
}

/* Windows 7 Aero checkboxes (matches ChatClient settings.qss) */
.dev-perm-grid input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid #8e8e8e;
  border-top-color: #777;
  border-left-color: #777;
  border-radius: 2px;
  background: linear-gradient(to bottom, #fefefe 0%, #f3f3f3 50%, #e8e8e8 100%);
  box-shadow: none;
  cursor: pointer;
  position: relative;
}

.dev-perm-grid input[type="checkbox"]:hover {
  border-color: #4d90c8;
  border-top-color: #3a7bb5;
  border-left-color: #3a7bb5;
  background: linear-gradient(to bottom, #daeeff 0%, #c8e6ff 50%, #aed5f7 100%);
}

.dev-perm-grid input[type="checkbox"]:checked {
  border-color: #2e7ec4;
  border-top-color: #1c6aaf;
  border-left-color: #1c6aaf;
  background: linear-gradient(to bottom, #89d2f7 0%, #4db8f0 45%, #1a9de0 46%, #0f7dbf 100%);
}

.dev-perm-grid input[type="checkbox"]:checked:hover {
  border-color: #1460a0;
  background: linear-gradient(to bottom, #a0dcff 0%, #62c8f7 45%, #28aae8 46%, #1890d0 100%);
}

.dev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dev-actions .btn {
  margin-right: 0;
}

.dev-sidebar .navlink.active:hover {
  background: linear-gradient(to bottom, #f2f7fd, #c2dcf7 50%, #b2d3f5 50%, #cce1f7);
  border: 1px solid #7da2ce;
  border-radius: 3px;
  box-shadow: inset 0 0 1px #fff;
}

.dev-content.view-tab-in {
  animation: tabFadeIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1) forwards;
}

.dev-oauth-actions {
  justify-content: center;
  align-items: stretch;
  margin-top: 14px;
}

.dev-oauth-btn {
  padding: 6px 18px !important;
  font-size: 12px !important;
  font-weight: normal !important;
  min-width: 100px;
  line-height: 1.25;
  margin-right: 0;
}

.dev-oauth-btn--primary {
  background: linear-gradient(to bottom, #eaf6fd, #d9f0fc 50%, #bee6fd 50%, #a7d9f5);
  border-color: #3c7fb1;
  box-shadow:
    inset 0 0 1px #fff,
    0 0 3px #bbdaf7;
}

.dev-oauth-btn--primary:hover {
  background: linear-gradient(to bottom, #f2f7fd, #d9f0fc 50%, #c5e8fc 50%, #a7d9f5);
}

.dev-empty {
  padding: 16px;
  text-align: center;
  color: #666;
  background: #fbfcfe;
  border: 1px dashed #c0ccd8;
  border-radius: 4px;
  margin-bottom: 12px;
}

.account-status--error {
  color: #b91c1c !important;
}

.account-status--ok {
  color: #2e7d32 !important;
}

.dev-client-id {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  background: #f0f4fa;
  padding: 2px 6px;
  border: 1px solid #d9e2f0;
  border-radius: 2px;
}

.dev-oauth-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: block;
}

.dev-hidden {
  display: none !important;
}

.dev-pfp-file {
  font-size: 11px;
  margin-top: 6px;
}

.dev-danger-card {
  border-color: #d4a0a0;
  background: linear-gradient(to bottom, #fffafa, #fff5f5);
}

.dev-danger-card .account-card-title {
  color: #8b1a1a;
}

/* Windows 7 Aero combo box (server picker) */
.dev-select-wrap {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 6px;
  overflow: visible;
}

.dev-server-select {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 26px;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 30px 4px 8px;
  font: 12px/18px 'Segoe UI', Tahoma, sans-serif;
  color: #1e1e1e;
  border: 1px solid #8e8e8e;
  border-top-color: #707070;
  border-left-color: #707070;
  border-bottom-color: #b0b0b0;
  border-right-color: #b0b0b0;
  border-radius: 3px;
  background: linear-gradient(to bottom, #fefefe 0%, #f6f6f6 45%, #ececec 46%, #e4e4e4 100%);
  box-shadow: inset 0 1px 0 #fff;
  cursor: pointer;
  outline: none;
  vertical-align: middle;
}

.dev-select-arrow {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 24px;
  height: auto;
  pointer-events: none;
  border-left: 1px solid #a8b8c8;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(to bottom, #fbfdff 0%, #e8f2fa 45%, #d4e6f6 46%, #c5ddf2 100%);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.7);
}

.dev-select-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin-top: 1px;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #1e395b;
}

.dev-server-select:hover:not(:disabled) {
  border-color: #4d90c8;
  border-top-color: #3a7bb5;
  border-left-color: #3a7bb5;
  background: linear-gradient(to bottom, #f8fcff 0%, #eef7ff 45%, #dceefb 46%, #cfe6f9 100%);
}

.dev-server-select:focus:not(:disabled) {
  border-color: #2e7ec4;
  border-top-color: #1c6aaf;
  border-left-color: #1c6aaf;
  box-shadow:
    inset 0 1px 0 #fff,
    0 0 0 2px rgba(110, 168, 216, 0.28);
}

.dev-select-wrap:focus-within .dev-select-arrow {
  border-left-color: #7da2ce;
  background: linear-gradient(to bottom, #f8fcff 0%, #dceefb 45%, #c5ddf2 46%, #b2d3f5 100%);
}

.dev-server-select:disabled {
  color: #888;
  cursor: not-allowed;
  background: linear-gradient(to bottom, #f5f5f5 0%, #ebebeb 100%);
}

.dev-server-select option {
  background: #f7fbff;
  color: #111;
  padding: 4px 8px;
}

.dev-server-select option:checked {
  background: linear-gradient(to bottom, #e8f4fc, #cde6fb);
  color: #111;
}

@media (max-width: 800px) {
  .dev-chrome {
    flex-direction: column;
  }

  .dev-sidebar {
    width: auto;
    border-right: 0;
    border-bottom: 1px solid #aebcd0;
  }

  .dev-perm-grid {
    grid-template-columns: 1fr;
  }
}
