/* =============== Base Elements =============== */
#calendar-table {
    font-size: clamp(0.7rem, 1vw, 1rem);

    td, th {
        align-content: center;
        text-align: center;
    }
}

td:has(circle-progress) {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* =============== Component Classes =============== */
.axie-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: calc(clamp(90px, 20vw, 200px) * 3 / 4);

    .axie-image {
        transform: scale(1.2);
    }
}

.type-condition-container {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
}

.progress-container {
    position: relative;
    display: inline-block;
    width: 80%;

    .progress {
        width: 100%;
        margin-bottom: 0 !important;
        height: clamp(0.8rem, 3vw, 1.5rem);
    }

    .progress-text {
        line-height: clamp(0.8rem, 3vw, 1.5rem);
        position: absolute;
        right: 0;
        top: 0;
        width: 100%;
        text-align: center;
        color: #fff;
        pointer-events: none;
    }
}

.table-header, .table-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--bulma-border);
}

.table-header {
    font-weight: bold;
    font-size: clamp(0.8rem, 1vw, 1rem);
}

.table-row {
    flex-wrap: wrap;
    cursor: pointer;
    font-size: clamp(0.65rem, 1vw, 0.9rem);

    &:last-child {
        border-bottom: none;
    }
}

.table-cell {
    display: flex;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 10px;
    text-overflow: ellipsis;
}

#revoke-button {
    white-space: normal;
    font-size: clamp(0.55rem, 1vw, 0.9rem);
}
.revoke-cell {
    flex-direction: column;
    text-align: center;
    flex: 0.5;
}

/* =============== Custom Components =============== */
circle-progress {
    display: flex;
    justify-content: center;
    align-items: center;

    &::part(base) {
        display: flex;
        justify-content: center;
        align-items: center;
        width: clamp(20px, 3vw, 30px);
        height: auto;
    }

    &::part(text) {
        font-size: 2rem;
        font-weight: bold;
    }
}

/* =============== Layout Containers =============== */
#axie-delegation-table {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bulma-border);
}

.origin-profile-container {
    width: 80%;
}

/* =============== Interactive Elements =============== */
.sortable {
    cursor: pointer;

    &:hover {
        background-color: var(--bulma-background-hover);
    }

    .sort-icon {
        align-self: center;
        margin-left: 5px;
    }
}

/* =============== Responsive Design =============== */
.hide-on-mobile {
    flex: 2;
    display: none;
}

.wrap-on-mobile {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .hide-on-mobile {
        display: block;
    }

    .wrap-on-mobile {
        flex: 2;
    }
}

/* =============== Chart Styles =============== */
.chart-container svg {
    display: block;
    margin: auto;
}

.chart-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;

    img {
        display: inline-block;
        vertical-align: middle;
        margin-right: 5px;
    }
}