/* Image Upload and Preview Styling */


.template-image {
    width: 100px;
    height: 140px;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

    .template-image.imgselected {
        border-color: blue;
    }

.custom-select2 {
    position: relative;
    display: inline-block;
    width: 100%;
}
.file-upload-container {
    margin-top: 15px;
}

.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* Enhanced file preview styling */
.file-preview {
    position: relative;
    width: 220px;
    height: 150px;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
    display: inline-flex;
    flex-direction: column;
    margin: 5px;
    background: #f8f9fa;
}

    .file-preview img {
        width: 100%;
        height: 100%;
    /*    object-fit: contain;*/
        background: white;
      
    }

    .file-preview .fa-file-pdf {
        color: #d93025;
    }

    .file-preview .fa-file-word {
        color: #2b579a;
    }

    .file-preview .fa-file-excel {
        color: #217346;
    }

    .file-preview .fa-file-powerpoint {
        color: #d24726;
    }

.file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Responsive adjustments */


.file-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: space-around;
    padding: 5px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.file-preview:hover .file-actions {
    transform: translateY(0);
}

.frame-options {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px;
    z-index: 10;
}

    .frame-options select, .frame-options button {
        width: 100%;
        margin-bottom: 5px;
    }

.effect-applied {
   /* border: 3px solid #4CAF50;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);*/
}
/*  media (max-width: 768px) {
            .file-preview {
                width: 120px;
                height: 120px;
            } */

/* Image Editor Styles */
.canvas-container {
    width: 665px !important;
    height: 400px !important;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    overflow: hidden;
   
    position: relative;
    border-radius: 25px;
}

#imageEditorCanvas {
    width: 665px !important;
    height: 400px !important;
    border-radius: 25px !important;
}
.upper-canvas {
    border-radius: 25px !important;
}

.frame-option, .template-option {
    cursor: pointer;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

    .frame-option:hover, .template-option:hover {
        background: #f0f0f0;
        border-color: #ddd;
    }

    .frame-option.active, .template-option.active {
        border-color: #0d6efd;
        background: #e7f1ff;
    }

    .frame-option img, .template-option img {
        max-width: 100%;
        height: 80px;
        object-fit: contain;
        margin-bottom: 5px;
    }

    .frame-option span, .template-option span {
        display: block;
        font-size: 12px;
    }



.editor-tools {
    margin-top: 15px;
}

.tool-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

    .tool-section h6 {
        margin-bottom: 10px;
        font-weight: bold;
    }

#imageEditorCanvas {
    display: block;
    touch-action: none; /* Important for mobile touch handling */
}
/* Text controls styling */
#text-controls .form-control-color {
    height: 38px;
    padding: 2px;
}

#textInput {
    resize: vertical;
    min-height: 100px;
}

/* Text object styling on canvas */
.fabric-text {
    cursor: move;
}

.fabric-text-editing {
    outline: none;
    min-width: 50px;
    background: rgba(255,255,255,0.8);
    padding: 5px;
}
/* Remove text button styling */
#removeTextBtn {
    transition: all 0.3s ease;
}

    #removeTextBtn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    #removeTextBtn:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

.cropper-view-box,
.cropper-face {
    border-radius: 50%; /* Makes cropping circle (for profile pics) */
}

/* For non-circle crops, remove the border-radius above */
.cropper-modal {
    background-color: rgba(0, 0, 0, 0.5);
}

.cropper-line {
    background-color: rgba(255, 255, 255, 0.8);
}

.cropper-point {
    background-color: #fff;
    width: 8px;
    height: 8px;
    opacity: 1;
}

    .cropper-point.point-se {
        width: 15px;
        height: 15px;
        opacity: 1;
    }

.cropper-crop-box {
    border: 2px dashed rgba(255, 255, 255, 0.8);
    width:600px;
    height: 400px;  
}

.cropper-dashed {
    border-color: rgba(255, 255, 255, 0.5);
}

.layers-list .list-group-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
}

    .layers-list .list-group-item.active {
        background-color: #e9ecef;
        color: #495057;
        border-color: #dee2e6;
    }

.layers-list .layer-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.layers-list .layer-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layers-list .layer-visibility {
    color: #6c757d;
    margin-left: 10px;
}

.layers-list .list-group-item.hidden .layer-name {
    opacity: 0.5;
    text-decoration: line-through;
}
.layer-expand-toggle {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    text-align: center;
}

.layer-item-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.collapsed > .layer-item-content > .layer-name {
    opacity: 0.6;
    text-decoration: line-through;
}

.layer-children {
    padding-left: 20px;
    display: none;
}

.expanded > .layer-children {
    display: block;
}
#textSizeValue {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}


.modal-header {
    cursor: move;
}

.add-goal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.max-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}