/* ==========================================================
   DAREF V2 CONTEXT DETAIL COMPONENT
   ========================================================== */

.context-field {
    position: relative;
}


.required-marker {
    margin-left: 2px;

    color: #8B1E2D;

    font-weight: 800;
}


.context-detail-state {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 7px;

    font-size: 11px;

    color: #5D6975;
}


.context-detail-state[hidden] {
    display: none !important;
}


.context-detail-edit {
    padding: 0;

    border: 0;

    border-bottom:
        1px dotted
        #0A5DAA;

    background: transparent;

    color: #0A5DAA;

    font: inherit;
    font-weight: 700;

    cursor: pointer;
}


.context-detail-display-wrap {
    position: relative;

    display: inline-flex;
}


.context-detail-value {
    padding: 0;

    border: 0;

    border-bottom:
        1px dotted
        currentColor;

    background: transparent;

    color: inherit;

    font: inherit;
    font-weight: inherit;

    cursor: pointer;
}


.context-detail-value:hover,
.context-detail-value:focus-visible {
    color: #0A5DAA;

    outline: none;
}


.context-detail-value[aria-expanded="true"] {
    color: #0A5DAA;
}


/* ==========================================================
   FORM MODAL
   ========================================================== */

.context-modal-backdrop {
    position: fixed;

    inset: 0;

    z-index: 2000;

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

    padding: 20px;

    background:
        rgba(
            7,
            18,
            31,
            0.56
        );
}


.context-modal-backdrop[hidden] {
    display: none !important;
}


.context-modal {
    width: min(
        100%,
        520px
    );

    overflow: hidden;

    border:
        1px solid
        #DDE4EA;

    border-radius: 14px;

    background: #FFFFFF;

    box-shadow:
        0 20px 60px
        rgba(
            0,
            0,
            0,
            0.22
        );
}


.context-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 16px;

    padding:
        20px 22px 14px;

    border-bottom:
        1px solid
        #E4E9EE;
}


.context-modal-heading {
    margin: 0;

    color: #17202B;

    font-size: 18px;
    font-weight: 750;
}


.context-modal-description {
    margin:
        5px 0 0;

    color: #687481;

    font-size: 12px;

    line-height: 1.55;
}


.context-modal-close {
    flex: 0 0 auto;

    width: 34px;
    height: 34px;

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

    border:
        1px solid
        #DDE4EA;

    border-radius: 8px;

    background: #FFFFFF;

    color: #55616D;

    font-size: 20px;

    cursor: pointer;
}


.context-modal-body {
    padding:
        20px 22px;
}


.context-modal-label {
    display: block;

    margin-bottom: 8px;

    color: #25303C;

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


.context-modal-textarea {
    width: 100%;
    min-height: 125px;

    resize: vertical;

    padding: 11px 12px;

    border:
        1px solid
        #C9D2DB;

    border-radius: 8px;

    background: #FFFFFF;

    color: #17202B;

    font: inherit;

    line-height: 1.5;
}


.context-modal-textarea:focus {
    border-color: #0A5DAA;

    outline:
        2px solid
        rgba(
            10,
            93,
            170,
            0.12
        );
}


.context-modal-error {
    margin-top: 7px;

    color: #8B1E2D;

    font-size: 11px;
    font-weight: 700;
}


.context-modal-error[hidden] {
    display: none !important;
}


.context-modal-footer {
    display: flex;
    justify-content: flex-end;

    gap: 9px;

    padding:
        14px 22px 20px;
}


.context-button {
    min-height: 38px;

    padding:
        8px 15px;

    border-radius: 8px;

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

    cursor: pointer;
}


.context-button-secondary {
    border:
        1px solid
        #D5DDE4;

    background: #FFFFFF;

    color: #4F5C69;
}


.context-button-primary {
    border:
        1px solid
        #0A5DAA;

    background: #0A5DAA;

    color: #FFFFFF;
}


/* ==========================================================
   VIEW/LIST POPOVER
   ========================================================== */

.context-popover {
    position: fixed;

    z-index: 2100;

    width:
        min(
            360px,
            calc(100vw - 32px)
        );

    padding:
        13px 14px;

    border:
        1px solid
        #D9E1E8;

    border-radius: 9px;

    background: #FFFFFF;

    box-shadow:
        0 12px 34px
        rgba(
            0,
            0,
            0,
            0.16
        );
}


.context-popover[hidden] {
    display: none !important;
}


.context-popover-title {
    display: block;

    margin-bottom: 6px;

    color: #17202B;

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.04em;
}


.context-popover-detail {
    margin: 0;

    color: #4D5965;

    font-size: 12px;

    line-height: 1.55;

    white-space: normal;

    overflow-wrap: anywhere;
}


@media (max-width: 620px) {

    .context-modal-backdrop {
        align-items: flex-end;

        padding: 10px;
    }


    .context-modal {
        width: 100%;

        border-radius:
            14px 14px 8px 8px;
    }


    .context-modal-footer {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

}
