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

@layer base {
  body {
    width: 380px;
    min-height: 500px;
  }
}

@layer components {
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
  }

  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: theme('colors.input.bg');
    border: 1px solid theme('colors.input.border');
    transition: 0.4s;
    border-radius: 20px;
  }

  .slider:before {
    position: absolute;
    content: '';
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: theme('colors.text.secondary');
    transition: 0.4s;
    border-radius: 50%;
  }

  input:checked + .slider {
    background-color: theme('colors.primary.DEFAULT');
    border-color: theme('colors.primary.DEFAULT');
  }

  input:checked + .slider:before {
    transform: translateX(16px);
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
}
