@tailwind base;
@tailwind components;
@tailwind utilities;

/* Goal Form Priority & Horizon Bubble Styles */
/* Added by Cascade for interactive radio button labels */

/* Default (inactive) Priority Styles */
.priority-label.priority-urgent { @apply bg-red-600/50 border-red-400/50 text-white/50; }
.priority-label.priority-high { @apply bg-orange-600/50 border-orange-400/50 text-white/50; }
.priority-label.priority-medium { @apply bg-yellow-600/50 border-yellow-400/50 text-white/50; }
.priority-label.priority-low { @apply bg-green-600/50 border-green-400/50 text-white/50; }

/* Active Priority Styles (using :has()) */
.priority-label.priority-urgent:has(input[type="radio"]:checked) { @apply bg-red-600 border-red-400 text-white opacity-100; }
.priority-label.priority-high:has(input[type="radio"]:checked) { @apply bg-orange-600 border-orange-400 text-white opacity-100; }
.priority-label.priority-medium:has(input[type="radio"]:checked) { @apply bg-yellow-600 border-yellow-400 text-white opacity-100; }
.priority-label.priority-low:has(input[type="radio"]:checked) { @apply bg-green-600 border-green-400 text-white opacity-100; }

/* Default (inactive) Horizon Styles */
/* Applies to all classes like .horizon-label.horizon-immediate, .horizon-label.horizon-this-month */
.horizon-label[class*="horizon-"] { @apply bg-black/20 border-white/20 text-white opacity-70; }

/* Active Horizon Styles (using :has()) */
/* Applies to all classes like .horizon-label.horizon-immediate when their radio is checked */
.horizon-label[class*="horizon-"]:has(input[type="radio"]:checked) { @apply bg-green-600 border-green-400 text-white opacity-100; }


/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/

input, input:active, input:focus, textarea {
  outline: none;
  box-shadow: none;
}

table.schedule tr.current td {
  @apply font-bold text-white;
}

table.schedule .input-hour {
  @apply text-sm;
}

table.schedule tr.current .input-hour {
  @apply bg-black/40;
}

table.schedule .emotion .bi {
  @apply text-white/10 pl-1 text-lg;
  transition: all 200ms ease-in-out;
  cursor: pointer;
}

table.schedule .emotion .bi.h {
  @apply text-green-600;
}

table.schedule .emotion .bi.m {
  @apply text-yellow-600;
}

table.schedule .emotion .bi.d {
  @apply text-red-500;
}

.schedule-container {
  position: relative;
}

.schedule-container .pomodoro-marker {
  @apply bg-red-600;
  display: inline-block;
  position: absolute;
  width: 3px;
  left: 0;
  border-radius: 30%;
}

input[type='text'].t-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255, 0.3);
  box-shadow: none;
  outline: none;
  color: white;

  &:focus, &:active {
    border-bottom: 1px solid rgba(255,255,255, 1);
    outline: none;
    box-shadow: none;
  }
}

label {
  color: white;
}

.habit-icon {
  width: 28px;
  height: 28px;
  margin: 0.5rem;
  display: inline-block;
  opacity: 0.15;

  &.completed {
    opacity: 1;

  }

  &.completed.habit-1 {
    g {
      fill: #a7c957;
    }
  }

  &.completed.habit-2 {
    g {
      fill: #4cc9f0;
    }
  }

  &.completed.habit-3 {
    g {
      fill: #f72585;
    }
  }

  &.completed.habit-4 {
    g {
      fill: #ffd60a;
    }
  }

  &.completed.habit-5 {
    g {
      fill: #ccff33;
    }
  }

  &.completed.habit-6 {
    g {
      fill: #fff;
    }
  }

  &.completed.habit-7 {
    g {
      fill: #e0aaff;
    }
  }

  &.completed.habit-8 {
    g {
      fill: #ff5400;
    }
  }

  /* Sleep icons */
  &.completed.sleep-icon {
    g {
      fill: #1e40af; /* Darkish blue */
    }
  }

  &.completed.wakeup-icon {
    g {
      fill: #fbbf24; /* Sunny yellow */
    }
  }
}

/* Glassy Timeline Styles */
.glassy-timeline {
  position: relative;
  backdrop-filter: blur(20px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.timeline-track {
  position: relative;
  height: 40px;
  margin: 8px 16px;
  border-radius: 20px;
  background: linear-gradient(90deg, 
    rgba(16, 185, 129, 0.2) 0%, 
    rgba(16, 185, 129, 0.4) 50%, 
    rgba(16, 185, 129, 0.2) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 
    inset 0 2px 4px rgba(16, 185, 129, 0.1),
    0 2px 8px rgba(16, 185, 129, 0.2);
  overflow: hidden;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0) 100%);
  border-radius: 20px 20px 0 0;
}

.timeline-track.ideal {
  background: linear-gradient(90deg, 
    rgba(16, 185, 129, 0.3) 0%, 
    rgba(16, 185, 129, 0.5) 50%, 
    rgba(16, 185, 129, 0.3) 100%);
  border-color: rgba(16, 185, 129, 0.4);
}

.timeline-track.actual {
  background: linear-gradient(90deg, 
    rgba(59, 130, 246, 0.2) 0%, 
    rgba(59, 130, 246, 0.4) 50%, 
    rgba(59, 130, 246, 0.2) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 
    inset 0 2px 4px rgba(59, 130, 246, 0.1),
    0 2px 8px rgba(59, 130, 246, 0.2);
}

.timeline-item {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.2), 
    rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-size: 12px;
  color: white;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.timeline-item.sleep {
  background: linear-gradient(135deg, 
    rgba(147, 197, 253, 0.3), 
    rgba(147, 197, 253, 0.2));
  border-color: rgba(147, 197, 253, 0.4);
  box-shadow: 
    0 4px 16px rgba(147, 197, 253, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.timeline-item.work {
  background: linear-gradient(135deg, 
    rgba(239, 68, 68, 0.3), 
    rgba(239, 68, 68, 0.2));
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 
    0 4px 16px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.timeline-item.habit {
  background: linear-gradient(135deg, 
    rgba(168, 85, 247, 0.3), 
    rgba(168, 85, 247, 0.2));
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 
    0 4px 16px rgba(168, 85, 247, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.timeline-progress {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, 
    rgba(34, 197, 94, 0.6) 0%, 
    rgba(34, 197, 94, 0.8) 50%, 
    rgba(34, 197, 94, 0.6) 100%);
  border-radius: 20px;
  transition: width 0.5s ease;
  box-shadow: 
    0 0 20px rgba(34, 197, 94, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  margin-bottom: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.timeline-time-marker {
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 2px;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.8) 0%, 
    rgba(255, 255, 255, 0.4) 50%, 
    rgba(255, 255, 255, 0.8) 100%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  z-index: 10;
}

.timeline-container {
  position: relative;
  padding: 24px;
}

#week_habits {
  .habit-icon {
    width: 18px;
    height: 18px;
  }
}

#tasks {
  #attributes-bar {
    .when .date {
      @apply inline-flex items-center rounded-md bg-black bg-opacity-0 px-2 py-1 text-sm font-medium text-white/30;
      cursor: pointer;
      transition: all 300ms cubic-bezier( 0.165, 0.84, 0.44, 1 );
    }

    input[type='radio'] {
      width: 0;
      height: 0;
    }

    .when .date:hover {
      @apply text-white/70;
      font-size: 105%;
    }

    .when .date.active {
      @apply text-white/100;
        font-size: 110%;
    }

    .priority span {
      @apply ms-4 font-bold uppercase inline-flex items-center rounded-md bg-white/10 px-2 py-1 text-xs text-white/50;
      cursor: pointer;

      transition: all 300ms cubic-bezier( 0.165, 0.84, 0.44, 1 );
    }

    .priority .urgent:hover span {
      @apply bg-red-500/50 text-white/80;
    }

    .priority .urgent.active span {
      @apply bg-red-500 text-white;
    }

    .priority .high:hover span {
      @apply bg-orange-500/50 text-white/80;
    }

    .priority .high.active span {
      @apply bg-orange-600 text-white;
    }

    .priority .low:hover span {
      @apply bg-green-700/50 text-white/80;
    }

    .priority .low.active span {
      @apply bg-green-700 text-white;
    }
  }

  input#task_name, input#task_name:active, input#task_name:focus {
    outline: none;
    border: none;
    box-shadow: none;
    border-bottom: 1px solid rgba(255,255,255,0.4);
    font-size: 2rem;
    transition: all 300ms cubic-bezier( 0.165, 0.84, 0.44, 1 );
  }

  input#task_name:active, input#task_name:focus {
    border-bottom: 2px solid white;
  }

  input#task_name::placeholder {
    font-weight: 100;
  }

  select {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    color: white;
  }

  .tasks-list {
    @apply w-full text-white;
  }

  .tasks-list .task {
    @apply text-2xl my-4;
  }

  .tasks-list .task i.bi-square {
    margin-right: 0.125rem;
    margin-left: 0.25rem;
  }

  .tasks-list .task.completed {
    @apply text-white/40;
  }

  .tasks-list .task.completed .task-name {
    @apply line-through;
  }

  .tasks-list .task .task-project {
    @apply text-xs;
    color: white;
    padding: 3px 5px;
    margin-bottom: 2px;
  }

  .tasks-list .task.completed .task-project {
    opacity: 0.5;
    color: white;
  }

  .tasks-list .task .priority-marker {
    height: 1rem;
    width: 5px;
    border-radius: 3px;
  }

  .tasks-list .task.completed .priority-marker {
    opacity: 0.5;
  }

  .tasks-list .task .priority-marker.urgent {
    @apply bg-red-500;
  }

  .tasks-list .task .priority-marker.high {
    @apply bg-orange-500;
  }

  .tasks-list .task .priority-marker.low {
    @apply bg-green-700;
  }

  .task-tabs .tab {
    @apply text-2xl text-white/30 font-thin ps-2 me-8;
    transition: all 300ms cubic-bezier( 0.165, 0.84, 0.44, 1 );
  }

  .task-tabs .tab:hover {
    @apply text-3xl text-white/50;
  }

  .task-tabs .tab.active {
    @apply text-4xl text-white/60 font-thin ps-2;
  }

}

.button_to {
  display: inline-block;
}

#daily-review {
  
}

#daily-review .question {
  @apply text-3xl cursor-pointer;
}

#daily-review .question.checked {

  @apply line-through text-white/30;
}
/* Futuristic Timeline Styles */

.glow-green {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3), inset 0 0 20px rgba(34, 197, 94, 0.1);
}

.glow-yellow {
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.3), inset 0 0 20px rgba(234, 179, 8, 0.1);
}

.glow-orange {
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.3), inset 0 0 20px rgba(249, 115, 22, 0.1);
}

.glow-cyan {
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4), inset 0 0 25px rgba(6, 182, 212, 0.1);
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4), inset 0 0 25px rgba(6, 182, 212, 0.1);
  }
  50% {
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.6), inset 0 0 35px rgba(6, 182, 212, 0.2);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s infinite;
}

/* Hexagonal shape utilities */
.clip-path-hexagon {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

/* Progress rail enhancements */
.progress-rail {
  position: relative;
}

.progress-rail::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(6, 182, 212, 0.3) 50%, transparent 100%);
  z-index: 0;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */


.number {
  font-family: "IBM Plex Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

.percentage {
  font-family: "Rationale", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

.kanji {
  font-family: "Zen Maru Gothic", serif;
  /*font-family: "DotGothic16", sans-serif;*/
  font-weight: 400;
  font-style: normal;
}

header li {
  transition: all 200ms ease-in-out;
}

header li.active {
  a {
    color: white;
    font-weight: bold;
    display: inline-block;
  }
  border-bottom: 2px solid white;
}
