/*
 * BRITIXO_MYACCOUNT_TENANT_MODULE_CONTROLS_CSS_V1
 *
 * Strict scope:
 * - My Apps / Software (#tenancies) only.
 * - Full-width installed application cards.
 * - Compact tenant module-control panel.
 */

#tenancies .myapps-root .myapps-installed-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
}

#tenancies .myapps-root .myapps-installed-card {
    box-sizing: border-box;
    max-width: none !important;
    min-width: 0;
    width: 100% !important;
}

#tenancies .myapps-root .myapps-tenant-modules {
    background: #f8fafc;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    margin-top: 18px;
    overflow: hidden;
    width: 100%;
}

#tenancies .myapps-root .myapps-tenant-modules__head {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #e9edf3;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 14px 16px;
}

#tenancies .myapps-root .myapps-tenant-modules__head h3 {
    color: #172033;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

#tenancies .myapps-root .myapps-tenant-modules__head p {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
    margin: 3px 0 0;
}

#tenancies .myapps-root .myapps-tenant-modules__count {
    background: #eef4ff;
    border-radius: 999px;
    color: #34517f;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 9px;
}

#tenancies .myapps-root .myapps-tenant-modules__body {
    display: grid;
    gap: 8px;
    padding: 10px;
}

#tenancies .myapps-root .myapps-module-row {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e7ebf0;
    border-radius: 10px;
    display: grid;
    gap: 12px;
    grid-template-columns:
        minmax(180px, 1fr)
        minmax(90px, auto)
        minmax(250px, auto);
    padding: 10px 12px;
}

#tenancies .myapps-root .myapps-module-row__name {
    min-width: 0;
}

#tenancies .myapps-root .myapps-module-row__name strong {
    color: #19243a;
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#tenancies .myapps-root .myapps-module-row__name small {
    color: #7b8494;
    display: block;
    font-size: 10px;
    line-height: 1.35;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

#tenancies .myapps-root .myapps-module-status {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    justify-content: center;
    min-width: 68px;
    padding: 5px 9px;
    white-space: nowrap;
}

#tenancies .myapps-root .myapps-module-status.is-active {
    background: #e9f8ef;
    color: #187445;
}

#tenancies .myapps-root .myapps-module-status.is-inactive {
    background: #f1f3f6;
    color: #687283;
}

#tenancies .myapps-root .myapps-module-status.is-locked {
    background: #fff3dc;
    color: #8a5b00;
}

#tenancies .myapps-root .myapps-module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

#tenancies .myapps-root .myapps-module-action {
    appearance: none;
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-height: 31px;
    padding: 8px 11px;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        color .15s ease,
        opacity .15s ease;
}

#tenancies .myapps-root .myapps-module-action:hover:not(:disabled) {
    background: #f4f7fb;
    border-color: #aeb9c8;
}

#tenancies .myapps-root .myapps-module-action[data-module-action="activate"] {
    border-color: #b9d8c5;
    color: #17633d;
}

#tenancies .myapps-root .myapps-module-action[data-module-action="update"] {
    border-color: #b9c9e8;
    color: #315789;
}

#tenancies .myapps-root .myapps-module-action[data-module-action="deactivate"] {
    border-color: #ead0d0;
    color: #9b3030;
}

#tenancies .myapps-root .myapps-module-action:disabled {
    cursor: not-allowed;
    opacity: .38;
}

#tenancies .myapps-root .myapps-tenant-modules__message {
    color: #697386;
    font-size: 12px;
    line-height: 1.5;
    padding: 14px 16px;
}

#tenancies .myapps-root .myapps-tenant-modules__message.is-error {
    color: #9b3030;
}

@media (max-width: 820px) {
    #tenancies .myapps-root .myapps-module-row {
        grid-template-columns: minmax(0, 1fr);
    }

    #tenancies .myapps-root .myapps-module-actions {
        justify-content: flex-start;
    }

    #tenancies .myapps-root .myapps-tenant-modules__head {
        align-items: flex-start;
    }
}
