/**
 * Timer Base Styles
 * 타이머 공통 레이아웃 및 리셋
 */

@layer timer.base {
  /* Timer namespace container */
  .dm-timer {
    /* Font family for timer components */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Reset for timer-specific elements */
    * {
      box-sizing: border-box;
    }
    
    /* Monospace font for time display */
    .timer-time,
    .timer-display,
    .mini-timer-display {
      font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
      font-variant-numeric: tabular-nums;
    }
  }
  
  /* Timer button base styles */
  .dm-timer .timer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--timer-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--timer-anim-duration) var(--timer-anim-timing);
    text-decoration: none;
    user-select: none;
    
    /* Focus styles */
    &:focus-visible {
      outline: 2px solid var(--timer-primary);
      outline-offset: 2px;
    }
    
    /* Disabled state */
    &:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      pointer-events: none;
    }
  }
  
  /* Timer input base styles */
  .dm-timer input,
  .dm-timer textarea {
    font-family: inherit;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--timer-radius-sm);
    background: var(--timer-glass);
    color: var(--timer-text-white);
    transition: all var(--timer-anim-duration) var(--timer-anim-timing);
    
    &:focus {
      outline: none;
      border-color: var(--timer-primary);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    &::placeholder {
      color: rgba(255, 255, 255, 0.6);
    }
  }
  
  /* Timer icon base styles */
  .dm-timer .timer-icon {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
  }
  
  /* Screen reader only content */
  .dm-timer .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* Timer Start Button (Dashboard) */
.dm-timer-button {
  width: 72px;
  height: 72px;
  border: 3px solid var(--dm-success, #10b981);
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
  border-radius: 20px;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
  position: relative;
  margin-right: 12px;
  flex-shrink: 0;
}

.dm-timer-button:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3);
  border-color: #059669;
  background: linear-gradient(135deg, #dcfce7, #f0fdf4);
}

/* Mobile responsive timer button */
@media (max-width: 768px) {
  .dm-timer-button {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}