$primary-color: var(--primary-color);
$secondary-color: var(--secondary-color);
$accent-color: var(--accent-color);
$text-color: var(--text-color2);
$background-color: var(--background-color1);
$border-color: var(--border-color);
$shadow-color: var(--shadow-color);

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.56);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal {
    background-color: $primary-color;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    width: 70vw;
    height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    border: 1px ridge $border-color;
    animation: fadeIn 0.5s forwards;
    overflow: scroll;
    overflow-x: hidden;
    border-top: none;
    border-bottom: none;

}

.shadow-modal {
    box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    background-color: $background-color;
    color: white;
}

.modal-button {
    background-color: $accent-color;
    color: $background-color;
    padding: 5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color, box-shadow 0.3s ease-out;
    overflow: hidden;
    border: solid 1px $primary-color;
    box-shadow: $shadow-color 1.95px 1.95px 2.6px;
    margin-left: 5px;
}

.modal-button:hover {
    background-color: var(--text-color2);
    border: solid 1px $primary-color;
    box-shadow: rgba(9, 8, 7, 0.4) 2px 2px, $shadow-color 4px 4px, rgba(204, 155, 39, 0.2) 6px 6px, rgba(204, 155, 39, 0.1) 8px 8px, rgba(204, 155, 39, 0.05) 10px 10px;
}

.close-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    font-size: 2rem;
    transition: color 0.2s ease-out;
    z-index: 100;
}

.close-button:hover {
    color: $accent-color;
}

@keyframes fadeIn {0%{transform:translateY(-600px) rotateX(-30deg) scale(0);transform-origin:50% 100%;opacity:0}100%{transform:translateY(0) rotateX(0) scale(1);transform-origin:50% 1400px;opacity:1}}

@keyframes scale-out-center {0%{transform:translateY(0) rotateX(0) scale(1);transform-origin:50% 1400px;opacity:1}100%{transform:translateY(-600px) rotateX(-30deg) scale(0);transform-origin:50% 100%;opacity:1}}

.modal {
    animation: fadeIn 0.5s forwards;
}

.modal-container {
    animation: fadeIn 0.5s forwards;
}

.scale-out-center {
    animation: scale-out-center 0.5s forwards;
}

.modal-header-text {
    color: $accent-color;
    font-size: 1.5rem;
    margin-bottom: 0px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-left: 10px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: $background-color;
    box-shadow: 0 0 3px $text-color;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:hover {
    transform: scale(1.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: $primary-color;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: $accent-color;
    border: 1px solid $border-color;
}

input:focus + .slider {
    box-shadow: 0 0 3px $border-color;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.modal-p {
    color: $text-color;
    font-size: 1rem;
    margin-bottom: 0px;
    margin-top: 0px;
    text-align: center;
}

.modal-header-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: space-between;
}

.modal-h2 {
    color: $text-color;
    font-size: 1.2rem;
}

.stacked-div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media screen and (max-width: 600px) {
    .modal-header-switch {
        flex-direction: column;
        align-items: center;
        margin-top: 0px;
        width: 100%;
        justify-content: center;
    }
}

.gsi-material-button {
    background-color: $background-color;
    background-image: none;
    border: 1px solid $border-color;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: $text-color;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    height: 40px;
    letter-spacing: 0.25px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    min-width: 100%;
    margin: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 20px;
}

.gsi-material-button .gsi-material-button-icon {
    height: 20px;
    margin-right: 12px;
    min-width: 20px;
    width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
    -webkit-align-items: center;
    align-items: center;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
    -webkit-flex-grow: 1;
    flex-grow: 1;
    font-family: 'Roboto', arial, sans-serif;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
    -webkit-transition: opacity .218s;
    transition: opacity .218s;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.gsi-material-button:disabled {
    cursor: default;
    background-color: rgba(19, 19, 20, 0.38);
    border-color: rgba(142, 145, 143, 0.12);
}

.gsi-material-button:disabled .gsi-material-button-state {
    background-color: rgba(227, 227, 227, 0.12);
}

.gsi-material-button:disabled .gsi-material-button-contents {
    opacity: 0.38;
}

.gsi-material-button:disabled .gsi-material-button-icon {
    opacity: 0.38;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state, 
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
    background-color: white;
    opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
    -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
    background-color: white;
    opacity: 8%;
}

.smtp-header {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
}

.smtp-head {
    color: $accent-color;
    font-size: 1.2rem;
    margin-top: 0px;
}

.smpt-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    width: 100%;
}

.smtp-input {
    width: 70%;
    border: none;
    border-radius: 5px;
    background-color: $background-color;
    color: $text-color;
    padding: 5px;
    height: 20px;
}

.smtp-input-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 1rem;
    width: 100%;
    justify-content: space-around;
}

@media screen and (max-width: 600px) {
    .smtp-input-container {
        flex-direction: column;
    }

    .modal-header-text {
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .modal-h2 {
        text-align: center;
    }

    .stacked-div {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin-top: 2rem;
    }

    .modal-header-switch {
        margin-top: 1rem;
    }

    .modal-header {
        margin-bottom: 0px;
    }
}

.return-email-contents { 
    margin-top: 1rem;
    width: 100%;
    .modal-header-text {
        text-align: center;
    }
}

.body-section {
    flex-direction: column;
}
.email-body {
    width: 100%;
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid $border-color;
    border-radius: 4px;
    resize: vertical;
    background-color: $background-color;
    color: $text-color;
    resize: none;
    margin-bottom: 30px;
}

.email-body:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(226, 203, 74, 0.5);
}

.smtp-input:focus {
    box-shadow: 0 0 5px rgba(226, 203, 74, 0.5);
    outline: none;
}

.smtp-input {
    border: 1px solid $border-color;
}

.cancel-button:hover {
    box-shadow: rgba(9, 8, 7, 0.4) -2px 2px, $shadow-color -4px 4px, rgba(204, 155, 39, 0.2) -6px 6px, rgba(204, 155, 39, 0.1) -8px 8px, rgba(204, 155, 39, 0.05) -10px 10px;
}

/* Width of the scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 12px;
}

/* Track */
::-webkit-scrollbar-track {
    background: $primary-color;
    border-radius: 6px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: $shadow-color;
    border-radius: 6px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #555;
}


.spacing-modal {
    height: 30px;
    width: calc(70vw - .1px);
    background-color: $primary-color;
    padding-left: 2rem;
    padding-right: 2rem;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border: 1px solid $border-color;
    border-bottom: none;
    display: flex;
    justify-content: flex-end;
}

.spacing-modal-2 {
    height: 30px;
    width: calc(70vw - .1px);
    background-color: $primary-color;
    padding-left: 2rem;
    padding-right: 2rem;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    border: 1px solid $border-color;
    border-top: none;
}

