@import url(utils.css);
@import url(tokens.css);

@import url(home-view.css);
@import url(coding-view.css);
@import url(control-view.css);
@import url(device-view.css);

/* ======================================== GENERAL =================================== */
html {
    box-sizing: border-box;
    font-size: 16px;
}

body {
    box-sizing: border-box;
    position: relative;
    height: 100dvh;
    font-family: var(--ct-font-family-base);
    background-color: var(--ct-color-black);
    padding-top: var(--ct-header-height);
}

.hidden-view,
.hidden-element {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms;
}

.visible-element {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 200ms;
}

@media only screen and (max-width: 992px) {
    .hide-in-tablet {
        display: none;
    }
}

@media only screen and (max-width: 576px) {
    .hide-in-phone {
        display: none;
    }
}

/* Texts =================================== */
span,
p {
    color: var(--ct-color-white);
    margin: 0;
}

h2 {
    margin: 0;
    font-size: var(--ct-font-size-subtitle);
    font-weight: 600;
    color: var(--ct-color-white);
}

h3 {
    margin: 0;
    font-size: var(--ct-font-size-large);
    color: var(--ct-white-light-05);
    font-weight: 400;
}

h4 {
    margin: 0;
    font-size: var(--ct-font-size-medium);
    color: var(--ct-white-light-05);
    font-weight: 400;
}

.text-bold-large {
    font-size: var(--ct-font-size-large);
    font-weight: 700;
}

.text-large {
    font-size: var(--ct-font-size-large);
    font-weight: 400;
}

.text-bold-medium {
    font-size: var(--ct-font-size-medium);
    font-weight: 700;
}

.text-medium {
    font-size: var(--ct-font-size-medium);
    font-weight: 400;
}

.text-bold-small {
    font-size: var(--ct-font-size-small);
    font-weight: 700;
}

.text-small {
    font-size: var(--ct-font-size-small);
    font-weight: 400;
}

/* ======================================== COLORS =================================== */
.color-black {
    color: var(--ct-color-white);
}

.color-white {
    color: var(--ct-color-black);
}

.color-orange {
    color: var(--ct-color-orange);
}

.color-green {
    color: var(--green);
}

.color-red {
    color: var(--red);
}

.color-grey {
    color: var(--ct-color-grey);
}

.black-icon {
    filter: var(--ct-color-white-icon);
}

.white-icon {
    filter: var(--ct-color-black-icon);
}

.orange-icon {
    filter: var(--ct-color-orange-icon);
}

.red-icon {
    filter: var(--red-icon);
}

.blue-icon {
    filter: var(--blue-icon);
}

.green-icon {
    filter: var(--green-icon);
}

/* ======================================== BACKGROUNDS =================================== */
.bg-black {
    background-color: var(--ct-color-white);
}

.bg-white {
    background-color: var(--ct-color-black);
}

.bg-orange {
    background-color: var(--ct-color-orange);
}

/* ======================================== ICONS =================================== */

.icon-16px {
    width: 16px !important;
    height: 16px !important;
}

.icon-20px {
    width: 20px !important;
    height: 20px !important;
}

.icon-24px {
    width: 24px !important;
    height: 24px !important;
}

.icon-32px {
    width: 32px !important;
    height: 32px !important;
}

.icon-36px {
    width: 36px !important;
    height: 36px !important;
}

.icon-40px {
    width: 40px !important;
    height: 40px !important;
}

.icon-48px {
    width: 48px !important;
    height: 48px !important;
}

.icon-64px {
    width: 64px !important;
    height: 64px !important;
}

/* BUTTONS ============================================================== */
button {
    display: flex;
    align-items: center;
    gap: var(--ct-button-gap);
    padding: var(--ct-button-padding);
    border-radius: var(--ct-button-radius);
    font: var(--ct-font-family-base);
    font-size: var(--ct-font-size-medium);
    transition: var(--ct-transition-btn);
    color: var(--ct-color-white);
    background: transparent;
    border: 1px solid var(--ct-color-grey);
    width: fit-content;
    cursor: pointer;
    user-select: none;
}

button img {
    width: var(--ct-icon-size-medium);
    height: var(--ct-icon-size-medium);
    filter: var(--ct-icon-filter-white);
}

.close-btn {
    width: var(--ct-icon-size-medium);
    height: var(--ct-icon-size-medium);
    filter: var(--ct-icon-filter-red);
    background-color: var(--ct-red-light-02);
    border: 1px solid var(--ct-color-red);
    cursor: pointer;
    user-select: none;
    padding: 2px;
    border-radius: 100px;
    transition: var(--ct-transition-btn);
}

.close-btn:hover {
    background-color: var(--ct-red-light-03);
    box-shadow: 0 0 15px var(--ct-red-light-05);
}

.close-btn:active {
    scale: 0.95;
}

.btn-icon {
    border: none;
    padding: 0;
    border-radius: 50%;
    background-color: var(--ct-white-light-03);
    box-shadow: 0 0 10px var(--ct-white-light-03);
}

.btn-icon:hover {
    background-color: var(--ct-orange-light-05);
    box-shadow: 0 0 15px var(--ct-orange-light-05);
    transform: rotate(10deg);
}

.btn-icon:active {
    scale: 0.97;
}

.btn-icon img {
    width: var(--ct-icon-size-large);
    height: var(--ct-icon-size-large);
}

/* btn-filled ------------------------ */
.btn-filled-violet {
    color: var(--ct-color-white);
    background: var(--ct-violet-light-04);
    border: 1px solid var(--ct-color-violet);
    box-shadow: 0 0 15px 5px var(--ct-violet-light-05);
}

.btn-filled-violet img {
    filter: var(--ct-icon-filter-white);
}

.btn-filled-violet:hover {
    background-color: var(--ct-color-violet);
    box-shadow: 0 0 20px 8px var(--ct-violet-light-05);
}

.btn-filled-violet:active,
.btn-filled-violet.active {
    scale: 0.97;
    background-color: var(--ct-color-violet);
    box-shadow: 0 0 20px 8px var(--ct-violet-light-05);
}

.btn-filled-aqua {
    color: var(--ct-color-white);
    background: var(--ct-aqua-light-04);
    border: 1px solid var(--ct-color-aqua);
    box-shadow: 0 0 15px 3px var(--ct-aqua-light-05);
}

.btn-filled-aqua img {
    filter: var(--ct-icon-filter-white);
}

.btn-filled-aqua:hover {
    background-color: var(--ct-color-aqua);
    box-shadow: 0 0 20px 5px var(--ct-aqua-light-05);
}

.btn-filled-aqua:active,
.btn-filled-aqua.active {
    scale: 0.97;
    background-color: var(--ct-color-aqua);
    box-shadow: 0 0 20px 5px var(--ct-aqua-light-05);
}

.btn-filled-blue {
    color: var(--ct-color-white);
    background: var(--ct-blue-light-04);
    border: 1px solid var(--ct-color-blue);
    box-shadow: 0 0 15px 1px var(--ct-blue-light-05);
}

.btn-filled-blue img {
    filter: var(--ct-icon-filter-white);
}

.btn-filled-blue:hover {
    background-color: var(--ct-color-blue);
    box-shadow: 0 0 25px 4px var(--ct-blue-light-05);
}

.btn-filled-blue:active,
.btn-filled-blue.active {
    scale: 0.97;
    background-color: var(--ct-color-blue);
    box-shadow: 0 0 25px 4px var(--ct-blue-light-05);
}

.btn-filled-green {
    color: var(--ct-color-white);
    background: var(--ct-green-light-04);
    border: 1px solid var(--ct-color-green);
    box-shadow: 0 0 15px 1px var(--ct-green-light-05);
}

.btn-filled-green img {
    filter: var(--ct-icon-filter-white);
}

.btn-filled-green:hover {
    background-color: var(--ct-color-green);
    box-shadow: 0 0 25px 4px var(--ct-green-light-05);
}

.btn-filled-green:active,
.btn-filled-green.active {
    scale: 0.97;
    background-color: var(--ct-color-green);
    box-shadow: 0 0 25px 4px var(--ct-green-light-05);
}

.btn-filled-red {
    color: var(--ct-color-white);
    background: var(--ct-red-light-04);
    border: 1px solid var(--ct-color-red);
    box-shadow: 0 0 15px 1px var(--ct-red-light-05);
}

.btn-filled-red img {
    filter: var(--ct-icon-filter-white);
}

.btn-filled-red:hover {
    background-color: var(--ct-color-red);
    box-shadow: 0 0 25px 4px var(--ct-red-light-05);
}

.btn-filled-red:active,
.btn-filled-red.active {
    scale: 0.97;
    background-color: var(--ct-color-red);
    box-shadow: 0 0 25px 4px var(--ct-red-light-05);
}

.btn-filled-orange {
    color: var(--ct-color-white);
    background: var(--ct-orange-light-04);
    border: 1px solid var(--ct-color-orange);
    box-shadow: 0 0 15px 1px var(--ct-orange-light-05);
}

.btn-filled-orange img {
    filter: var(--ct-icon-filter-white);
}

.btn-filled-orange:hover {
    background-color: var(--ct-color-orange);
    box-shadow: 0 0 25px 4px var(--ct-orange-light-05);
}

.btn-filled-orange:active,
.btn-filled-orange.active {
    scale: 0.97;
    background-color: var(--ct-color-orange);
    box-shadow: 0 0 25px 4px var(--ct-orange-light-05);
}

/* btn-neon ------------------------ */
.btn-neon-orange {
    color: var(--ct-color-white);
    border: 1px solid var(--ct-color-orange);
    box-shadow: 0 0 10px var(--ct-orange-light-05);
}

.btn-neon-orange:hover {
    background-color: var(--ct-orange-light-02);
    box-shadow: 0 0 20px var(--ct-orange-light-05);
}

.btn-neon-orange img {
    filter: var(--ct-icon-filter-white);
}

.btn-neon-orange:active {
    scale: 0.97;
}

.btn-neon-white {
    color: var(--ct-color-white);
    border: 1px solid var(--ct-color-white);
    box-shadow: 0 0 10px var(--ct-white-light-03);
}

.btn-neon-white img {
    filter: var(--ct-icon-filter-white);
}

.btn-neon-white:hover {
    background-color: var(--ct-white-light-03);
    box-shadow: 0 0 12px var(--ct-white-light-04);
}

.btn-neon-white:active {
    scale: 0.97;
}

.btn-neon-grey {
    color: var(--ct-color-white);
    border: 1px solid var(--ct-color-grey);
    box-shadow: 0 0 10px var(--ct-white-light-03);
}

.btn-neon-grey img {
    filter: var(--ct-icon-filter-white);
}

.btn-neon-grey:hover {
    background-color: var(--ct-white-light-03);
    box-shadow: 0 0 12px var(--ct-white-light-04);
}

.btn-neon-grey:active {
    scale: 0.97;
}



/* INPUTS =========================================================================== */
.input-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.input-container input {
    width: 100%;
    color: var(--ct-color-white);
    background: var(--ct-color-black);
    padding: var(--ct-input-padding);
    font-family: var(--ct-font-family-base);
    font-size: var(--ct-font-size-medium);
    border: 1px solid var(--ct-color-grey);
    box-shadow: none;
    border-radius: var(--ct-input-radius);
    outline: none;
    transition: var(--ct-transition-input);
}

.input-container input:focus {
    border: 1px solid var(--ct-color-orange);
}

/*Radio styles ======================*/
.radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-container input[type="radio"] {
    appearance: none;
    margin: 0;
    width: calc(var(--ct-icon-size-medium) - 2px);
    height: calc(var(--ct-icon-size-medium) - 2px);
    border-radius: 50%;
    background-color: var(--ct-color-black);
    border: 2px solid var(--ct-color-grey);
    cursor: pointer;
    user-select: none;
    transition: var(--ct-transition-input);
}

.radio-container label {
    margin-left: var(--ct-input-gap);
    margin-bottom: 2px;
    color: var(--ct-color-white);
    font-size: var(--ct-font-size-medium);
    cursor: pointer;
    user-select: none;
    transition: var(--ct-transition-input);
}

.radio-container input[type="radio"]:checked {
    border: 4px solid var(--ct-color-orange);
    background-color: var(--ct-orange-light-04);
    filter: drop-shadow(0 0 15px 3px var(--ct-orange-light-05));
}

.radio-container input[type="radio"]:checked+label {
    color: var(--ct-color-orange);
}

.radio-container input[type="radio"]:disabled {
    border: 2px solid var(--ct-white-light-02);
    cursor: not-allowed;
}

.radio-container input[type="radio"]:disabled+label {
    color: var(--ct-white-light-03);
    cursor: not-allowed;
}

/*Select styles ======================*/
.select-container {
    position: relative;
    display: inline-block;
    width: 100px;
}

.select-container select {
    appearance: none;
    width: 100%;
    color: var(--ct-color-white);
    background: var(--ct-color-black);
    padding: var(--ct-input-padding);
    font-family: var(--ct-font-family-base);
    font-size: var(--ct-font-size-medium);
    border: 1px solid var(--ct-color-grey);
    box-shadow: none;
    border-radius: var(--ct-input-radius);
    outline: none;
    transition: var(--ct-transition-input);
    cursor: pointer;
}

.select-container select:focus {
    border-color: var(--ct-color-orange);
}

.select-container svg {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: var(--ct-icon-size-medium);
    height: var(--ct-icon-size-small);
    filter: var(--ct-icon-filter-white);
    transition: var(--ct-transition-btn);
    cursor: pointer;
    pointer-events: none;
}

.select-container select:focus+svg {
    transform: translateY(-50%) rotate(180deg);
    filter: var(--ct-icon-filter-orange);
}

/* Switch ======================================== */

.switch-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.switch-text {
    font-size: var(--ct-font-size-medium);
    color: var(--ct-color-white);
    cursor: pointer;
    user-select: none;
    transition: var(--ct-transition-btn);
}

input[type="checkbox"]:checked~.switch-text {
    color: var(--ct-color-aqua);
    text-shadow: 0 0 10px var(--ct-blue-light-05);
}

input[type="checkbox"] {
    display: none;
}

.switch-label {
    position: relative;
    display: block;
    width: 56px;
    height: 30px;
    background: var(--ct-color-black);
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid var(--ct-white-light-03);
    transition: var(--ct-transition-btn);
}

.switch-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: linear-gradient(145deg, var(--ct-white-light-03), var(--ct-white-light-02));
    border-radius: 50%;
    transition: var(--ct-transition-btn);
}

input[type="checkbox"]:checked+.switch-label {
    border-color: var(--ct-color-aqua);
    box-shadow:
        inset 0 0 10px var(--ct-aqua-light-03),
        0 0 10px var(--ct-aqua-light-05);
}

input[type="checkbox"]:checked+.switch-label .switch-slider {
    left: 28px;
    background-color: var(--ct-color-aqua);
    box-shadow: 0 0 10px var(--ct-aqua-light-05);
}