// ============================================================================
// Element | Tab
// ============================================================================
@use "../../../dev" as *;
@use "../../../variables" as *;

@use "../../soul_type" as *;

/* Style the tab */
@mixin tab {
    overflow: hidden;
    border: q(1) solid #ccc;
    background-color: #f1f1f1;

    /* Style the buttons that are used to open the tab content */
    button {
        background-color: inherit;
        float: left;
        border: none;
        outline: none;
        cursor: pointer;
        padding: q(14) q(16);
        transition: 0.3s;

        /* Change background color of buttons on hover */
        &:hover {
            background-color: #ddd;
        }

        /* Create an active/current tablink class */
        &.active {
            background-color: #ccc;
        }
    }
}

/* Style the tab content */
@mixin tabcontent {
    display: none;
    padding: q(6) q(12);
    border: q(1) solid #ccc;
    border-top: none;
    animation: fadeEffect 1s; /* Fading effect takes 1 second */
}

/* Go from zero to full opacity */
@keyframes fadeEffect {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
