/* ==========================================================================
   Upload widget — shared styling for the online-lesson video submission and
   the "play feedback" pages. Scope everything under `.uw-scope` so it never
   leaks into unrelated file inputs / progress bars on the same page.

   Elements it styles (existing markup) + adds (via upload-widget.js):
     - .uw-scope input[type=file]   → "Choose File" control
     - .uw-scope .progress / bar    → rounded blue progress bar
     - .uw-scope .upload-status     → success / error banner
     - .uw-card                     → uploaded-file card (icon + name + size + trash)
   ========================================================================== */

/* ---- "Choose File" control ------------------------------------------------ */
.uw-scope input[type="file"] {
    width: 100%;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
    padding: 10px 14px;
    font-size: 14px;
    color: #475467;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.uw-scope input[type="file"]:hover {
    border-color: #b6d4f2;
}
.uw-scope input[type="file"]:focus {
    outline: none;
    border-color: #0071ce;
    box-shadow: 0 0 0 3px rgba(0, 113, 206, .12);
}
.uw-scope input[type="file"]::file-selector-button,
.uw-scope input[type="file"]::-webkit-file-upload-button {
    margin-right: 14px;
    padding: 8px 16px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f9fafb;
    color: #344054;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.uw-scope input[type="file"]:hover::file-selector-button {
    background: #f2f4f7;
    border-color: #d0d5dd;
}

/* ---- Uploaded-file card --------------------------------------------------- */
.uw-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #fff;
}
.uw-card-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f2f4f7;
    color: #475467;
}
.uw-card-icon svg { width: 22px; height: 22px; }
.uw-card-body { flex: 1 1 auto; min-width: 0; }
.uw-card-name {
    font-weight: 700;
    color: #101828;
    font-size: 14px;
    word-break: break-word;
}
.uw-card-size {
    margin-top: 2px;
    font-size: 12px;
    color: #667085;
}
.uw-card-remove {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #fff;
    color: #667085;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.uw-card-remove:hover {
    background: #fef3f2;
    border-color: #fecdca;
    color: #d92d20;
}
.uw-card-remove svg { width: 18px; height: 18px; }

/* ---- Progress bar --------------------------------------------------------- */
.uw-scope .progress {
    display: none;                 /* JS shows it while uploading */
    height: 30px;
    margin-top: 14px;
    margin-bottom: 4px;
    background-color: #eef1f4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
}
.uw-scope .progress-bar {
    height: 100%;
    width: 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background-color: #1a73e8;
    border-radius: 8px;
    transition: width .3s ease;
}

/* ---- Success / error banner ---------------------------------------------- */
.uw-scope .upload-status {
    display: none;                 /* JS shows it when there's a message */
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
}
.uw-scope .upload-status.upload-success {
    display: flex !important;      /* beat the pages' inline display:block */
    background: #ecfdf3 !important;
    color: #067647 !important;
}
.uw-scope .upload-status.upload-error {
    display: flex !important;
    background: #fef3f2 !important;
    color: #b42318 !important;
}
/* leading status icon */
.uw-scope .upload-status::before {
    content: "";
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
}
.uw-scope .upload-status.upload-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2312b76a'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.3-3.5-3.5 1.4-1.4 2.1 2.1 4.9-4.9 1.4 1.4-6.3 6.3Z'/%3E%3C/svg%3E");
}
.uw-scope .upload-status.upload-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f04438'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Z'/%3E%3C/svg%3E");
}

/* The "Upload Another File" drop zone was removed by request — the file card's
   trash button is the only way to replace a file. */
