#SavePhotoIdeaModel.save-popup-overlay {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: none;
    overflow: auto;
    padding: 24px;
    background: rgba(10, 22, 35, 0.66);
    backdrop-filter: blur(4px);
}

#SavePhotoIdeaModel .save-popup-panel {
    width: min(980px, 100%);
    max-width: 980px;
    margin: 5vh auto;
    padding: 28px 38px 30px;
    overflow: visible;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(10, 25, 40, 0.3);
    color: #17324b;
    text-align: left;
    animation: save-popup-enter 180ms ease-out;
}

#SavePhotoIdeaModel .save-popup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
}

#SavePhotoIdeaModel .save-popup-header h2 {
    margin: 0 0 3px;
    color: #17324b;
    font-family: inherit;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

#SavePhotoIdeaModel .save-popup-header p {
    margin: 0;
    color: #667586;
    font-size: 16px;
    line-height: 1.45;
}

#SavePhotoIdeaModel .save-popup-close {
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: -3px -5px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #17324b;
    cursor: pointer;
    font-size: 31px;
    font-weight: 300;
    line-height: 1;
}

#SavePhotoIdeaModel .save-popup-content {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.35fr);
    align-items: start;
    gap: 28px;
    margin: 0 0 24px;
    overflow: visible;
}

#SavePhotoIdeaModel .save-popup-preview {
    width: 100%;
    height: 340px;
    aspect-ratio: 1.25;
    overflow: hidden;
    border-radius: 8px;
    background: #edf0f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#SavePhotoIdeaModel .save-popup-preview img { 
    max-width: 100%;
    max-height: 100%;
    margin-bottom:0px !important; border-radius: 8px;
    
    
}

#SavePhotoIdeaModel .save-popup-fields {
    min-width: 0;
}

#SavePhotoIdeaModel .wrapper {
    margin: 0 0 21px;
    text-align: left;
}

#SavePhotoIdeaModel .save-popup-label {
    display: block;
    margin: 0 0 7px;
    color: #17324b;
    font-size: 15px;
    font-weight: 700;
}

#SavePhotoIdeaModel .save-popup-label span {
    color: #697888;
    font-weight: 400;
}

#SavePhotoIdeaModel .custom-select {
    width: 100%;
}

#SavePhotoIdeaModel .select-css {
    height: 54px;
    padding: 0 48px 0 15px;
    border: 1px solid #d6dce2;
    border-radius: 8px;
    box-shadow: none;
    color: #526273;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
}

#SavePhotoIdeaModel .select-css:focus {
    border-color: #6c879f;
    outline: 3px solid rgba(33, 90, 130, 0.12);
}

#SavePhotoIdeaModel .custom-select-icons {
    top: 17px;
    right: 14px;
    display: flex;
    width: 18px;
    height: 20px;
    align-items: center;
    border: 0;
}

#SavePhotoIdeaModel .custom-select-icons .icon {
    width: 16px;
    height: 16px;
    fill: #17324b;
}

#SavePhotoIdeaModel .custom-select-options {
    top: 100%;
    margin-top: 2px;
    border: 1px solid #d6dce2;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(20, 40, 60, 0.14);
}

#SavePhotoIdeaModel .custom-select-options li {
    padding: 11px 14px;
    color: #34495c;
    font-size: 14px;
}

#SavePhotoIdeaModel .custom-select-options li:hover,
#SavePhotoIdeaModel .custom-select-options li:focus {
    border-color: #f3b31b;
    background: #fff7df;
    color: #17324b;
}

#SavePhotoIdeaModel .save-popup-note textarea {
    display: block;
    width: 100%;
    min-height: 112px;
    padding: 13px 15px;
    resize: vertical;
    border: 1px solid #d6dce2;
    border-radius: 8px;
    background: #fff;
    color: #263e53;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

#SavePhotoIdeaModel .save-popup-note textarea::placeholder {
    color: #8793a0;
}

#SavePhotoIdeaModel .save-popup-note textarea:focus {
    border-color: #6c879f;
    outline: 3px solid rgba(33, 90, 130, 0.12);
}

#SavePhotoIdeaModel .save-popup-counter {
    min-height: 19px;
    margin-top: 3px;
    color: #84909c;
    font-size: 12px;
    text-align: right;
}

#SavePhotoIdeaModel #ErrorMessageContainer:not(:empty) {
    margin: -8px 0 14px;
    color: #a62f2f;
    font-size: 13px;
}

#SavePhotoIdeaModel .save-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

#SavePhotoIdeaModel .save-popup-actions button {
    min-width: 145px;
    min-height: 48px;
    padding: 10px 22px;
    border-radius: 26px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

#SavePhotoIdeaModel .save-popup-actions button:hover {
    transform: translateY(-1px);
}

#SavePhotoIdeaModel .save-popup-cancel {
    border: 1px solid #aab4be;
    background: #fff;
    color: #17324b;
}

#SavePhotoIdeaModel .save-popup-cancel:hover {
    border-color: #536b80;
    background: #f7f9fa;
}

#SavePhotoIdeaModel .save-popup-submit {
    border: 1px solid #ffb817;
    background: #ffb817;
    color: #17324b;
}

#SavePhotoIdeaModel .save-popup-submit:hover {
    border-color: #eda600;
    background: #eda600;
}

@keyframes save-popup-enter {
    from { opacity: 0; transform: translateY(8px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
    #SavePhotoIdeaModel.save-popup-overlay {
        padding: 14px;
    }

    #SavePhotoIdeaModel .save-popup-panel {
        margin: 3vh auto;
        padding: 22px 20px;
        border-radius: 12px;
    }

    #SavePhotoIdeaModel .save-popup-header {
        gap: 12px;
        margin-bottom: 20px;
    }

    #SavePhotoIdeaModel .save-popup-header h2 {
        font-size: 25px;
    }

    #SavePhotoIdeaModel .save-popup-header p {
        font-size: 14px;
    }

    #SavePhotoIdeaModel .save-popup-content {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 18px;
    }

    #SavePhotoIdeaModel .save-popup-preview {
        max-height: 230px;
        aspect-ratio: 1.6;
    }

    #SavePhotoIdeaModel .wrapper {
        margin-bottom: 17px;
    }

    #SavePhotoIdeaModel .save-popup-actions {
        gap: 9px;
    }

    #SavePhotoIdeaModel .save-popup-actions button {
        min-width: 0;
        flex: 1;
        padding: 10px 13px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #SavePhotoIdeaModel .save-popup-panel,
    #SavePhotoIdeaModel .save-popup-actions button {
        animation: none;
        transition: none;
    }
}
