#rtcl-gallery-upload-ui-wrapper {
    --rtcl-gallery-primary: #00a877;
    --rtcl-gallery-primary-hover: #008f66;
    --rtcl-gallery-border: #d9e2de;
    --rtcl-gallery-bg: #f5faf8;
    --rtcl-gallery-text: #1f2937;
    --rtcl-gallery-muted: #6b7280;
    --rtcl-gallery-radius: 14px;
}

/* Upload area */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery {
    width: 100%;
    height: auto;
    min-height: 190px;
    padding: 30px 20px;
    margin: 0;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: var(--rtcl-gallery-bg);
    border: 2px dashed var(--rtcl-gallery-border);
    border-radius: var(--rtcl-gallery-radius);

    opacity: 1;
    text-align: center;
    line-height: normal;
    font-weight: normal;

    transition:
        border-color .2s ease,
        background-color .2s ease,
        box-shadow .2s ease;
}

/* Remove old paragraph spacing */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery p {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Drop text */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery > p:first-child {
    position: relative;
    margin-bottom: 18px;
    /*padding-top: 52px;*/

    color: var(--rtcl-gallery-muted);
    font-size: 14px;
    font-weight: 400;
}

/* Upload icon */
/*#rtcl-gallery-upload-ui-wrapper .rtcl-gallery > p:first-child::before {*/
/*    content: "↑";*/
/*    position: absolute;*/
/*    top: 0;*/
/*    left: 50%;*/
/*    transform: translateX(-50%);*/

/*    width: 42px;*/
/*    height: 42px;*/

/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/

/*    border: 1px solid #cbd5e1;*/
/*    border-radius: 50%;*/

/*    background: #fff;*/
/*    color: var(--rtcl-gallery-primary);*/

/*    font-size: 22px;*/
/*    font-weight: 600;*/
/*    line-height: 1;*/

/*    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);*/
/*}*/

/* Button wrapper */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery > p:last-child {
    margin: 0;
}

/* Main upload button */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery .rtcl-gallery-browse-button {
    min-width: 230px;
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 24px;

    border: 0 !important;
    border-radius: 10px !important;

    background: var(--rtcl-gallery-primary) !important;
    color: #fff !important;

    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;

    box-shadow: 0 4px 12px rgba(0, 168, 119, .22);

    transition:
        background-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

/* Button text */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery .rtcl-gallery-browse-button::before {
    content: "↑";
    margin-left: 8px;
    font-size: 18px;
}

/* Button hover */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery .rtcl-gallery-browse-button:hover,
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery .rtcl-gallery-browse-button:focus {
    background: var(--rtcl-gallery-primary-hover) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(0, 168, 119, .28);
}

/* Upload area hover */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery:hover {
border-color: #8ed9c3;
background: #f2faf7;
}

/* Drag over */
#rtcl-gallery-upload-ui-wrapper.drag-over .rtcl-gallery {
    min-height: 190px;
    height: auto;

background: #e8f7f2;
border: 2px dashed var(--rtcl-gallery-primary);

box-shadow: inset 0 0 0 1px rgba(0, 168, 119, .08);
    opacity: 1;
}

#rtcl-gallery-upload-ui-wrapper.drag-over .rtcl-gallery > p:first-child {
    color: var(--rtcl-gallery-primary);
}

#rtcl-gallery-upload-ui-wrapper.drag-over .rtcl-gallery > p:first-child::before {
background: #e8f7f2;
border-color: #8ed9c3;
}

/* Hide browse button while dragging */
#rtcl-gallery-upload-ui-wrapper.drag-over .rtcl-gallery .rtcl-gallery-browse-button {
    display: none;
}


/*  -  UPLOADED IMAGES */

#rtcl-gallery-upload-ui-wrapper .rtcl-gallery-uploads {
    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;

    width: 100%;
    margin-top: 15px;
    padding: 0 !important;

    overflow: visible;
}

/* Image item */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery-uploads .rtcl-gallery-upload-item {
    position: relative;

    float: none;

    width: 100%;
    height: 120px;

    margin: 0;

    overflow: hidden;

    background: #fff;

    border: 1px solid var(--rtcl-gallery-border);
    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery-uploads .rtcl-gallery-upload-item .rtcl-gallery-upload-item{
       border: none !important;
    box-shadow: none !important; 
}
/* Item hover */
#rtcl-gallery-upload-ui-wrapper .rtcl-gallery-uploads .rtcl-gallery-upload-item:hover {
    transform: translateY(-2px);

    border-color: #8ed9c3;

    box-shadow: 0 7px 18px rgba(15, 23, 42, .12);
}

/* Image */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-item-img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    cursor: move;

    transition: transform .25s ease;
}

/* Image zoom */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item:hover
.rtcl-gallery-upload-item-img {
    transform: scale(1.03);
}


/*  - IMAGE ACTIONS */

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions {
    position: absolute;

    display: flex !important;
    align-items: center;
    gap: 5px;

    right: 7px;
    bottom: 7px;

    height: auto;

    margin: 0 !important;
    padding: 0 !important;

    opacity: 0;

    transition: opacity .2s ease;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item:hover
.rtcl-gallery-upload-actions {
    opacity: 1;
}

/* Action buttons */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions a {
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border-radius: 7px;

    background: rgba(15, 23, 42, .78);
    color: #fff !important;

    font-size: 14px;

    backdrop-filter: blur(5px);

    transition:
        background-color .2s ease,
        transform .2s ease;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions a:hover {
    background: rgba(15, 23, 42, .95);
    color: #fff !important;
    transform: scale(1.05);
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions
a.rtcl-button-remove {
    color: #fff !important;
}


/*  - ITEM FEATURES */

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-item-features {
    position: absolute;

    top: 7px;
    right: 7px;

    display: flex;
    gap: 4px;

    font-size: 12px;
    line-height: 1;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-item-features
.rtcl-gallery-item-feature {
    float: none;

    padding: 5px 7px;

    border-radius: 6px;

    background: rgba(15, 23, 42, .7);

    color: #fff;

    backdrop-filter: blur(5px);
}
.rtcl-gallery-item-features span.rtcl-gallery-item-feature::before {
    content: "تصویر اصلی  " !important;
    width: 100% !important;
}

/*   - UPLOAD PROGRESS / UPDATE  */

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-update {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, .75);

    backdrop-filter: blur(3px);
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-update
.rtcl-icon-spinner {
    font-size: 42px;
    line-height: 1;
}


/*    DESCRIPTION  */

#rtcl-gallery-upload-ui-wrapper .description {
    margin-top: 15px !important;
    padding: 11px 14px !important;

    border: 1px solid #fecaca !important;
    border-radius: 9px !important;

    background: #fef2f2 !important;
    color: #991b1b !important;

    font-size: 13px;
    line-height: 1.8;
}

#rtcl-gallery-upload-ui-wrapper .description p {
    margin: 0;
}


/*   ADMIN  */

#rtcl-gallery-upload-ui-wrapper.rtcl-browser-admin .rtcl-gallery {
    min-height: 190px;

    border: 2px dashed var(--rtcl-gallery-border);

    background: var(--rtcl-gallery-bg);
}

#rtcl-gallery-upload-ui-wrapper.rtcl-browser-admin .rtcl-gallery > p {
    font-size: inherit;
}

#rtcl-gallery-upload-ui-wrapper.rtcl-browser-admin .rtcl-gallery > p:first-child {
    font-size: 14px;
}

#rtcl-gallery-upload-ui-wrapper.rtcl-browser-admin .rtcl-gallery .rtcl-gallery-browse-button {
    height: auto;
}


/*   MOBILE */

@media (max-width: 575px) {

    #rtcl-gallery-upload-ui-wrapper .rtcl-gallery {
        min-height: 175px;
        padding: 25px 15px;
    }

    #rtcl-gallery-upload-ui-wrapper .rtcl-gallery .rtcl-gallery-browse-button {
        width: 100%;
        min-width: 0;
        min-height: 50px;
    }

    #rtcl-gallery-upload-ui-wrapper .rtcl-gallery-uploads {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    #rtcl-gallery-upload-ui-wrapper
    .rtcl-gallery-uploads
    .rtcl-gallery-upload-item {
        height: 115px;
    }

    #rtcl-gallery-upload-ui-wrapper
    .rtcl-gallery-uploads
    .rtcl-gallery-upload-item
    .rtcl-gallery-upload-actions {
        opacity: 1;
    }
}

/*    RTCL GALLERY ACTIONS - BELOW IMAGE  */

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item {
    height: auto !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Image */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-item-img {
    width: 100% !important;
    height: 140px !important;
    flex: 0 0 140px;
    object-fit: cover;
}

/* Actions container */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions {
    position: static !important;

    width: 100%;
    height: auto !important;

    display: flex !important;
    align-items: stretch;
    gap: 6px;

    margin: 0 !important;
    padding: 7px !important;

    opacity: 1 !important;

    background: #fff;
    box-sizing: border-box;
}

/* Action buttons */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions
a {
    flex: 1;

    width: auto !important;
    height: 34px !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    margin: 0 !important;
    padding: 0 8px !important;

    border: 1px solid var(--rtcl-gallery-border);
    border-radius: 7px;

background: #f5faf8;
color: #374151 !important;

    font-size: 12px !important;
    font-weight: 500;
    line-height: 1 !important;

    text-decoration: none !important;

    backdrop-filter: none;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        color .2s ease;
}

/* Delete */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions
a.rtcl-button-remove {
    color: #dc2626 !important;
    background: #fff;
    border-color: #fecaca;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions
a.rtcl-button-remove:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* Featured button */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions
a.rtcl-button-featured {
    color: #475569 !important;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions
a.rtcl-button-featured:hover {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e !important;
}


/*  FEATURED IMAGE */

/* when featured */

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item:has(> .rtcl-gallery-upload-item.is-featured),
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item.is-featured {
    box-shadow: none !important;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item.is-featured {
    border: 5px solid #facc15 !important;
}


/* remove btn for featured img */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item.is-featured
.rtcl-button-featured {
    display: none !important;
}

 
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item.is-featured
.rtcl-gallery-upload-actions {
    justify-content: center;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item.is-featured
.rtcl-gallery-upload-actions
.rtcl-button-remove {
    flex: 0 0 100%;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-actions {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 7px !important;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item:hover
.rtcl-gallery-upload-actions {
    margin: 0 !important;
    padding: 7px !important;
}
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-upload-item.is-featured {
    border: 5px solid #facc15 !important;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-upload-item.is-featured
.rtcl-button-featured {
    display: none !important;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-upload-item.is-featured
.rtcl-gallery-upload-actions {
    padding: 7px !important;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-upload-item.is-featured
.rtcl-button-remove {
    flex: 1 1 100%;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item {
    min-height: 105px;
    box-sizing: border-box;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-update {
    width: 100%;
    min-height: 105px;
    box-sizing: border-box;
}

#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-uploads
.rtcl-gallery-upload-item
.rtcl-gallery-upload-update
.rtcl-icon-spinner {
    font-size: 42px;
    line-height: 105px;
}


.rtcl-gallery-upload-progress {
    width: 100%;
    padding: 12px 10px;
    box-sizing: border-box;
    
    
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Percentage */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-upload-progress__text {
    width: 100%;
    margin-top: 7px;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    font-size: 12px;
    line-height: 18px;

    color: var(--rtcl-gallery-muted);
}

/* Wait text */
#rtcl-gallery-upload-ui-wrapper
.rtcl-gallery-wait-for-upload-text {
    display: block;

    width: 100%;
    margin-top: 6px;

    text-align: center;

    font-size: 13px;
    line-height: 1.5;

    color: var(--rtcl-gallery-muted);
}
.rtcl-gallery-upload-progress__bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 10px;
    background: #e9ecef;
}

.rtcl-gallery-upload-progress__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--rtcl-gallery-primary);
    transition: width .15s ease;
}

.rtcl-gallery-upload-progress__text {
    margin-top: 7px;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
    color: var(--rtcl-gallery-muted);
}

.rtcl-gallery-upload-progress.is-processing
.rtcl-gallery-upload-progress__fill {
    width: 100%;
    animation: rtcl-upload-processing 1.2s ease-in-out infinite;
}

@keyframes rtcl-upload-processing {
    0% {
        opacity: .55;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: .55;
    }
}

.rtcl-gallery-upload-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rtcl-gallery-processing-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: rtcl-gallery-spin .7s linear infinite;
}

.rtcl-gallery-processing-text {
    font-size: 13px;
    line-height: 1.5;
}

@keyframes rtcl-gallery-spin {
    to {
        transform: rotate(360deg);
    }
}
/*    MOBILE */

@media (max-width: 575px) {

    #rtcl-gallery-upload-ui-wrapper
    .rtcl-gallery-uploads
    .rtcl-gallery-upload-item
    .rtcl-gallery-upload-item-img {
        height: 135px !important;
        flex-basis: 135px;
    }

    #rtcl-gallery-upload-ui-wrapper
    .rtcl-gallery-uploads
    .rtcl-gallery-upload-item
    .rtcl-gallery-upload-actions
    a {
        height: 36px !important;
        font-size: 11px !important;
    }
}