/* Base wrapper */
.ta-single-wrap {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 15px;
    direction: rtl;
    font-family: inherit;
    /* border: 1px solid #808080; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 14px;
}

.ta-thumb {
    /* border: 1px solid #808080; */
    /* border-radius: 7px; */
    display: inline-flex;
    /* justify-content: center; */
    /* padding: 3px; */
    /* background-color: #808080; */
}

.ta-title {
    font-size: 10px;
    font-weight: 100;
    color: #000;

}

/* General card */
.ta-card {
    max-width: 1100px;

    direction: rtl;
    background: #fff;
    border: 1px solid #808080;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

/* Upload area title */
.ta-card h4,
.ta-card h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

/* Upload section wrapper */
#ta-upload-area {
    background: #fafafa;
    border: 1px solid #c90049;
    border-radius: 14px;
    padding: 20px;
    margin-top: 15px;
}

/* Hidden real input */
.real-file {
    display: none;
}

/* Custom file button */
.custom-file-label {
    display: inline-block;
    background: #fff;
    border: 1px solid #c90049;
    color: #c90049;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.25s;
    font-size: 14px;
    font-weight: 500;
    margin-left: 5px;
}

.custom-file-label:hover {
    background: #c90049;
    color: #fff;
}

/* Selected file name */
#file-name {
    margin-left: 12px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

/* Submit upload button */
.ta-btn {
    display: inline-block;
    background: #0066ff;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 1px;
    transition: 0.25s;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 10px;
    /* button must not break */

}

.ta-btn:hover {
    background: #fff;
    color: #0066ff !important;
    border: 1px solid #0066ff;
    border-radius: 10px;
}

/* Success message */
#ta_send_docs_result {
    margin-top: 15px;
    font-size: 15px;
    font-weight: 600;
    color: #0d8f27;
    text-align: right;
}

/* Uploaded files list */
.ta-uploaded-files {
    margin-top: 20px;
}

.ta-uploaded-files ul {
    list-style: none;
    padding: 0;
}

.ta-uploaded-files li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 16px;
    color: #c90049;
}

/* Logout link at bottom */
.ta-logout-link {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Row wrapper */
.ta-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    /* Increased gap for better spacing */

    border: 1px solid #999;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 5px;

    /* Make sure the row itself doesn't hide overflow of children */
    overflow: visible;
}

.ta-file-name {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 90%;
    direction: rtl;
    /* Right-to-left for Persian text */
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
    font-family: 'Vazir', sans-serif;
    /* Persian font */
    unicode-bidi: embed;
    /* Proper bidi handling */

    white-space: normal;
    /* Allow filename to wrap */
    overflow: visible;
    /* Ensure the filename fits */
    text-overflow: clip;
    /* Prevent truncation */
    margin-right: 10px;
}

.ta-file-name bdi {
    unicode-bidi: bidi-override;
    /* Correct behavior for mixed RTL/LTR */
}


/* Download Button */
.ta-btn-download {
    background: #0066ff;
    color: #fff;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: 0.25s;
}

.ta-btn-download:hover {
    background: #005a9e;
}


/* Info rows on left side */
.ta-info-row {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
}

.ta-info-row span {
    color: #666;
}

.ta-info-row strong {
    color: #808080;
}

/* Layout tweaks for a neat and modern appearance */
.ta-grid {
    display: grid;
    grid-template-columns: auto;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .ta-grid {
        grid-template-columns: 1fr;
    }

    .ta-thumb {
        /* border: 1px solid #808080; */
        /* border-radius: 7px; */
        display: flex;
        justify-content: center;
        /* padding: auto; */
    }
}

#ta-send-btn {
    background: #fff;
    border: 1px solid #0d8f27;
    color: #0d8f27;
    padding: 6px 22px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s;
    display: inline-block;
    margin-left: 5px;
}

/* Hover: show text */
#ta-send-btn:hover {
    background: #0d8f27;
    color: #fff;
}

/* New Delete button */
.ta-user-delete-file {
    background: #fff;
    border: 1px solid #c90049;
    color: #c90049;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: 0.2s;
}

.ta-user-delete-file:hover {
    background: #c90049;
    color: #fff;
}

.ta-user-exit {
    display: flex;
    flex-direction: row-reverse;
}


/* Exit button */
.ta-user-exit-button {
    background: #c90049;
    color: #fff;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.ta-user-exit-button:hover {
    background: #fff;
    color: #c90049;
    border: 1px solid #c90049;

}

/* --- Added for v25: user download button, file name, delete button --- */
.ta-user-download {
    background: #0066ff !important;
    color: #fff !important;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 10px;
    transition: 0.25s;
}

.ta-user-download:hover {
    background: #fff !important;
    color: #0066ff !important;
    border: 1px solid #0066ff;
}

/* File name style */
.ta-user-file-name {
    margin-right: 10px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}


#ta-send-btn::after {
    content: "ارسال اسناد";
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: .25s;
}

#ta-send-btn:hover::after {
    opacity: 1;
}


/* File list container for user files */
#ta-user-files-area {
    margin-top: 20px;
}

#ta-user-files-list {
    list-style: none;
    padding: 0;
}

#ta-user-files-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    border: 1px solid #e2e2e2;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

#ta-user-files-list li .ta-user-download {
    margin-left: 10px;
}

#ta-user-files-list li .ta-user-delete-file {
    margin-left: 10px;
}

/* TA Tender v49 uploader styles */
#ta-uploader #ta-drop-area {
    transition: background .12s ease;
}

.ta-queue-row {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
    display: inline-block;
}

/**/
#ta-login-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .0);
    animation: fadeIn .4s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(8px);
    padding: 20px;
}

@keyframes fadeIn {
    to {
        background: rgba(0, 0, 0, .55);
    }
}

.ta-popup-box {
    background: #fff;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
    animation: popIn .35s ease;
    text-align: center;
    position: relative;
}

@keyframes popIn {
    from {
        transform: scale(.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ta-close {
    position: absolute;
    top: 12px;
    right: 14px;
    cursor: pointer;
    font-size: 28px;
    color: #555;
    line-height: 1;
}

.ta-btn-modern {
    display: block;
    margin: 12px 0;
    padding: 14px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: .2s;
    font-size: 16px;
}

.ta-btn-login {
    background: var(--ta-accent, #0066ff);
    color: #fff;
}

.ta-btn-login:hover {
    opacity: .85;
}

.ta-btn-reg {
    background: #f1f1f1;
    color: #333;
}

.ta-btn-reg:hover {
    background: #e3e3e3;
}

@media(max-width:480px) {
    .ta-popup-box {
        padding: 24px;
        border-radius: 16px;
    }

    .ta-btn-modern {
        padding: 16px;
        margin: 14px 0;
        font-size: 17px;
    }

    .ta-close {
        top: 10px;
        right: 12px;
        font-size: 26px;
    }

    #ta-login-popup {
        padding: 10px;
    }
}