/* ==========================================================================
   Shared Components: Buttons, Cards, Inputs, TabBar, Chips
   ========================================================================== */

/* Main Pill Action Button */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 56px;
  background-color: var(--color-dark-primary);
  color: var(--color-text-white);
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast);
}

.btn-primary:active {
  transform: scale(0.97);
  background-color: #000000;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  background-color: #FFFFFF;
  color: var(--color-dark-primary);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.btn-secondary:active {
  transform: scale(0.97);
  background-color: #F5F5F7;
}

/* White Standard Card */
.ui-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-card-border);
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

/* Lime Highlight Card */
.ui-card-lime {
  background: var(--color-brand-lime-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1.5px solid rgba(206, 253, 54, 0.5);
  box-shadow: 0 4px 20px rgba(206, 253, 54, 0.15);
}

/* Icon Box inside cards */
.icon-box-grey {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #F4F5F7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2C2C2E;
  flex-shrink: 0;
}

.icon-box-lime {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-brand-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  flex-shrink: 0;
  overflow: hidden;
}

.icon-box-lime img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Segmented Control Bar (日 | 周 | 月 | 年) */
.segmented-control {
  display: flex;
  background: #EBECEF;
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
  width: 100%;
  position: relative;
}

.segment-btn {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #717682;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}

.segment-btn.active {
  background: #FFFFFF;
  color: #0D0D0D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Bottom Tab Bar */
.app-tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-bar-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: 24px;
  z-index: 90;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #8E8E93;
  width: 68px;
  transition: color var(--transition-fast);
}

.tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.tab-label {
  font-size: 11px;
  font-weight: 500;
}

.tab-item.active {
  color: #0D0D0D;
}

.tab-item.active .tab-icon svg {
  fill: #0D0D0D;
}

/* Pulse animation for live timer / indicator */
@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 6px rgba(206, 253, 54, 0.8)); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-brand-lime);
  display: inline-block;
  animation: pulse-glow 2s infinite ease-in-out;
}
