web/src/components/things/service-card.scss

84 lines · 1717 bytes

 1@use '../../styles/mixins' as *;
 2
 3.service {
 4  display: flex;
 5  flex-direction: column;
 6  padding: var(--space-md);
 7  border: var(--border-heavy);
 8  box-shadow: var(--shadow-lg);
 9  background: var(--surface);
10  border-radius: var(--curve-sm);
11  position: relative;
12  overflow: hidden;
13
14  .service-head {
15    display: flex;
16    align-items: center;
17    gap: var(--space-sm);
18    h4 {
19      margin: 0;
20      font-size: var(--text-lg);
21      color: var(--foreground);
22      text-decoration: none;
23      @include underline-hover(var(--accent-3), 3px, 100%, 0.2s);
24    }
25    p {
26      margin: 0;
27      font-size: var(--text-base);
28      opacity: var(--opacity-soft);
29    }
30    a {
31      text-decoration: none;
32    }
33  }
34
35  .save-listing {
36    position: absolute;
37    top: var(--space-sm);
38    right: var(--space-sm);
39  }
40
41  .service-body {
42    display: flex;
43    align-items: center;
44    gap: var(--space-sm);
45    .service-icon {
46      object-fit: contain;
47    }
48    :global(p) {
49      @include line-clamp(3);
50      margin: var(--space-sm) 0;
51      width: calc(100% - 2rem);
52    }
53  }
54
55  .service-links {
56    display: flex;
57    gap: var(--space-sm);
58    justify-content: space-between;
59    a {
60      color: var(--accent-3-text);
61      font-size: var(--text-sm);
62      display: inline-flex;
63      align-items: center;
64      gap: var(--space-xs);
65      text-decoration: none;
66      max-width: 50%;
67      min-width: 25%;
68      &:not(:last-child) {
69        margin-right: var(--space-sm);
70      }
71      &:hover {
72        text-decoration: underline;
73      }
74      :global(svg) {
75        width: 1rem;
76        height: 1rem;
77      }
78      span {
79        max-width: calc(100% - 1rem);
80        @include truncate;
81      }
82    }
83  }
84}