exciting-aftermath/Portfolio.WebUI.Server/Components/Component/Pokemon Components/PokemonCard.razor.css

153 lines
2.9 KiB
CSS

.pokemon-card {
position: relative;
width: 24rem;
height: 32rem;
max-width: 24rem;
max-height: 32rem;
border-radius: 5% / 3.5%;
}
.pokemon-name {
position: absolute;
top: 0 !important;
left: 0 !important;
margin-top: 1.5rem !important;
margin-left: 0.5rem !important;
transform: translateY(-50%) !important;
font-size: 2.5rem;
}
.pokemon-number {
position: absolute;
top: 0 !important;
left: 0 !important;
margin-top: 3.3rem !important;
margin-left: 1.5rem !important;
transform: translateY(-50%) !important;
font-size: .75rem;
}
.pokemon-type {
position: absolute;
top: 0 !important;
right: 0 !important;
width: 2.5rem;
height: 2.5rem;
margin-top: .5rem !important;
margin-right: .5rem !important;
}
.pokemon-image {
width: 100%; /* Look to flip-container for the width/height of image */
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.pokemon-flavor-text {
position: absolute;
top: 60% !important;
left: 50% !important;
width: 90%;
height: 20%;
padding: 0.25rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
margin-top: 3rem !important;
transform: translateX(-50%) !important;
display: flex; /* Centers text inside */
align-items: start;
justify-content: center; /* Horizontally centers text */
overflow: hidden; /* Ensures no scrollbar */
}
.pokemon-flavor-text p {
margin: 0;
width: 100%;
text-align: start;
font-size: min(14px, 1.5vw); /* Scales font but won't exceed 14px */
line-height: 1.2; /* Adjust spacing for readability */
white-space: normal; /* Ensures wrapping */
word-wrap: break-word;
hyphens: auto;
}
.flip-container {
position: absolute !important;
top: 40% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
perspective: 1000px;
display: inline-block;
width: 20rem;
height: 20rem;
cursor: pointer;
}
.flipper {
transition: transform 0.6s;
transform-style: preserve-3d;
width: 100%;
height: 100%;
position: relative;
}
.flipped {
transform: rotateY(180deg);
}
.front, .back {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
backface-visibility: hidden;
}
.back {
transform: rotateY(180deg);
}
.badge {
width: 90px;
height: 30px;
color: white;
padding: 4px 8px;
border-radius: 30px;
}
.statText {
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: .8rem;
}
.dozing {
background-color: #fcdc5e;
}
.snoozing {
background-color: #4ce8ed;
}
.slumbering {
background-color: #4588fb;
}
.berries {
background-color: #24d86b;
}
.ingredients {
background-color: #fdbe4d;
}
.skills {
background-color: #47a0fc;
}