fleet/frontend/components/Modal/_styles.scss
2026-04-10 09:30:04 -05:00

136 lines
2.8 KiB
SCSS

.modal {
&__background {
@include position(fixed, 0 0 0 0);
background-color: $core-fleet-black-overlay-40;
z-index: 101;
overflow: auto;
display: flex;
justify-content: center;
animation: fade-in 150ms ease-out;
visibility: visible;
opacity: 1; // Used for transitions between modals
transition: opacity 150ms ease-out, visibility 0s; // Used for transitions between modals
}
&__hidden {
visibility: hidden;
opacity: 0; // Used for transitions between modals
transition: opacity 150ms ease-out, visibility 0s 150ms; // Used for transitions between modals
.fleet-checkbox__tick:after {
visibility: hidden;
}
}
&__content-wrapper {
margin-top: $pad-large;
font-size: $x-small;
line-height: 1.5;
.input-field {
width: 100%;
}
form .modal-cta-wrap,
.form .modal-cta-wrap {
// compensate for form gap to maintain consistent 32px spacing on top of modal ctas
margin-top: $pad-small;
}
}
&__ex {
height: 32px;
}
&__header {
font-size: $large;
font-weight: $regular;
text-align: left;
padding-bottom: $pad-xsmall;
border-bottom: 1px solid $ui-fleet-black-10;
display: flex;
justify-content: space-between;
min-height: 37px;
span {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
&__modal_container {
@include position(absolute, 22px null null null);
box-sizing: border-box;
background-color: $core-fleet-white;
padding: $pad-xxlarge;
border-radius: 8px;
animation: scale-up 150ms ease-out;
&__medium {
width: 650px;
}
&__large {
width: 800px;
}
&__xlarge {
width: 850px;
}
&__auto {
width: auto;
}
}
// these styles are for the modal content when it is disabled
&__content-wrapper-disabled {
position: relative;
}
&__content-disabled {
transition: opacity 150ms ease-in-out;
opacity: 0.5; // this adds a disabled effect to the modal content
}
&__disabled-overlay {
position: absolute;
height: 100%;
width: 100%;
z-index: 1000;
}
&__actions-footer {
display: flex;
justify-content: space-between;
padding-top: $pad-medium;
// Styles both primary-actions and secondary-actions
> * {
display: flex;
justify-content: space-between;
gap: $pad-medium;
align-items: center;
}
// Align primary actions right if no secondary actions
> :last-child {
margin-left: auto;
}
.button__text-icon {
padding: 11px;
}
}
}
.modal-scrollable-content {
overflow-y: auto;
max-height: 705px;
}
.modal-cta-wrap {
align-self: flex-end;
display: flex;
flex-direction: row-reverse;
margin-top: $pad-xlarge;
gap: $pad-medium;
}