billing-period-toggle.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. @import '../foundations/all';
  2. @import '../abstracts/mixins';
  3. .billing-period-toggle {
  4. position: relative;
  5. display: inline-flex;
  6. background-color: var(--bg-light-secondary);
  7. border-radius: var(--border-radius-full);
  8. padding: var(--spacing-03);
  9. gap: var(--spacing-04);
  10. border: none;
  11. label {
  12. display: inline-flex;
  13. align-items: center;
  14. margin: 0;
  15. font-size: var(--font-size-05);
  16. font-weight: 600;
  17. line-height: var(--line-height-04);
  18. text-align: center;
  19. padding: var(--spacing-01) var(--spacing-04);
  20. border-radius: var(--border-radius-full);
  21. &:hover {
  22. background-color: var(--neutral-20);
  23. cursor: pointer;
  24. }
  25. }
  26. input[type='radio'] {
  27. position: absolute;
  28. left: -9999px;
  29. &:focus,
  30. &:focus-visible {
  31. outline: 0;
  32. }
  33. }
  34. input[type='radio']:focus-visible + label,
  35. input[type='radio']:checked:focus-visible + label {
  36. box-shadow: 0 0 0 2px var(--blue-30);
  37. outline: 2px solid transparent;
  38. }
  39. input[type='radio']:checked + label {
  40. background-color: var(--green-50);
  41. color: white;
  42. /* stylelint-disable-next-line length-zero-no-unit, color-function-notation, alpha-value-notation */
  43. box-shadow: 0px 2px 4px 0px rgba(30, 37, 48, 0.16);
  44. .billing-period-toggle-discount-badge {
  45. background-color: var(--green-10);
  46. color: var(--green-60);
  47. }
  48. }
  49. &.billing-period-toggle-premium {
  50. input[type='radio']:checked + label {
  51. background: var(--premium-gradient);
  52. color: white;
  53. .billing-period-toggle-discount-badge {
  54. background-color: var(--green-10);
  55. color: var(--blue-70);
  56. }
  57. }
  58. }
  59. }
  60. .billing-period-toggle-discount-badge {
  61. font-size: var(--font-size-01);
  62. font-family: 'DM Mono', monospace;
  63. padding: 2px 8px;
  64. height: 20px;
  65. border-radius: 10px;
  66. background-color: var(--neutral-70);
  67. color: white;
  68. display: flex;
  69. align-items: center;
  70. font-weight: 500;
  71. line-height: var(--line-height-01);
  72. margin-left: var(--spacing-03);
  73. }