<template>
    <div class="team-card" :style="{ background: color }">
        <div class="team-info">
            <h2>{{ name }}</h2>
            <p>{{ nation }}</p>
            <p><span>{{ driver1 }}</span> & <span>{{ driver2 }}</span></p>
        </div>
        <img :src="image" alt="" class="car">
        <img :src="logo" alt="" class="logo">
    </div>
</template>
<script setup lang="ts">
interface props {
    name: string;
    nation: string;
    image: string;
    color: string;
    driver1: string;
    driver2: string;
    logo: string;
}

defineProps<props>()
</script>
<style lang="scss" scoped>
.team-card {
    width: 80vw;
    border: 1px solid #ccc;
    border-radius: 10px;
    margin: 0 auto 20px auto;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    position: relative;
}

.team-card:hover {
    transform: scale(1.025);
}

.car {
    display: block;
    width: 40vw;
    margin: 0 auto;
}

.team-info {
    margin-left: 100px;
}

.team-info h2 {
    font-size: 30px;
}

.team-info p {
    margin-top: -20px;
    font-size: 20px;
}

.team-info p:nth-of-type(2), .team-info p:nth-of-type(3) {
    font-weight: bold;
}

.logo {
    width: 50px;
    padding: 6px;
    border-radius: 50%;
    box-shadow: 0px 0px 0px 1px #ccc;
    position: absolute;
    top: 40px;
    right: 100px;
    background-color: rgba(51, 51, 51, 0.5);
}

</style>