/* IEintouch / IEleads lead image modernization - 20260613
   Scope: lead upload widgets, lead summary thumbnails, public lead media.
   Safe to load globally because selectors are scoped to lead/upload classes. */
:root {
    --ie-lead-red: #e00000;
    --ie-lead-red-dark: #b90000;
    --ie-lead-ink: #0f172a;
    --ie-lead-text: #263243;
    --ie-lead-muted: #64748b;
    --ie-lead-line: #dfe5ee;
    --ie-lead-soft: #f7f9fc;
    --ie-lead-surface: #ffffff;
    --ie-lead-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
}

.ie-lead-upload-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--ie-lead-line);
    border-radius: 16px;
    box-shadow: var(--ie-lead-shadow);
    margin: 14px 0 18px;
    padding: 18px;
}

.ie-lead-upload-zone {
    align-items: center;
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--ie-lead-text);
    cursor: pointer;
    display: flex;
    gap: 16px;
    justify-content: center;
    min-height: 132px;
    padding: 22px;
    text-align: center;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.ie-lead-upload-zone:hover,
.ie-lead-upload-zone.is-dragover {
    background: #fff5f5;
    border-color: var(--ie-lead-red);
    box-shadow: 0 10px 24px rgba(224, 0, 0, 0.10);
}

.ie-lead-upload-icon {
    align-items: center;
    background: #fff1f1;
    border-radius: 999px;
    color: var(--ie-lead-red);
    display: inline-flex;
    font-size: 26px;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.ie-lead-upload-title {
    color: var(--ie-lead-ink);
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ie-lead-upload-note {
    color: var(--ie-lead-muted);
    display: block;
    font-size: 13px;
    line-height: 1.4;
}

.ie-lead-upload-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 12px;
}

.ie-lead-upload-button {
    background: linear-gradient(135deg, var(--ie-lead-red), var(--ie-lead-red-dark));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(224, 0, 0, 0.22);
    color: #fff !important;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    line-height: 1;
    padding: 12px 18px;
    text-decoration: none !important;
}

.ie-lead-upload-help {
    color: var(--ie-lead-muted);
    font-size: 12px;
}

.ie-lead-upload-list,
#wrap_table,
#wrap_table_picture {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    list-style: none;
    margin: 16px 0 0 !important;
    padding: 0 !important;
}

.ie-lead-upload-list > li,
#wrap_table > li,
#wrap_table_picture > li {
    background: #fff;
    border: 1px solid var(--ie-lead-line);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
    min-height: 142px;
    overflow: hidden;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    width: 156px;
}

.ie-lead-upload-list > li:hover,
#wrap_table > li:hover,
#wrap_table_picture > li:hover {
    border-color: #cbd5e1;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    transform: translateY(-2px);
}

.ie-lead-upload-list img[data-picid],
.ie-lead-upload-list img[data-picId],
#wrap_table img[data-picid],
#wrap_table img[data-picId],
#wrap_table_picture img[data-picid],
#wrap_table_picture img[data-picId] {
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    display: block;
    height: 118px !important;
    object-fit: cover;
    width: 100% !important;
}

.ie-lead-pic-card.is-main {
    border-color: var(--ie-lead-red) !important;
}

.ie-lead-main-badge {
    background: rgba(224, 0, 0, 0.92);
    border-radius: 999px;
    color: #fff;
    display: none;
    font-size: 11px;
    font-weight: 700;
    left: 8px;
    line-height: 1;
    padding: 6px 8px;
    position: absolute;
    top: 8px;
    z-index: 2;
}

.ie-lead-pic-card.is-main .ie-lead-main-badge {
    display: inline-flex;
}

.ie-lead-pic-tools {
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #eef2f7;
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 7px 6px;
}

.ie-lead-pic-tools button {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    height: 28px;
    justify-content: center;
    min-width: 28px;
    padding: 0 8px;
    text-transform: none;
}

.ie-lead-pic-tools button:hover {
    background: #fff1f1;
    border-color: #fecaca;
    color: var(--ie-lead-red);
}

.ie-lead-pic-tools .ie-delete {
    color: #b91c1c;
}

.ie-lead-upload-list .addmore,
#wrap_table .addmore,
#wrap_table_picture .addmore {
    align-items: center;
    background: #fff;
    color: var(--ie-lead-red);
    display: flex !important;
    flex-direction: column;
    font-weight: 700;
    height: 100%;
    justify-content: center;
    min-height: 142px;
    padding: 18px 12px;
    text-decoration: none !important;
}

.ie-lead-upload-list .addmore img,
#wrap_table .addmore img,
#wrap_table_picture .addmore img {
    filter: saturate(1.15) contrast(1.05);
    max-width: 72px !important;
    opacity: 0.9;
}

.ie-lead-upload-progress {
    background: #fee2e2;
    border-radius: 999px;
    display: none;
    height: 8px;
    margin-top: 12px;
    overflow: hidden;
}

.ie-lead-upload-progress span {
    background: linear-gradient(90deg, var(--ie-lead-red), #fb7185);
    display: block;
    height: 100%;
    transition: width 0.18s ease;
    width: 0;
}

/* Lead cards and public lead media */
.lead-panel .pro-img,
.ie-lead-image-frame {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
    overflow: hidden;
    padding: 6px;
}

.lead-panel .pro-img img,
.lead-panel img.backup_picture,
.lead-panel img.picfixed,
.relatedunit img,
#cloudslider img.sky-background {
    filter: saturate(1.08) contrast(1.04) brightness(1.03);
}

.lead-panel img.backup_picture,
.lead-panel img.picfixed {
    background: #f1f5f9;
    border-radius: 10px;
    height: 150px !important;
    object-fit: cover;
    width: 100% !important;
}

#cloudslider {
    background: #0f172a;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

#cloudslider img.sky-background {
    background: #0f172a;
    height: 100% !important;
    object-fit: cover;
    width: 100% !important;
}

.leaddetails,
.leadinformation,
.contactadvertiser,
.related.white-block {
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

@media (max-width: 829px) {
    .ie-lead-upload-zone {
        align-items: center;
        flex-direction: column;
        min-height: 150px;
    }

    .ie-lead-upload-list > li,
    #wrap_table > li,
    #wrap_table_picture > li {
        width: calc(50% - 8px);
    }

    .lead-panel img.backup_picture,
    .lead-panel img.picfixed {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .ie-lead-upload-list > li,
    #wrap_table > li,
    #wrap_table_picture > li {
        width: 100%;
    }
}
