/* calllog.css — Local-only call log tool. Mobile-first, matches app theme. */

.calllog-tool-card {
  text-align: left;
  padding: 1.25rem 1rem;
}

.calllog-tool-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--ink);
  text-align: left;
}

.calllog-tool-card > p {
  text-align: left;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

.calllog-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.calllog-add-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.calllog-input {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.85rem 1rem;
  font-family: var(--inter);
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.calllog-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(36,35,49,.08);
}

.calllog-add-btn {
  width: 100%;
}

.calllog-search-wrap {
  position: relative;
  margin-bottom: 0.85rem;
}

.calllog-search-wrap svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.calllog-search-input {
  width: 100%;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  font-family: var(--inter);
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.calllog-search-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(36,35,49,.08);
}

.calllog-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.calllog-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.7rem 0.8rem;
  box-shadow: var(--shadow-sm);
}

.calllog-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(36,35,49,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.calllog-details {
  flex: 1;
  min-width: 0;
}

.calllog-label {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--serif);
}

.calllog-number {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  margin-top: 1px;
}

.calllog-call-btn {
  padding: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calllog-call-btn svg {
  width: 16px;
  height: 16px;
}

.calllog-delete-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}

.calllog-delete-btn:active {
  background: var(--red-d);
  border-color: rgba(179,38,30,.18);
  color: var(--red);
}

.calllog-delete-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.calllog-empty {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  padding: 1.5rem 0.5rem;
}

@media (min-width: 600px) {
  .calllog-add-row {
    flex-direction: row;
  }
  .calllog-input-tel {
    max-width: 220px;
  }
}

.calllog-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.calllog-header-row p {
  margin-top: 0.3rem;
}

.calllog-add-toggle-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(170,68,101,.18);
  transition: transform .15s, background .15s;
}

.calllog-add-toggle-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: transform .2s;
}

.calllog-add-toggle-btn:active { transform: scale(.94); }
.calllog-add-toggle-btn.open { background: var(--ink); }
.calllog-add-toggle-btn.open svg { transform: rotate(45deg); }

.calllog-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.9rem;
  margin-bottom: 1rem;
}

.calllog-form-actions { display: flex; gap: 0.5rem; }
.calllog-form-actions .ob-btn { padding: 0.75rem; font-size: 0.85rem; }

.ob-btn.secondary {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--ink);
  box-shadow: none;
}

.calllog-input.invalid {
  border-color: rgba(179,38,30,.45);
  box-shadow: 0 0 0 4px rgba(179,38,30,.06);
}

.calllog-input.valid {
  border-color: rgba(46,125,79,.5);
  box-shadow: 0 0 0 4px rgba(46,125,79,.06);
  border-width: 0.15rem;
}