/* Font smoothing and appearance reset */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -o-font-smoothing: antialiased;
    -webkit-appearance: none;
    appearance: none;
}

/* Cloud Canal visibility variables */
:root {
    --cc-load-visibility: hidden;
}

:where([data-cc-hidden-until-load='true']) {
    visibility: var(--cc-load-visibility);
}

/* Global utility styles */
textarea {
    resize: vertical;
}

.w-input,
.w-select,
.w-tab-link,
.w-nav-link,
.w-slider-arrow-left,
.w-slider-arrow-right,
.w-dropdown-btn,
.w-dropdown-toggle,
.w-dropdown-link {
    color: inherit;
    text-decoration: inherit;
    font-size: inherit;
}

/* Focus state style for keyboard navigation for the focusable elements */
*[tabindex]:focus-visible,
input[type='file']:focus-visible {
    outline: 0.125rem solid #4d65ff;
    outline-offset: 0.125rem;
}

/* Get rid of top margin on first element in any rich text element */
.w-richtext > :not(div):first-child,
.w-richtext > div:first-child > :first-child {
    margin-top: 0 !important;
}

/* Get rid of bottom margin on last element in any rich text element */
.w-richtext > :last-child,
.w-richtext ol li:last-child,
.w-richtext ul li:last-child {
    margin-bottom: 0 !important;
}

/* Prevent all click and hover interaction with an element */
.pointer-events-off {
    pointer-events: none;
}

/* Enables all click and hover interaction with an element */
.pointer-events-on {
    pointer-events: auto;
}

/* Create a class of .div-square which maintains a 1:1 dimension of a div */
.div-square::after {
    content: '';
    display: block;
    padding-bottom: 100%;
}

/* Make sure containers never lose their center alignment */
.container-medium,
.container-small,
.container-large {
    margin-right: auto !important;
    margin-left: auto !important;
}

/* Apply "..." after 3 lines of text */
.text-style-3lines {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Apply "..." after 2 lines of text */
.text-style-2lines {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Apply "..." after 1 line of text */
.text-style-1line {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* Adds inline flex display */
.display-inlineflex {
    display: inline-flex;
}

/* These classes are never overwritten */
.hide {
    display: none !important;
}

@media screen and (max-width: 991px) {
    .hide,
    .hide-tablet {
        display: none !important;
    }
}

@media screen and (max-width: 767px) {
    .hide-mobile-landscape {
        display: none !important;
    }
}

@media screen and (max-width: 479px) {
    .hide-mobile {
        display: none !important;
    }
}

.margin-0 {
    margin: 0rem !important;
}

.padding-0 {
    padding: 0rem !important;
}

.spacing-clean {
    padding: 0rem !important;
    margin: 0rem !important;
}

.margin-top {
    margin-right: 0rem !important;
    margin-bottom: 0rem !important;
    margin-left: 0rem !important;
}

.padding-top {
    padding-right: 0rem !important;
    padding-bottom: 0rem !important;
    padding-left: 0rem !important;
}

.margin-right {
    margin-top: 0rem !important;
    margin-bottom: 0rem !important;
    margin-left: 0rem !important;
}

.padding-right {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
    padding-left: 0rem !important;
}

.margin-bottom {
    margin-top: 0rem !important;
    margin-right: 0rem !important;
    margin-left: 0rem !important;
}

.padding-bottom {
    padding-top: 0rem !important;
    padding-right: 0rem !important;
    padding-left: 0rem !important;
}

.margin-left {
    margin-top: 0rem !important;
    margin-right: 0rem !important;
    margin-bottom: 0rem !important;
}

.padding-left {
    padding-top: 0rem !important;
    padding-right: 0rem !important;
    padding-bottom: 0rem !important;
}

.margin-horizontal {
    margin-top: 0rem !important;
    margin-bottom: 0rem !important;
}

.padding-horizontal {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
}

.margin-vertical {
    margin-right: 0rem !important;
    margin-left: 0rem !important;
}

.padding-vertical {
    padding-right: 0rem !important;
    padding-left: 0rem !important;
}

/* Apply "..." at 100% width */
.truncate-width {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Removes native scrollbar */
.no-scrollbar {
    -ms-overflow-style: none;
    overflow: -moz-scrollbars-none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        opacity: 50%;
    }
    50% {
        opacity: 100%;
    }
    100% {
        opacity: 100%;
    }
}

.toggle-radio_component:has(input:checked) {
    background-color: var(--base-color-brand--primary);
    color: var(--base-color-brand--white);
    cursor: default;
}

.toggle-radio_component:not(:has(input:checked)):hover {
    opacity: 0.6;
}

[data-element='delete-comment-button'] {
    display: none;
}

.comments_comment:hover [data-element='delete-comment-button'] {
    display: block;
}

/* Image preview styles for forms */
#preview-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.grid-1col {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Toggle button styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--base-color-brand--primary, #4d65ff);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--base-color-brand--primary, #4d65ff);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-field-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.toggle-field-info {
    flex: 1;
    margin-right: 1rem;
}

.toggle-field-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toggle-field-description {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.toggle-field-price {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--base-color-brand--primary, #4d65ff);
}
