/* SharpDev — Shared Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #e1e1e1;
  min-height: 100vh;
}

a { color: #66aaff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Shared Nav ---- */
.sd-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: #111; border-bottom: 1px solid #222;
  position: relative;
}
.sd-nav-brand {
  font-size: 26px; font-weight: 800; color: #fff;
  text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px;
  letter-spacing: -0.5px;
}
.sd-nav-brand:hover { text-decoration: none; color: #fff; }
.sd-nav-brand .accent { color: #ff4444; }
.sd-nav-logo {
  width: 30px; height: 30px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.sd-nav-brand:hover .sd-nav-logo { transform: scale(1.08); }

.sd-nav-toggle {
  display: none;
  background: transparent; border: 1px solid #2a2a2a; color: #ccc;
  padding: 6px 10px; border-radius: 6px; cursor: pointer;
}
.sd-nav-toggle:hover { border-color: #ff4444; color: #fff; }

.sd-nav-links {
  display: flex; align-items: center; gap: 6px;
}
.sd-nav-link {
  color: #aaa; font-size: 14px; font-weight: 500; text-decoration: none;
  padding: 8px 12px; border-radius: 6px; transition: all 0.15s;
}
.sd-nav-link:hover { color: #fff; background: #1a1a1a; text-decoration: none; }
.sd-nav-link.active { color: #ff4444; }

/* Dropdown */
.sd-dropdown { position: relative; }
.sd-dropdown-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none;
  color: #aaa; font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.sd-dropdown-toggle:hover { color: #fff; background: #1a1a1a; }
.sd-dropdown-toggle svg { opacity: 0.7; transition: transform 0.15s; }
.sd-dropdown.active .sd-dropdown-toggle { color: #ff4444; }

.sd-dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 220px;
  background: #161616; border: 1px solid #2a2a2a; border-radius: 10px;
  padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0s linear 0.15s;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.sd-dropdown-menu a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: #bbb; font-size: 13px; text-decoration: none; transition: all 0.12s;
}
.sd-dropdown-menu a:hover {
  background: #1f1f1f; color: #fff; text-decoration: none;
}
.sd-dropdown-menu a.active { color: #ff4444; background: #1a1a1a; }

/* Desktop: hover */
@media (min-width: 901px) {
  .sd-dropdown:hover .sd-dropdown-menu,
  .sd-dropdown:focus-within .sd-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
    transition-delay: 0s;
  }
  .sd-dropdown:hover .sd-dropdown-toggle svg { transform: rotate(180deg); }
}

/* Mobile: click-toggle via .open */
.sd-dropdown.open .sd-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition-delay: 0s;
}
.sd-dropdown.open .sd-dropdown-toggle svg { transform: rotate(180deg); }

/* ---- In-Nav Action Bar (centered pills inside the nav) ---- */
.sd-nav-actions {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 5;
}
.sd-nav-actions .coffee-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: #141414; border: 1px solid #262626;
  color: #aaa; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all 0.15s;
  white-space: nowrap;
}
.sd-nav-actions .coffee-btn:hover {
  border-color: #ffce3a; color: #fff; background: #1a1a1a;
  text-decoration: none;
}
.sd-nav-actions .coffee-btn .coffee-icon { color: #ffce3a; }
.sd-nav-actions .sd-request-details {
  position: static;
}
.sd-nav-actions .sd-request-details summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: #141414; border: 1px solid #262626;
  color: #aaa; font-size: 13px; font-weight: 500;
  transition: all 0.15s; white-space: nowrap;
}
.sd-nav-actions .sd-request-details summary::-webkit-details-marker { display: none; }
.sd-nav-actions .sd-request-details summary:hover {
  border-color: #ff4444; color: #fff; background: #1a1a1a;
}
.sd-nav-actions .sd-request-details summary .arrow {
  color: #ff4444; transition: transform 0.2s;
}
.sd-nav-actions .sd-request-details[open] summary .arrow { transform: rotate(90deg); }
/* Short text hidden by default (desktop shows the long friendly version) */
.sd-req-short { display: none; }
.sd-nav-actions .sd-request-details[open] summary {
  border-color: #ff4444; color: #fff;
  border-radius: 999px;
}
.sd-nav-actions .sd-request-card {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  max-width: calc(100vw - 40px);
  background: #141414; border: 1px solid #ff4444; border-radius: 12px;
  padding: 22px;
  margin-top: 0;
  z-index: 100;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}

/* At 901–1100px the absolutely-positioned pills overlap brand+menu,
   so drop the action bar to its own row earlier than the rest of the nav. */
@media (max-width: 1100px) {
  .sd-nav-actions {
    position: static;
    transform: none;
    order: 1;
    flex-basis: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #222;
  }
  /* Swap to the short label so both pills fit side-by-side on one row */
  .sd-nav-actions .sd-req-long { display: none; }
  .sd-nav-actions .sd-req-short { display: inline; }
  .sd-nav-actions .sd-request-card {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 10px;
  }
}

/* ---- Shared Action Bar (Tip jar + Request a tool) ---- */
.sd-action-bar {
  max-width: 1280px; margin: 18px auto 28px; padding: 0 20px;
  display: flex; justify-content: center; align-items: flex-start;
  gap: 10px; flex-wrap: wrap;
}
.sd-action-bar .coffee-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: #141414; border: 1px solid #262626;
  color: #aaa; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all 0.15s;
  white-space: nowrap;
}
.sd-action-bar .coffee-btn:hover {
  border-color: #ffce3a; color: #fff; background: #1a1a1a;
  text-decoration: none;
}
.sd-action-bar .coffee-btn .coffee-icon { color: #ffce3a; }
.sd-request-details {
  display: inline-block; max-width: 600px;
  text-align: left;
}
.sd-request-details summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: #141414; border: 1px solid #262626;
  color: #aaa; font-size: 13px; font-weight: 500;
  transition: all 0.15s;
}
.sd-request-details summary::-webkit-details-marker { display: none; }
.sd-request-details summary:hover {
  border-color: #ff4444; color: #fff; background: #1a1a1a;
}
.sd-request-details summary .arrow {
  color: #ff4444; transition: transform 0.2s;
}
.sd-request-details[open] summary .arrow { transform: rotate(90deg); }
.sd-request-details[open] summary {
  border-color: #ff4444; color: #fff;
  border-radius: 12px 12px 0 0; border-bottom: none;
}
.sd-request-card {
  background: #141414; border: 1px solid #ff4444; border-radius: 0 12px 12px 12px;
  padding: 24px; margin-top: -1px;
}
.sd-request-form { display: flex; flex-direction: column; gap: 12px; }
.sd-request-form label {
  font-size: 12px; font-weight: 600; color: #aaa;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: -4px;
}
.sd-request-form .lead {
  color: #888; font-size: 13px; margin-bottom: 4px; line-height: 1.55;
}
.sd-request-form .optional {
  color: #555; font-weight: 400; text-transform: none; letter-spacing: 0;
}
.sd-request-form input, .sd-request-form textarea {
  width: 100%; background: #0d0d0d; border: 1px solid #2a2a2a;
  color: #e1e1e1; font-size: 14px; padding: 10px 12px; border-radius: 8px;
  font-family: inherit; outline: none; transition: border-color 0.15s;
}
.sd-request-form textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.sd-request-form input:focus, .sd-request-form textarea:focus { border-color: #ff4444; }
.sd-request-form button {
  align-self: flex-start; padding: 10px 22px; background: #cc0000;
  border: none; color: #fff; font-size: 14px; font-weight: 600;
  border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.sd-request-form button:hover { background: #ff1a1a; }
.sd-request-form button:disabled { background: #333; cursor: not-allowed; }
.sd-request-form .hint { font-size: 12px; color: #555; }
.sd-request-status {
  font-size: 13px; padding: 10px 12px; border-radius: 8px; display: none;
}
.sd-request-status.success {
  color: #4ade80; background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.sd-request-status.error {
  color: #f87171; background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* ---- Shared Footer ---- */
.sd-footer {
  text-align: center; padding: 32px 24px;
  border-top: 1px solid #1a1a1a; margin-top: 60px;
  font-size: 13px; color: #555;
}
.sd-footer a { color: #666; margin: 0 12px; }
.sd-footer a:hover { color: #aaa; }
.sd-footer .footer-links { margin-bottom: 8px; }
.sd-footer .footer-copy { color: #444; }

/* ---- Container ---- */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* ---- Card ---- */
.card {
  background: #141414; border: 1px solid #262626;
  border-radius: 12px; padding: 24px; margin-bottom: 20px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; color: #fff; font-size: 15px; font-weight: 600;
  border: none; border-radius: 8px; cursor: pointer; transition: all 0.2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #cc0000; }
.btn-primary:hover { background: #ff1a1a; }
.btn-secondary { background: #333; }
.btn-secondary:hover { background: #444; }
.btn:disabled { background: #222 !important; cursor: not-allowed; color: #555; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .sd-nav { padding: 12px 16px; flex-wrap: wrap; }
  .sd-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .sd-nav-links {
    display: none;
    flex-direction: column; align-items: stretch;
    width: 100%; gap: 2px; margin-top: 12px;
    padding-top: 12px; border-top: 1px solid #222;
  }
  .sd-nav-links.open { display: flex; }
  .sd-nav-link { padding: 10px 12px; }

  /* Pills inline break to their own row below brand+toggle, side-by-side */
  .sd-nav-actions {
    position: static;
    transform: none;
    order: 1;
    flex-basis: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #222;
  }
  /* Shrink the pills a touch so they comfortably fit next to each other */
  .sd-nav-actions .coffee-btn,
  .sd-nav-actions .sd-request-details summary {
    padding: 6px 12px;
    font-size: 12px;
  }
  .sd-nav-actions .sd-request-card {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 10px;
  }
  .sd-dropdown { width: 100%; }
  .sd-dropdown-toggle {
    width: 100%; justify-content: space-between;
    padding: 10px 12px;
  }
  .sd-dropdown-menu {
    position: static; min-width: 0;
    margin-top: 2px; margin-left: 12px;
    box-shadow: none; background: #0f0f0f;
    border-color: #1f1f1f;
    display: none;
  }
  .sd-dropdown.open .sd-dropdown-menu { display: block; }
  /* Disable hover-open on mobile */
  .sd-dropdown:not(.open) .sd-dropdown-menu {
    opacity: 0; visibility: hidden;
  }
  .sd-dropdown.open .sd-dropdown-menu {
    opacity: 1; visibility: visible;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 12px; }
}
