/* ===============================
   Modal Base
   =============================== */

/* Hide modal by default */
#cl-image-editor-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    z-index: 999999;
}

/* ===============================
   Editor Container
   =============================== */
#tui-image-editor-container {
    height: 100%;
}

/* ===============================
   Control Bar
   =============================== */

#cl-image-editor-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

#cl-image-editor-save,
#cl-image-editor-close {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    min-width: 90px;
    text-align: center;
    transition: background 0.2s ease;
}

#cl-image-editor-save {
    background: #28a745;
    color: #fff;
}
#cl-image-editor-save:disabled {
    background: #6c757d;
    cursor: wait;
}

#cl-image-editor-close {
    background: #dc3545;
    color: #fff;
}

/* ===============================
   Toast UI Overrides
   =============================== */

/* Hide the Toast UI header */
.tui-image-editor-header {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}


/* Style Toast UI top help menu */
.tui-image-editor-container .tui-image-editor-help-menu.top {
    top: 10px !important;      /* add margin from top */
    left: 50% !important;
    transform: translateX(-50%); /* center align */
    max-width: 95%;            /* avoid touching screen edges */
    flex-wrap: wrap;           /* allow wrapping on small screens */
    justify-content: center;   /* center items */
    gap: 6px;                  /* spacing between items */
}

/* Each item in the help menu */
.tui-image-editor-container .tui-image-editor-help-menu.top li {
    margin: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* Make sure custom edit button is always clickable */
.cl-button-editor {
    position: relative;
    z-index: 10000;
    cursor: pointer;
}



/* ===============================
   Responsive Tweaks
   =============================== */

/* ✅ Mobile adjustments only */
@media (max-width: 600px) {
    #cl-image-editor-controls {
        position: relative;
        bottom: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 12px;
        background: #f8f8f8;
        border-top: 1px solid #ddd;
        width: 105%;
    }
    #tui-image-editor-container {
    height: 90%!important;
}
    #cl-image-editor-controls button {
        width: 100%;
        font-size: 14px;
    }
}
