/* ===== Pro Tier Styles ===== */

/* ─── Account button ─────────────────────────────────────── */
#nav-account {
  font-weight: 500;
}
#nav-account.logged-in {
  color: var(--accent);
}

/* ─── Account panel ──────────────────────────────────────── */
.account-panel {
  position: fixed;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  min-width: 240px;
  max-width: 320px;
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.account-header strong {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-plan {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.plan-free { background: #333; color: var(--text-dim); }
.plan-pro { background: #1a3a5c; color: #4f9eff; }
.plan-enterprise { background: #3a2a1a; color: #ffb74d; }

.account-org {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 0.1rem;
}
.account-role {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: capitalize;
  margin-bottom: 0.6rem;
}

.account-actions a {
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.3rem 0;
}
.account-actions a:hover { text-decoration: underline; }

/* ─── Cloud scripts panel ────────────────────────────────── */
.cloud-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 0;
}

.cloud-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.cloud-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.cloud-sync-status {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.cloud-sync-status.local { background: #333; color: var(--text-dim); }
.cloud-sync-status.synced { background: #1a3a1a; color: #4caf50; }
.cloud-sync-status.dirty { background: #3a2a1a; color: #ff9800; }

.cloud-actions {
  margin-left: auto;
  display: flex;
  gap: 0.3rem;
}

.cloud-list {
  max-height: 180px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cloud-list::-webkit-scrollbar { width: 4px; }
.cloud-list::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.cloud-empty {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
}

.cloud-script-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s;
  gap: 0.5rem;
}
.cloud-script-item:hover { background: rgba(255,255,255,0.04); }
.cloud-script-item.active {
  background: var(--highlight);
  border-left: 2px solid var(--accent);
}

.cloud-script-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cloud-script-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cloud-script-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.cloud-script-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.cloud-script-item:hover .cloud-script-actions { opacity: 1; }
.cloud-script-item.active .cloud-script-actions { opacity: 1; }

.cloud-script-actions .btn { font-size: 0.72rem; padding: 2px 8px; }
.cloud-btn-delete:hover {
  background: #5c2020 !important;
  color: #e57373 !important;
  border-color: #5c2020 !important;
}

.cloud-status-msg {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-top: 0.3rem;
}

/* ─── Import section ─────────────────────────────────────── */
.cloud-import-section {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}
.cloud-import-header {
  margin-bottom: 0.4rem;
}

.drive-connect-btn {
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
  background: #1a3352;
  border-color: #2a5080;
  color: #7cb8f0;
}
.drive-connect-btn:hover {
  background: #244068 !important;
  border-color: #4f9eff !important;
}

.drive-search {
  margin-bottom: 0.4rem;
}
.drive-search-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  font-family: var(--font-sans);
}
.drive-search-input:focus { border-color: var(--accent); }
.drive-search-input::placeholder { color: #444; }

.url-import {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.url-import-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  font-family: var(--font-sans);
}
.url-import-input:focus { border-color: var(--accent); }
.url-import-input::placeholder { color: #444; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .cloud-header { flex-direction: column; align-items: flex-start; }
  .cloud-actions { margin-left: 0; width: 100%; }
  .cloud-script-actions { opacity: 1; }
  .account-panel { left: 1rem; right: 1rem; max-width: none; }
}
