
@st-namespace 'Modal-st-css';
@st-import [ --wix-color-5 ] from '@wix/tpa-style-webpack-plugin/stylable-variables.st.css';
@st-import [ createColor ] from '../../../common/formatters.st';
@st-import [ --wst-system-line-1-color-rgb ] from '@wix/wix-site-theme-variables/stylable-variables.st.css';


@property st-global(--wut-bg-color);
@property st-global(--wut-text-color);
@property st-global(--wut-disabled-color);
@property st-global(--wut-placeholder-color);
@property st-global(--wut-main-cta-color);
@property st-global(--wut-secondary-cta-color);
@property st-global(--wut-input-border-color);
@property st-global(--wut-input-hover-and-focus-border-color);
@property st-global(--wut-selection-text-bg-color);
@property st-global(--wut-meta-data-color);
@property st-global(--wut-clear-button-bg-color);

@property st-global(--wix-ui-tpa-modal-overlay-background-color);

.root {
    -st-states: isOpen, forceBWTheme;
    box-sizing: border-box;
}

.root * {
    box-sizing: border-box;
}

.root:forceBWTheme {
    --wut-bg-color: white;
    --wut-text-color: black;
    --wut-disabled-color: #969696;
    --wut-placeholder-color: #646464;

    --wut-main-cta-color: rgb(var(--wix-color-5));
    --wut-secondary-cta-color: black;
    --wut-input-border-color: rgba(0, 0, 0, 0.6);
    --wut-input-hover-and-focus-border-color: black;
    --wut-selection-text-bg-color: rgba(0, 0, 0, 0.2);
    --wut-meta-data-color: #646464;
    --wut-clear-button-bg-color: rgba(0, 0, 0, 0.12);
}

.root:isOpen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    z-index: 1999;
}

.modal {
    /* to bit z-index of header in mobile */
    z-index: 2000;

    opacity: 0;

    /* Safari */
    -webkit-transition: opacity 0.3s, -webkit-transform 0.4s;
    transition: opacity 0.2s, transform 0.4s;
    transition-timing-function: ease;
}

.root:isOpen .modal {
    opacity: 1;
}

.overlay {
    width: 100%;
    height: 100%;
    background: createColor(--wix-ui-tpa-modal-overlay-background-color, var(--wst-system-line-1-color-rgb, "0, 0, 0"));
    opacity: 0.6;
}

/* st-namespace-reference="../../../../../src/components/internal/Modal/Modal.st.css" */
    