body {
    margin:.5rem .25rem;
}

header {
  display: flex;
  max-width: 600px;
  align-content: center;
  justify-content: space-around;
  margin: 1rem auto;
}

header > h1 {
    margin:0;
}

table {
    margin:0 auto;
}

table img {
    max-height: 100px;
}

tr {
    cursor: pointer;
}
tr:first-child {
    cursor: default;
}


tr:hover {
    background-color:#ccc;
}

tr:first-child:hover {
    background-color:#fff;
}
#fragrance-list {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  gap:1rem;
}

.fragrance {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap:.5rem;
  border-bottom: 1px solid #ccc;
  padding-bottom: .5rem;
}

.fragrance [data-size="unisex"] {
content:'u';
}
.name-designer {
    display: flex;
    flex-direction: column;
    position: relative;
}

.name {
    font-weight: bold;
}

.icons {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
}

.gender-icon {
  border-radius: 5rem;
  width: 1.2rem;
  height: 1.2rem;
  display: flex;
  text-align: center;
  justify-content: center;
  align-content: center;
  align-items: center;
  font-weight: normal;
}

.gender-icon.feminine {
    background-color: lightpink;
}

.gender-icon.masculine {
    background-color: lightblue;
}
.gender-icon.unisex {
    background-color: #77dd77 ;
}

.is-owned {
    color:darkgreen;
    font-weight: bold;
}

.is-fav {
    color:darkred;
}
.fragrance .note {
    border-radius:2rem;
    border:1px solid #999;
    cursor: pointer;
    text-transform: capitalize;
    padding:0 .5rem;
    white-space: nowrap;
}
#search {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin:1rem auto;
    gap:.2rem;
}

#search > div {
    display: flex;
}

#access-wrapper {
  display: flex;
  justify-content: center; /* Centers horizontally */
  align-items: center;     /* Centers vertically */
  min-height: 100vh;       /* Takes up full screen height */
  margin: 0; 
}

#access {
    display:flex;
    flex-direction: column;
    margin:0 auto;
max-width: 600px;
  width: 100%;
  align-items: center;
}


#access-buttons {
  max-width: 300px;
  width: 100%;
  display: flex;
  justify-content: space-around;
}

.message {
  width: 100%;
  background-color: light-green;
  text-align: center;
  font-size: 2rem;
}

.success {
    background-color:palegreen;
    color:darkgreen;
}

.error {
    background-color:palevioletred;
    color:darkred;
}

#header {
 margin-bottom:2rem;
 font-size: smaller;
}

#access form {
    display: flex;
    flex-direction: column;
    gap:1rem;
}

.star-rating {
  display: inline-block;
  font-size: 1.5rem;
  font-family: Times; /* High-quality star glyphs */
  line-height: 1;
  position: relative;
  /* Define colors for the stars */
  background: linear-gradient(90deg, #ffdf00 var(--percent), #ccc var(--percent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Logic to calculate width based on the data-rating attribute */
[data-rating="0"] { --percent: 0%; } 
[data-rating="1"] { --percent: 20%; } 
[data-rating="2"] { --percent: 40%; } 
[data-rating="3"] { --percent: 60%; } 
[data-rating="4"] { --percent: 80%; }
[data-rating="5"] { --percent: 100%; }
