/* ============================================================
   CF7 Multi File Upload — estilos do campo e preview
   ============================================================ */

/* Campo de input */
.cf7mu-multi-file-input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    background: #fafafa;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.cf7mu-multi-file-input:hover,
.cf7mu-multi-file-input:focus {
    border-color: #0073aa;
    background: #f0f7fc;
    outline: none;
}

/* Mensagem de status (erro / sucesso) */
.cf7mu-upload-message {
    display: block;
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 0.875em;
    border-radius: 3px;
    line-height: 1.4;
    min-height: 0;
}
.cf7mu-upload-message:empty {
    display: none;
}
.cf7mu-upload-message.error {
    color: #a94442;
    background: #f2dede;
    border: 1px solid #ebccd1;
}
.cf7mu-upload-message.success {
    color: #3c763d;
    background: #dff0d8;
    border: 1px solid #d6e9c6;
}

/* ============================================================
   Preview de imagens
   ============================================================ */
.cf7mu-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.cf7mu-preview-item {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    max-width: 120px;
    word-break: break-all;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.cf7mu-preview-item img {
    border-radius: 3px;
    display: block;
    object-fit: cover;
}

.cf7mu-file-icon {
    font-size: 36px;
    color: #999;
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
}

.cf7mu-file-name {
    font-size: 0.75em;
    color: #555;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    display: block;
}

.cf7mu-file-size {
    font-size: 0.7em;
    color: #999;
    display: block;
}

/* Botão de remover */
.cf7mu-remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #cc0000;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: background 0.15s;
}
.cf7mu-remove-btn:hover {
    background: #990000;
}

.cf7mu-more-files {
    font-size: 0.85em;
    color: #777;
    align-self: center;
    margin: 0;
}

/* ============================================================
   Lista simples (sem preview ativado)
   ============================================================ */
.cf7mu-file-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.cf7mu-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    margin-bottom: 4px;
    font-size: 0.875em;
    gap: 8px;
}

.cf7mu-file-list .cf7mu-remove-btn {
    position: static;
    flex-shrink: 0;
}

/* ============================================================
   Estado de erro CF7 no campo
   ============================================================ */
.cf7mu-multi-file-input.wpcf7-not-valid {
    border-color: #a94442;
    background: #fff5f5;
}
