/* =========================================
   EDITAR DOCUMENTO - MODAL
========================================= */

.documento-edit-modal {
    width: min(900px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border: 1px solid #dbe3ee;
    border-radius: 18px;

    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.28);

    overflow: hidden;
}


/* =========================================
   HEADER
========================================= */

.documento-edit-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 32px;
    background: #0f1b32;
}

.documento-edit-header-info {
    display: flex;
    align-items: center;
    gap: 14px;

    min-width: 0;
}

.documento-edit-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #2563eb;
    color: #ffffff;

    font-size: 18px;
}

.documento-edit-header h2 {
    margin: 0;

    color: #ffffff;

    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
}

.documento-edit-header p {
    margin: 4px 0 0;

    max-width: 650px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #94a3b8;

    font-size: 13px;
}

.documento-edit-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: #94a3b8;

    font-size: 20px;

    cursor: pointer;

    transition:
        background .2s,
        color .2s;
}

.documento-edit-close:hover {
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
}


/* =========================================
   FORM / BODY
========================================= */

.documento-edit-form {
    min-height: 0;

    display: flex;
    flex: 1;
    flex-direction: column;
}

.documento-edit-body {
    min-height: 0;
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.documento-edit-grid {

    display: grid;

    grid-template-columns:

        minmax(0, 1fr)

        minmax(0, 1fr);

    column-gap: 20px;

    margin-bottom: 16px;

}


/* =========================================
   CAMPOS
========================================= */

.documento-edit-field {
    min-width: 0;
}

.documento-edit-field label,
.documento-edit-section-title {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 650;
}

.documento-edit-field label span {
    color: #dc2626;
}

.documento-edit-field input,
.documento-edit-field select,
.documento-edit-field textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #cbd5e1;
    border-radius: 10px;

    background: #ffffff;

    color: #172033;

    font: inherit;

    outline: none;

    transition:
        border-color .2s,
        box-shadow .2s;
}

.documento-edit-field input,
.documento-edit-field select {
    height: 44px;
    padding: 0 13px;
    font-size: 14px;
}

.documento-edit-field textarea {
    min-height: 70px;
    height: 70px;
    padding: 10px 13px;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
}

.documento-edit-field input:focus,
.documento-edit-field select:focus,
.documento-edit-field textarea:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .10);
}

.documento-edit-full {
    margin-bottom: 16px;
}


/* =========================================
   VALOR
========================================= */

.documento-edit-valor {
    width: calc(50% - 10px);
    margin-bottom: 18px;
}

.documento-edit-money {
    position: relative;
}

.documento-edit-money input {
    padding-right: 42px;

    font-weight: 650;
}

.documento-edit-money span {
    position: absolute;

    top: 50%;
    right: 15px;

    transform: translateY(-50%);

    color: #94a3b8;

    font-size: 14px;
    font-weight: 600;

    pointer-events: none;
}


/* =========================================
   ANEXO
========================================= */

.documento-edit-anexo-section {
    padding-top: 18px;

    border-top: 1px solid #e2e8f0;
}

.documento-edit-current-file {
    min-height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    box-sizing: border-box;

    padding: 10px 14px;

    border: 1px solid #bfdbfe;
    border-radius: 10px;

    background: #f8fbff;
}

.documento-edit-file-left {
    display: flex;
    align-items: center;
    gap: 11px;

    min-width: 0;
}

.documento-edit-file-icon {
    flex: 0 0 auto;

    color: #2563eb;

    font-size: 17px;
}

.documento-edit-file-info {
    min-width: 0;
}

.documento-edit-file-info strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #1e3a8a;

    font-size: 13px;
    font-weight: 650;
}

.documento-edit-file-info span {
    display: block;

    margin-top: 2px;

    color: #64748b;

    font-size: 11px;
}

.documento-edit-file-link {
    flex: 0 0 auto;

    color: #2563eb;

    font-size: 12px;
    font-weight: 650;

    text-decoration: none;
}

.documento-edit-file-link:hover {
    text-decoration: underline;
}


/* =========================================
   UPLOAD
========================================= */

.documento-edit-upload {
    min-height: 76px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    margin-top: 10px;
    padding: 12px 20px;

    border: 1px dashed #cbd5e1;
    border-radius: 10px;

    background: #fbfdff;

    cursor: pointer;

    transition:
        border-color .2s,
        background .2s;
}

.documento-edit-upload:hover {
    border-color: #93c5fd;

    background: #f8fbff;
}

.documento-edit-upload-icon {
    margin-bottom: 4px;

    color: #64748b;

    font-size: 16px;
}

.documento-edit-upload strong {
    color: #475569;

    font-size: 12px;
    font-weight: 650;
}

.documento-edit-upload span {
    margin-top: 3px;

    color: #94a3b8;

    font-size: 11px;
    text-align: center;
}

.documento-edit-upload-help {
    margin-top: 6px;

    color: #94a3b8;

    font-size: 11px;
}


/* =========================================
   FOOTER
========================================= */

.documento-edit-footer {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    padding: 7px 32px;

    border-top: 1px solid #e2e8f0;

    background: #ffffff;
}

.documento-edit-btn-cancel,
.documento-edit-btn-save {
    min-height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 18px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;
}

.documento-edit-btn-cancel {
    border: 1px solid #cbd5e1;

    background: #ffffff;
    color: #334155;
}

.documento-edit-btn-cancel:hover {
    background: #f8fafc;
}

.documento-edit-btn-save {
    border: 1px solid #2563eb;

    background: #2563eb;
    color: #ffffff;
}

.documento-edit-btn-save:hover {
    background: #1d4ed8;
}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 700px) {

    .documento-edit-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);

        border-radius: 14px;
    }

    .documento-edit-header,
    .documento-edit-body,
    .documento-edit-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .documento-edit-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .documento-edit-valor {
        width: 100%;
    }

    .documento-edit-current-file {
        align-items: flex-start;
    }

}