@font-face {
    font-family: "AmadeusAP";
    src: url("./fonts/AmadeusAP.woff2") format("woff2"), url("./fonts/AmadeusAP.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.ns-photo-create-modal :where(h1, h2, h3, h4, h5, h6, p, img) {
    margin: 0;
    padding: 0;
}

/* MODAL */
.ns-photo-create-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(58,63,68, .7);
    width: 100%;
    height: 100%;
    position: fixed;
    opacity: 0;
    pointer-events: none;
    inset: 0;
    z-index: 30;
    padding: calc(var(--ns-header-height, 0) + 48px) 0 48px;
    transition-property: opacity;
    transition-duration: 0.5s;
    transition-timing-function: ease;
    box-sizing: border-box;
}

.ns-photo-create-modal.ns-photo-create-modal--opened {
    opacity: 1;
    pointer-events: auto;
}

.ns-photo-create-modal__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 20px;
    width: 1280px;
    min-height: 320px;
    max-height: calc(100% - 160px);
    background-color: #FFFFFF;
    border-radius: 28px;
    border: 1px solid #EBEDF1;
    color: #1F2023;
    padding: 60px 40px 40px;
    box-shadow: 0 10px 10px -5px rgba(0,0,0, .04);
    position: relative;
    box-sizing: border-box;
    margin-bottom: var(--ns-modal-offset-bottom, 0);
    overflow: hidden;
}

.ns-photo-create-modal__close {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none'%3E%3Cpath stroke='%236A6F75' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 25 10-10m-10 0 10 10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 1;
    cursor: pointer;
}

.ns-photo-create-modal__content {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 60px;
    width: 100%;
    overflow: hidden;
}

/* ASIDE */
.ns-photo-create-modal__aside {
    display: block;
    width: auto;
    max-width: 594px;
    height: auto;
    overflow: hidden auto;
}

.ns-photo-create-modal__aside-scroll {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 40px;
    min-height: 100%;
}

.ns-photo-create-modal__aside-footer {
    display: block;
    position: sticky;
    bottom: 0;
    background-color: #fff;
    box-shadow: 
        0 -15px 30px 0 #fff,
        0 30px 0 30px #fff;
    z-index: 10;
}

.ns-photo-create-modal__main {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: clamp(100px, 100%, 544px);
    height: auto;
}

/* ASIDE HEAD */
.ns-photo-create-modal__aside-head {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 30px;
    flex-shrink: 0;
}

.ns-photo-create-modal__aside-head-title {
    font-weight: 700;
    font-size: 44px;
    line-height: 1.14;
}

.ns-photo-create-modal__aside-head-description {
    font-weight: 500;
    font-size: 18px;
    line-height: 1.4;
}

/* ASIDE BODY */
.ns-photo-create-modal__aside-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
    flex-shrink: 0;
}

/* ASIDE FIELD */
.ns-photo-create-modal__aside-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
}

.ns-photo-create-modal__aside-field-label {
    font-weight: 600;
    font-size: 18px;
    line-height: 1.44;
}

/* UPLOAD */
.ns-photo-create-modal__upload {
    display: block;
    width: 100%;
}

.ns-photo-create-modal__upload-input {
    display: none;
}

/* UPLOAD INFO */
.ns-photo-create-modal__upload-info {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    border-radius: 12px;
    border: 2px dashed #b7beca;
    padding: 24px;
    box-sizing: border-box;
    cursor: pointer;
}

.ns-photo-create-modal__upload-info::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath stroke='%23e00e1a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.182' d='M5.332 21.333v1.333a4 4 0 0 0 4 4h13.333a4 4 0 0 0 4-4v-1.333m-5.333-5.334-5.333 5.334m0 0-5.334-5.334M16 21.333v-16'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.ns-photo-create-modal__upload-info-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    font-weight: 700;
}

.ns-photo-create-modal__upload-info-text p:nth-child(1) {
    font-size: 16px;
    line-height: 1.75;
    color: #5a616c;
}

.ns-photo-create-modal__upload-info-text p:nth-child(1) > span {
    color: #e00e1a;
}

.ns-photo-create-modal__upload-info-text p:nth-child(2) {
    font-size: 13px;
    line-height: 1.38;
    color: #9299a5;
}

/* PREVIEW */
.ns-photo-create-modal__upload-preview {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    border-radius: 12px;
    border: 2px dashed #b7beca;
    padding: 24px;
    box-sizing: border-box;
    overflow: hidden;
}

.ns-photo-create-modal__upload-preview-image {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
}

.ns-photo-create-modal__upload-preview-filename {
    max-width: 100%;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #1f2023;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ns-photo-create-modal__upload-preview-remove {
    flex-shrink: 0;
    display: block;
    width: 35px;
    height: 36px;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' fill='none' viewBox='0 0 36 36'%3E%3Cpath stroke='%235a616c' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m23.834 13.833-.723 10.12A1.667 1.667 0 0 1 21.45 25.5h-6.897c-.874 0-1.6-.676-1.662-1.548l-.723-10.119m4.167 3.334v5m3.333-5v5m.834-8.334v-2.5a.833.833 0 0 0-.834-.833h-3.333a.833.833 0 0 0-.833.833v2.5m-4.167 0h13.333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    margin-left: auto;
    cursor: pointer;
}

/* TEXTAREA */
.ns-photo-create-modal__textarea {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
    width: 100%;
}

.ns-photo-create-modal__textarea-field {
    display: block;
    width: 100%;
    position: relative;
}

.ns-photo-create-modal__textarea-field textarea {
    display: block;
    width: 100%;
    height: 170px;
    min-height: 170px;
    max-height: 250px;
    border: 2px solid #ebedf1;
    background-color: #fff;
    font-family: inherit;
    border-radius: 12px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.44;
    color: #1f2023;
    padding: 14px 16px 64px;
    box-sizing: border-box;
    overflow: hidden auto;
    resize: vertical;
    transition: border-color .2s ease;
}

.ns-photo-create-modal__textarea-field textarea:hover {
    border-color: #b7beca;
}

.ns-photo-create-modal__textarea-field textarea:focus {
    border-color: #1f2023;
}

.ns-photo-create-modal__textarea-gen {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: auto;
    height: 36px;
    border-radius: 6px;
    background-color: #ffe7e7;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.43;
    color: #e00e1a;
    padding: 0 16px 0 12px;
    box-sizing: border-box;
    user-select: none;
    cursor: pointer;
    transition: background-color .2s ease;
    position: absolute;
    left: 16px;
    bottom: 14px;
}

.ns-photo-create-modal__textarea-gen::before {
    flex-shrink: 0;
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'%3E%3Cpath fill='%23e00e1a' d='M6.211 2.26c.312-.791 1.433-.791 1.745 0l.968 2.454a.94.94 0 0 0 .529.529l2.453.968c.792.312.792 1.433 0 1.745l-2.453.968a.94.94 0 0 0-.529.528l-.968 2.454c-.312.792-1.433.792-1.745 0l-.968-2.454a.94.94 0 0 0-.528-.528L2.26 7.956c-.792-.312-.792-1.433 0-1.745l2.454-.968a.94.94 0 0 0 .528-.529zm7.892 8.9a.516.516 0 0 1 .96 0l.75 1.903a.52.52 0 0 0 .29.29l1.904.75a.516.516 0 0 1 0 .96l-1.903.75a.52.52 0 0 0-.29.291l-.751 1.903a.516.516 0 0 1-.96 0l-.75-1.903a.52.52 0 0 0-.29-.29l-1.904-.75a.516.516 0 0 1 0-.96l1.903-.75a.52.52 0 0 0 .29-.291z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.ns-photo-create-modal__textarea-gen:hover {
    background-color: #ffd9d9;
}

.ns-photo-create-modal__textarea-limit {
    display: block;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.38;
    color: #9299a5;
    text-align: right;
    user-select: none;
}


/* PHOTO CREATE PREVIEW */

.ns-photo-create-preview {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background-image: 
        url("./image/back.jpg"),
        linear-gradient(117deg, #5284ff, #4a48d6);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    overflow: hidden;
    padding: 12.94% 17.46%;
    position: relative;
    pointer-events: none;
    box-sizing: border-box;
}

.ns-photo-create-preview::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-image: url("./image/front.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ns-photo-create-preview__canvas {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 354 / 459;
    transform: rotate(7deg);
}

/* BUTTON */
.ns-photo-create-modal__button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 60px;
    border-radius: 8px;
    background-color: #e00e1a;
    font-weight: 600;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: background-color .2s ease;
}

.ns-photo-create-modal__button:hover {
    background-color: #f01622;
}

.ns-photo-create-modal__button--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* PREVIEW MODAL */
.ns-photo-create-preview-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(58,63,68, .7);
    width: 100%;
    height: 100%;
    position: fixed;
    opacity: 0;
    pointer-events: none;
    inset: 0;
    z-index: 30;
    padding: calc(var(--ns-header-height, 0) + 48px) 0 48px;
    transition-property: opacity;
    transition-duration: 0.5s;
    transition-timing-function: ease;
    box-sizing: border-box;
}

.ns-photo-create-preview-modal__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 20px;
    width: 800px;
    min-height: 320px;
    max-height: calc(100% - 160px);
    background-color: #FFFFFF;
    border-radius: 28px;
    border: 1px solid #EBEDF1;
    color: #1F2023;
    padding: 60px 24px 24px;
    box-shadow: 0 10px 10px -5px rgba(0,0,0, .04);
    position: relative;
    box-sizing: border-box;
    margin-bottom: var(--ns-modal-offset-bottom, 0);
    overflow: hidden;
}

.ns-photo-create-preview-modal__close {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none'%3E%3Cpath stroke='%236A6F75' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m15 25 10-10m-10 0 10 10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 1;
    cursor: pointer;
}

.ns-photo-create-preview-modal__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
    width: 100%;
    overflow: hidden;
}

.ns-photo-create-preview-modal__preview {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 280px;
    max-height: 600px;
    aspect-ratio: 335 / 280;
    border-radius: 15px;
    background-image: 
        url("./image/back.jpg"),
        linear-gradient(117deg, #5284ff, #4a48d6);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    overflow: hidden;
    padding: 12.94% 31px;
    position: relative;
    pointer-events: none;
    box-sizing: border-box;
}

.ns-photo-create-preview-modal__preview::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-image: 
        url("./image/front-1.png"),
        url("./image/front-2.png");
    background-repeat: no-repeat;
    background-position: -45% 210%, 70% 135%;
    background-size: auto 75%, auto 45%;
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ns-photo-create-preview-modal__preview canvas {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 172 / 209;
    background-color: #fff;
    transform: rotate(7deg);
}

.ns-photo-create-preview-modal__button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 48px;
    border-radius: 8px;
    background-color: #e00e1a;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    user-select: none;
    transition: background-color .2s ease;
}

.ns-photo-create-preview-modal__button:hover {
    background-color: #f01622;
}

@media (max-width: 991px) {
    /* MODAL */
    .ns-photo-create-modal {
        padding: 0;
        align-items: flex-start;
        z-index: 9999;
    }

    .ns-photo-create-modal__inner {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        gap: 10px;
        padding: 0;
        transform: translateY(100%);
        transition: transform 0.6s ease;
        overflow: hidden auto;
    }

    .ns-photo-create-modal--opened .ns-photo-create-modal__inner {
        transform: translateY(0);
    }

    .ns-photo-create-modal__content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 24px;
        width: 100%;
        overflow: hidden auto;
        padding: 64px 20px 24px;
        box-sizing: border-box;
    }

    .ns-photo-create-modal__close {
        width: 48px;
        height: 48px;
        right: 8px;
        top: 8px;
        z-index: 2;
    }

    .ns-photo-create-modal__aside,
    .ns-photo-create-modal__main {
        width: 100%;
        max-width: 100%;
        height: auto;
        overflow: visible;
    }

    .ns-photo-create-modal__main {
        order: -1;
    }

    /* PREVIEW */
    .ns-photo-create-preview {
        height: 280px;
        padding: 31px 50px;
    }

    .ns-photo-create-preview::before {
        width: 246px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* ASIDE */
    .ns-photo-create-modal__aside-head {
        gap: 16px;
    }

    .ns-photo-create-modal__aside-head-title {
        font-size: 24px;
        line-height: 1.17;
    }

    .ns-photo-create-modal__aside-head-description {
        font-size: 14px;
        line-height: 1.43;
    }

    /* UPLOAD */
    .ns-photo-create-modal__upload-info {
        gap: 16px;
        padding: 16px;
    }

    .ns-photo-create-modal__upload-info-text p:first-child {
        font-size: 0;
        line-height: 1.43;
    }

    .ns-photo-create-modal__upload-info-text p:first-child span {
        font-size: 14px;
    }

    .ns-photo-create-modal__upload-preview {
        gap: 16px;
        padding: 16px;
    }

    /* PREVIEW MODAL */
    .ns-photo-create-preview-modal.ns-photo-create-preview-modal--opened {
        opacity: 1;
        pointer-events: auto;
    }

    .ns-photo-create-preview-modal {
        align-items: flex-end;
    }

    .ns-photo-create-preview-modal__inner {
        width: 100%;
        gap: 10px;
        border-radius: 16px 16px 0 0;
        padding: 32px 20px 24px;
        transform: translateY(100%);
        transition: transform 0.6s ease;
    }

    .ns-photo-create-preview-modal--opened .ns-photo-create-preview-modal__inner {
        transform: translateY(0);
    }

    .ns-photo-create-preview-modal__close {
        width: 56px;
        height: 4px;
        background-color: #E0E0E0;
        background-image: none;
        left: 50%;
        top: 6px;
        transform: translateX(-50%);
    }

    .ns-photo-create-preview-modal__close::before {
        content: "";
        display: block;
        width: 150%;
        height: 40px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}