/* Plane Jira Git Development Integration Styles */

/* -------------------------------------------------------------
 * 1. Project Settings Card
 * ------------------------------------------------------------- */
#plane-jira-git-settings {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-body, "Inter Variable", system-ui, sans-serif);
}

.jira-git-card {
  background-color: var(--bg-surface-1, #131517);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

[data-theme="light"] .jira-git-card {
  background-color: #ffffff;
  border-color: #e2e8f0;
}

.jira-git-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.jira-git-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--txt-primary, #f8fafc);
}

[data-theme="light"] .jira-git-title {
  color: #0f172a;
}

.jira-git-badge-connected {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.jira-git-badge-disconnected {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.jira-git-input {
  width: 100%;
  background-color: var(--bg-surface-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--txt-primary, #fff);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="light"] .jira-git-input {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.jira-git-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
}

.jira-git-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.jira-git-btn-primary {
  background-color: #0284c7;
  color: #ffffff;
}

.jira-git-btn-primary:hover {
  background-color: #0369a1;
}

.jira-git-btn-secondary {
  background-color: transparent;
  border-color: var(--border-subtle, rgba(255, 255, 255, 0.15));
  color: var(--txt-secondary, #cbd5e1);
}

[data-theme="light"] .jira-git-btn-secondary {
  border-color: #cbd5e1;
  color: #334155;
}

.jira-git-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .jira-git-btn-secondary:hover {
  background-color: #f1f5f9;
}

.jira-git-btn-danger {
  background-color: transparent;
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.jira-git-btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.1);
}

.jira-git-btn-github {
  background-color: #24292f;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
}

.jira-git-btn-github:hover {
  background-color: #1b1f23;
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

/* -------------------------------------------------------------
 * 2. Jira-Grade Development Sidebar Section
 * ------------------------------------------------------------- */
#plane-jira-git-sidebar-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle-1, rgba(255, 255, 255, 0.08));
  font-family: var(--font-body, "Inter Variable", system-ui, sans-serif);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

[data-theme="light"] #plane-jira-git-sidebar-panel {
  border-top-color: #e2e8f0;
}

.jira-git-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.jira-git-sidebar-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.jira-git-sidebar-icon {
  width: 14px;
  height: 14px;
  color: #38bdf8;
  flex-shrink: 0;
}

.jira-git-sidebar-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--txt-primary, #f8fafc);
  letter-spacing: -0.01em;
}

[data-theme="light"] .jira-git-sidebar-title {
  color: #0f172a;
}

.jira-git-count-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.08rem 0.45rem;
  border-radius: 9999px;
  background-color: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.jira-git-create-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 0.25rem;
  background-color: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
}

.jira-git-create-trigger-btn:hover {
  background-color: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
}

.jira-git-repo-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--txt-secondary, #94a3b8);
  padding: 0.25rem 0.35rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.25rem;
}

[data-theme="light"] .jira-git-repo-info-row {
  background: #f8fafc;
  color: #64748b;
}

.jira-git-repo-link {
  color: #38bdf8;
  font-family: var(--font-code, monospace);
  text-decoration: none;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.jira-git-repo-link:hover {
  text-decoration: underline;
}

/* Branch Cards List */
.jira-git-branch-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jira-git-branch-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  background-color: var(--bg-surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

[data-theme="light"] .jira-git-branch-card {
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

.jira-git-branch-card:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.3);
}

[data-theme="light"] .jira-git-branch-card:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.jira-git-branch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.jira-git-branch-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.jira-git-branch-link {
  font-family: var(--font-code, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--txt-primary, #f8fafc);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="light"] .jira-git-branch-link {
  color: #0f172a;
}

.jira-git-branch-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.jira-git-branch-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.jira-git-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.6875rem;
  border-radius: 0.25rem;
  background: transparent;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--txt-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="light"] .jira-git-tool-btn {
  border-color: #cbd5e1;
  color: #475569;
}

.jira-git-tool-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

[data-theme="light"] .jira-git-tool-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.jira-git-tool-btn.jira-git-copied {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.jira-git-empty-box {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border: 1px dashed var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 0.375rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

[data-theme="light"] .jira-git-empty-box {
  border-color: #cbd5e1;
  background-color: #fcfcfc;
}

.jira-git-empty-text {
  font-size: 0.75rem;
  color: var(--txt-secondary, #94a3b8);
}

[data-theme="light"] .jira-git-empty-text {
  color: #64748b;
}

/* -------------------------------------------------------------
 * 3. Create Git Branch Modal Dialog
 * ------------------------------------------------------------- */
.jira-git-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  padding: 1rem;
  animation: jiraFadeIn 0.15s ease-out;
}

@keyframes jiraFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.jira-git-modal-box {
  position: relative;
  width: 100%;
  max-width: 36rem;
  background-color: #17191d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  color: #f8fafc;
  max-height: 92vh;
  overflow-y: auto;
  animation: jiraScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .jira-git-modal-box {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}

@keyframes jiraScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.jira-git-prefix-pills {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.jira-git-pill {
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  font-family: var(--font-code, monospace);
  font-weight: 500;
  border-radius: 0.25rem;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  background: var(--bg-surface-2, rgba(255, 255, 255, 0.04));
  color: var(--txt-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.12s ease;
}

[data-theme="light"] .jira-git-pill {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569;
}

.jira-git-pill:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

.jira-git-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

.jira-git-cmd-box {
  padding: 0.625rem 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.375rem;
  font-family: var(--font-code, monospace);
  font-size: 0.75rem;
  color: #34d399;
  overflow-x: auto;
  white-space: nowrap;
}

[data-theme="light"] .jira-git-cmd-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #059669;
}

/* -------------------------------------------------------------
 * 4. Toasts
 * ------------------------------------------------------------- */
.jira-git-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000000;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background-color: #1e2227;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-size: 0.8125rem;
  font-weight: 500;
  animation: jiraToastIn 0.2s ease-out;
}

@keyframes jiraToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
