/* Panel-styled file picker (replaces native OS file button). */

.panel-file-input {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 100%;
    vertical-align: middle;
}

/* Import / stacked forms: label is block, picker sits on the next line. */
.admin-interface .form-row > label + .panel-file-input {
    margin-top: 10px;
}

.panel-file-input__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.panel-file-input__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid #d5d9e0;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.panel-file-input__button:hover,
.panel-file-input__button:focus {
    background: #f3f5f8;
    color: #101828;
    border-color: #c8ced8;
    outline: none;
}

.panel-file-input__button:focus-visible {
    box-shadow: 0 0 0 3px rgba(42, 95, 173, 0.18);
    border-color: #2a5fad;
}

.panel-file-input__icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-color: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E");
}

.panel-file-input__name {
    font-size: 13px;
    line-height: 1.35;
    color: #667085;
    max-width: min(360px, 100%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-file-input.has-file .panel-file-input__name {
    color: #344054;
    font-weight: 500;
}

.admin-interface.change-form #content-main .panel-file-input__button,
.admin-interface.change-form #content > form .panel-file-input__button,
.admin-interface #content-main .panel-file-input__button {
    min-height: 38px;
}
