/* Creative Focus Timer | Blauw Films */
/* A focus instrument for deep creative work */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');

* { box-sizing: border-box; }

.focus-timer-container {
  width: 100%;
  font-family: 'Roboto', sans-serif;
  background: #f9f9f9;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.focus-timer-wrapper {
  width: 100%;
  background: #ececec;
  border: 1px solid #dadada;
  border-radius: 1px;
  padding: 2rem;
}

.focus-timer-container .h4-rich-text-title {
  font-weight: 300;
  font-size: 1.5rem;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
  letter-spacing: -0.01em;
}

.focus-timer-container .rich-text-blauw-films {
  font-weight: 400;
  font-size: 0.875rem;
  color: #1a1a1a;
  line-height: 1.5;
}

.focus-timer-container .form-field {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem;
  border: 1px solid #dadada;
  border-radius: 1px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s ease;
}

.focus-timer-container .form-field:focus { border-color: #1451eb; }
.focus-timer-container .form-field::placeholder { color: #999; }

.focus-timer-container .dash_button {
  padding: 0.75rem 1.5rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  background: #1451eb;
  color: #fff;
  border: none;
  border-radius: 1px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.focus-timer-container .dash_button:hover { background: #112347; }
.focus-timer-container .dash_button:disabled { opacity: 0.5; cursor: not-allowed; }

.focus-timer-container .dash_button--secondary {
  background: transparent;
  color: #1a1a1a;
  border: 1px solid #dadada;
}

.focus-timer-container .dash_button--secondary:hover { background: #dadada; }

.focus-timer-container .dash_button--ghost {
  background: transparent;
  color: #1a1a1a;
  padding: 0.5rem;
  opacity: 0.6;
  border: none;
}

.focus-timer-container .dash_button--ghost:hover {
  background: transparent;
  opacity: 1;
}

.ft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.ft-header-title { margin: 0; }

.ft-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ft-mode-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.ft-mode-btn {
  padding: 0.5rem 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  color: #666;
  border: 1px solid transparent;
  border-radius: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ft-mode-btn:hover { color: #1a1a1a; }

.ft-mode-btn.active {
  background: #fff;
  color: #1a1a1a;
  border-color: #dadada;
}

.ft-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
}

.ft-timer-display {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.ft-timer-display.break-mode { color: #666; }

.ft-session-label {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 2rem;
}

.ft-active-task {
  font-size: 1rem;
  font-weight: 300;
  color: #666;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 1rem;
}

.ft-active-task-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  gap: 0.25rem;
}

.ft-task-time-remaining {
  font-size: 0.875rem;
  font-weight: 400;
  color: #999;
  font-variant-numeric: tabular-nums;
  min-height: 1.25em;
}

.ft-task-time-remaining:empty { display: none; }

.ft-controls {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.ft-control-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  opacity: 0.6;
}

.ft-control-btn:hover {
  opacity: 1;
  background: transparent;
}

.ft-control-btn svg {
  width: 2rem;
  height: 2rem;
  stroke: #1a1a1a;
}

.ft-control-btn--primary {
  width: 4.5rem;
  height: 4.5rem;
  background: #1451eb;
  opacity: 1;
}

.ft-control-btn--primary:hover { background: #112347; opacity: 1; }

.ft-control-btn--primary svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: #fff;
  stroke: none;
}

.ft-progress-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.ft-progress-ring { transform: rotate(-90deg) scaleX(-1); }
.ft-progress-ring-bg { fill: none; stroke: #e0e0e0; }

.ft-progress-ring-progress {
  fill: none;
  stroke: #1451eb;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.ft-progress-ring-progress.break-mode { stroke: #999; }

.ft-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #dadada;
}

.ft-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ft-section-title {
  font-weight: 300;
  font-size: 1rem;
  color: #1a1a1a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ft-task-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ft-task-input-row .form-field {
  flex: 1;
  min-width: 150px;
}

.ft-task-duration-input {
  width: 80px;
  min-width: 80px;
  flex: 0 0 auto;
}

.ft-task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ft-task-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #dadada;
  margin-bottom: 0.5rem;
  border-radius: 1px;
  cursor: grab;
  transition: all 0.2s ease;
}

.ft-task-item:hover { border-color: #1451eb; }
.ft-task-item.active { border-color: #1451eb; border-width: 2px; }
.ft-task-item.dragging { opacity: 0.5; cursor: grabbing; }
.ft-task-item.completed { opacity: 0.5; text-decoration: line-through; }

.ft-task-drag-handle {
  color: #ccc;
  cursor: grab;
  flex-shrink: 0;
}

.ft-task-content {
  flex: 1;
  min-width: 0;
}

.ft-task-name {
  font-size: 0.875rem;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-task-duration {
  font-size: 0.75rem;
  color: #999;
}

.ft-task-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.ft-task-action-btn {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  border-radius: 1px;
  transition: all 0.2s ease;
}

.ft-task-action-btn:hover {
  background: #f0f0f0;
  color: #1a1a1a;
}

.ft-task-action-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

.ft-break-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ft-settings { display: none; }
.ft-settings.open { display: block; }

.ft-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.ft-setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ft-setting-label {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ft-setting-input { width: 100%; }

.ft-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.ft-stat-card {
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 1px;
  padding: 1rem;
  text-align: center;
}

.ft-stat-value {
  font-size: 1.5rem;
  font-weight: 300;
  color: #1a1a1a;
  line-height: 1.2;
}

.ft-stat-label {
  font-size: 0.625rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.ft-fullscreen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #f9f9f9;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.ft-fullscreen-overlay.open { display: flex; }
.ft-fullscreen-overlay .ft-timer-display { font-size: clamp(6rem, 25vw, 16rem); }
.ft-fullscreen-overlay .ft-active-task { font-size: 1.25rem; }

.ft-fullscreen-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ft-fullscreen-overlay:hover .ft-fullscreen-controls { opacity: 1; }

.ft-fullscreen-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ft-fullscreen-overlay:hover .ft-fullscreen-close { opacity: 1; }

/* Fullscreen Breathing Mode */
.ft-fullscreen-breathe {
  display: none;
  flex-direction: column;
  align-items: center;
}

.ft-fullscreen-overlay.breathe-mode .ft-progress-container,
.ft-fullscreen-overlay.breathe-mode .ft-timer-display,
.ft-fullscreen-overlay.breathe-mode .ft-session-label,
.ft-fullscreen-overlay.breathe-mode .ft-active-task,
.ft-fullscreen-overlay.breathe-mode .ft-task-time-remaining {
  display: none;
}

.ft-fullscreen-overlay.breathe-mode .ft-fullscreen-breathe {
  display: flex;
}

.ft-breathe-container--large {
  width: 280px;
  height: 280px;
  margin-bottom: 2rem;
}

.ft-breathe-circle--large {
  width: 280px;
  height: 280px;
}

.ft-breathe-circle--large .ft-breathe-inner-circle {
  width: 50px;
  height: 50px;
}

.ft-breathe-circle--large .ft-breathe-inner-circle.inhale {
  animation: breatheInhaleLarge var(--inhale-duration, 4s) ease-in-out forwards;
}

.ft-breathe-circle--large .ft-breathe-inner-circle.hold-in {
  width: 272px;
  height: 272px;
}

.ft-breathe-circle--large .ft-breathe-inner-circle.exhale {
  animation: breatheExhaleLarge var(--exhale-duration, 8s) ease-in-out forwards;
}

.ft-breathe-circle--large .ft-breathe-inner-circle.hold-out {
  width: 50px;
  height: 50px;
}

@keyframes breatheInhaleLarge {
  0% { width: 50px; height: 50px; opacity: 0.15; }
  100% { width: 272px; height: 272px; opacity: 0.3; }
}

@keyframes breatheExhaleLarge {
  0% { width: 272px; height: 272px; opacity: 0.3; }
  100% { width: 50px; height: 50px; opacity: 0.15; }
}

.ft-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.ft-modal-overlay.open { display: flex; }

.ft-modal {
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 1px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.ft-modal-title {
  font-weight: 300;
  font-size: 1.25rem;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
}

.ft-modal-text {
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 1.5rem 0;
}

.ft-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.ft-empty-state {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.875rem;
}

.ft-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #dadada;
}

.ft-tab {
  padding: 0.75rem 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  color: #666;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -1px;
}

.ft-tab:hover { color: #1a1a1a; }

.ft-tab.active {
  color: #1a1a1a;
  border-bottom-color: #1451eb;
}

.ft-tab-content { display: none; }
.ft-tab-content.active { display: block; }

.ft-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #1a1a1a;
}

.ft-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #1451eb;
}

/* Breathing Exercise */
.ft-breathe-section { padding: 2rem 1rem 3rem; }

.ft-breathe-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 2rem;
}

.ft-breathe-circle {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ft-breathe-inner-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1451eb;
  opacity: 0.15;
  transition: all 0.3s ease;
}

.ft-breathe-inner-circle.inhale {
  animation: breatheInhale var(--inhale-duration, 4s) ease-in-out forwards;
}

.ft-breathe-inner-circle.hold-in {
  width: 192px;
  height: 192px;
  opacity: 0.3;
}

.ft-breathe-inner-circle.exhale {
  animation: breatheExhale var(--exhale-duration, 8s) ease-in-out forwards;
}

.ft-breathe-inner-circle.hold-out {
  width: 40px;
  height: 40px;
  opacity: 0.15;
}

@keyframes breatheInhale {
  0% { width: 40px; height: 40px; opacity: 0.15; }
  100% { width: 192px; height: 192px; opacity: 0.3; }
}

@keyframes breatheExhale {
  0% { width: 192px; height: 192px; opacity: 0.3; }
  100% { width: 40px; height: 40px; opacity: 0.15; }
}

.ft-breathe-instruction {
  font-size: 1.25rem;
  font-weight: 300;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  text-align: center;
  min-height: 1.5em;
  letter-spacing: 0.02em;
}

.ft-breathe-timer {
  font-size: 2.5rem;
  font-weight: 300;
  color: #666;
  margin-bottom: 2rem;
  font-variant-numeric: tabular-nums;
}

.ft-breathe-patterns {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ft-breathe-pattern-btn {
  padding: 0.5rem 1rem;
  font-family: 'Roboto', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  color: #666;
  border: 1px solid transparent;
  border-radius: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ft-breathe-pattern-btn:hover { color: #1a1a1a; }

.ft-breathe-pattern-btn.active {
  background: #fff;
  color: #1a1a1a;
  border-color: #dadada;
}

.ft-breathe-cycles {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 600px) {
  .focus-timer-wrapper { padding: 1.5rem 1rem; }
  .ft-header { flex-direction: column; align-items: flex-start; }
  .ft-mode-selector { width: 100%; justify-content: flex-start; }
  .ft-main { padding: 2rem 0.5rem; }
  .ft-timer-display { font-size: clamp(3rem, 20vw, 5rem); }
  .ft-task-input-row { flex-direction: column; }
  .ft-task-duration-input { width: 100%; }
  .ft-settings-grid { grid-template-columns: 1fr; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ft-breathe-inner-circle { animation: none !important; }
  .ft-breathe-inner-circle.inhale,
  .ft-breathe-inner-circle.hold-in { width: 192px; height: 192px; opacity: 0.3; }
  .ft-breathe-inner-circle.exhale,
  .ft-breathe-inner-circle.hold-out { width: 40px; height: 40px; opacity: 0.15; }
}

.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;
}
