
@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes dialogFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.ws-dialog-model-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ws-dialog-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/*.ws-dialog {
    position: relative;
    background-color: #fff;
    border-radius: 4px;*/
/*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/
/*box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;*/
/*box-shadow: rgb(38, 57, 77) 0px 20px 30px -10px;*/
/*max-width: 86%;
    max-height: 85%;
    margin: 0 20px;
    overflow: hidden;
}*/

/*.ws-dialog {
    position: relative;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    width: 86vw;
    height: 85vh;
    margin: 0 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}*/

.ws-dialog {
    position: relative;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    max-width: 86vw;
    max-height: 90vh;
    margin: 5px 5px;
    overflow: hidden;
    /*display: flex;*/
    flex-direction: column;
    box-sizing: border-box;
    /* Optional: shrink-wrap effect */
    width: fit-content;
    height: fit-content;
    transition: opacity 0.3s ease, transform 0.3s ease;
    /*transition: all 0.3s ease-in-out;*/
    padding: 10px;
    /*margin-top: 40px;*/
    top: 20px;
}

    .ws-dialog.ws-opening {
        animation: dialogFadeIn 0.25s ease forwards;
    }

    .ws-dialog.ws-closing {
        animation: dialogFadeOut 0.2s ease forwards;
    }

.ws-dialog-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ws-dialog-close-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10;
}

    .ws-dialog-close-icon:hover,
    .ws-dialog-close-icon:focus {
        background-color: #ebebeb;
    }

/*.ws-dialog-content {
    overflow: auto;
    padding: 16px;
    flex: 1;
}*/

.ws-dialog-content {
    /*overflow: auto;*/
    /*padding: 5px;*/
    /*margin: 5px;*/
    /*margin-bottom: 15px;*/
    box-sizing: border-box;
    /*max-height: calc(85vh - 32px);*/ /* subtract padding/margins if needed */
    max-height: none;
    max-width: calc(86vw - 32px);
    overflow: hidden;
    height: 100%;
}

.ws-dialog-footer {
    padding: 10px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ws-dialog-button {
    padding: 6px 15px;
    border-radius: 4px;
}

.ws-cancel-button {
    border: 1px solid #e2e8f0;
    background-color: white;
    cursor: pointer;
    color: #000000;
}

.ws-ok-button {
    border: none;
    background-color: var(--sp--color,#3b82f6);
    color: white;
    cursor: pointer;
}

.ws-dialog-button:hover {
    opacity: 0.9;
}

.ws-cancel-button:hover {
    background-color: #f5f5f5;
}

/* Resizable handle styles */
.ui-resizable-handle {
    background: transparent;
}

.ui-resizable-se {
    width: 12px;
    height: 12px;
    right: 1px;
    bottom: 1px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666" d="M11 1v10L1 11z"/></svg>') no-repeat;
    cursor: nw-resize;
}

.ui-resizable-s {
    cursor: s-resize;
    height: 7px;
    width: 100%;
    bottom: 1px;
    left: 0;
}

.ui-resizable-e {
    cursor: e-resize;
    width: 7px;
    right: 1px;
    top: 0;
    height: 100%;
}

.ui-resizable-n {
    cursor: n-resize;
    height: 7px;
    width: 100%;
    top: 1px;
    left: 0;
}

.ui-resizable-w {
    cursor: w-resize;
    width: 7px;
    left: 1px;
    top: 0;
    height: 100%;
}

.ui-resizable-ne {
    cursor: ne-resize;
    width: 7px;
    height: 7px;
    right: 1px;
    top: 1px;
}

.ui-resizable-nw {
    cursor: nw-resize;
    width: 7px;
    height: 7px;
    left: 1px;
    top: 1px;
}

.ui-resizable-sw {
    cursor: sw-resize;
    width: 7px;
    height: 7px;
    left: 1px;
    bottom: 1px;
}

.ws-dialog.ui-resizable-resizing {
    transition: none;
}

.ws-dialog-pin-icon {
    position: absolute;
    top: 5px;
    right: 35px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10;
}

    .ws-dialog-pin-icon:hover,
    .ws-dialog-pin-icon:focus {
        background-color: #ebebeb;
    }

.ws-dialog-header-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.ws-dialog-header-controls-no-title {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.ws-dialog-pinned {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000 !important;
    pointer-events: none;
    margin: 0 !important;
}

    .ws-dialog-pinned .ws-dialog {
        pointer-events: auto;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        border: 2px solid #007bff;
        margin: 0 !important;
        top: 0 !important;
        transition: all 0.3s ease-in-out
    }

.ws-dialog-pinned-right .ws-dialog {
    right: 0 !important;
    top: 0 !important;
    width: 500px;
    height: 100vh !important;
    border-radius: 8px 0 0 8px;
    max-height: none !important;
}

.ws-dialog-pinned .ws-dialog-content {
    height: calc(100vh - 70px) !important;
    max-height: none !important;
    overflow-y: auto;
    padding: 5px;
}

.ws-dialog-pinned .ws-dialog-header {
    padding: 12px 16px;
    min-height: 50px;
    box-sizing: border-box;
}

.ws-dialog-pinned .scurve-main-container {
    height: 100% !important;
    width: 100% !important;
    padding: 5px;
}


.ws-dialog-pinned .ws-dialog-pin-icon:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

@media (max-width: 768px) {
    .ws-dialog-pinned-left .ws-dialog, .ws-dialog-pinned-right .ws-dialog {
        width: 320px;
    }

    .ws-dialog-pinned-top .ws-dialog,
    .ws-dialog-pinned-bottom .ws-dialog {
        height: 250px;
    }
}
