.Trade { display: flex; position: absolute; right: 0; top: 0; justify-content: center; align-items: center; margin: 0.25em; } .Trade > * { max-height: calc(100vh - 2em); overflow: auto; width: 40em; display: inline-flex; padding: 0.5em; flex-direction: column; } .Trade .Title { align-self: center; padding: 2px; font-weight: bold; } .Trade .PlayerList { padding: 0.5em; background-color:rgba(224, 224, 224); margin: 0.5em 0; } .Trade .Resource { display: inline-flex; align-items: center; justify-content: space-around; width: 3.75em; /* 5x7 aspect ratio */ height: 3.75em; min-width: 3.75em; /* 5x7 aspect ratio */ min-height: 3.75em; margin: 0 0.125rem; background-size: 130%; border: 2px solid #ccc; border-radius: 0.25rem; margin: 0.75rem; } .Trade b { margin-left: 0.25rem; margin-right: 0.25rem; } .Trade .Direction { display: flex; flex-direction: column; align-items: center; justify-content: space-around; height: 2em; width: 2em; line-height: 2em; } .Trade .Resource:hover { filter: none; } .Trade .Transfer { pointer-events: none; } .Trade .Transfer .Resource:hover { filter: brightness(125%); } .Trade .Resource > div.Right { user-select: none; position: absolute; top: -0.75rem; right: -0.75rem; border-radius: 50%; border: 1px solid white; background-color: rgb(36, 148, 46); font-size: 1rem; width: 1.5rem; height: 1.5rem; text-align: center; line-height: 1.5rem; } .Trade .Resource > div.Left { user-select: none; position: absolute; bottom: -0.75rem; left: -0.75rem; border-radius: 50%; border: 1px solid white; background-color: #444; font-size: 1rem; width: 1.5rem; height: 1.5rem; text-align: center; line-height: 1.5rem; } .Trade .Resource.None { /* filter: brightness(70%); */ } .Trade .PlayerColor { align-self: flex-start; width: 0.75em; height: 0.75em; margin: 1rem 0.25em 0 0; } .Trade .Transfer { display: flex; flex-direction: column; align-items: center; user-select: none; } .Trade .Transfers { display: flex; flex-direction: row; justify-items: flex-start; margin: 0.25rem 0; } .Trade .Transfers .GiveGet { display: flex; position: relative; flex-direction: column; justify-content: space-around; align-items: center; font-weight: bold; font-size: 1.25rem; margin: 0 0.5rem; min-width: 3rem; } .Trade .Transfers .GiveGet div:nth-child(1) { position: absolute; top: 0; border: 1px solid #888; background-color: rgb(36, 148, 46); color: white; border-radius: 0.25rem; min-width: 2.5rem; text-align: center; padding: 0.25rem; } .Trade .Transfers .GiveGet div:nth-child(2) { position: absolute; top: 7.5rem; border: 1px solid #888; background-color: rgb(36, 148, 46); color: white; border-radius: 0.25rem; min-width: 2.5rem; text-align: center; padding: 0.25rem; } .Trade .Transfers .GiveGet div:last-child { position: absolute; border: 1px solid #888; background-color: #444; color: white; font-size: 1rem; border-radius: 0.25rem; padding: 0.25rem; bottom: 0.125rem; } .Trade .TradeLine { width: 100%; user-select: none; display: flex; flex-direction: row; align-items: center; flex: 1; padding: 2px 0; } .Trade .TradeLine .TradeText { display: flex; flex-wrap: wrap; flex-direction: row; align-items: center; } .Trade .TradeText > span { display: inline-flex; align-items: center; margin-right: 0.25rem; width: 100%; flex-wrap: wrap; } .Trade .TradeText > span:first-of-type { min-height: 3.5rem; } .Trade .TradeLine .Resource { height: 1.5rem; width: 1.5rem; min-width: 1.5rem; min-height: 1.5rem; } .Trade .TradeLine .Resource > div { font-size: 0.75rem; width: 1rem; height: 1rem; line-height: 1rem; } .Trade .TradeLine .TradeActions { flex-grow: 1; display: inline-flex; justify-content: flex-end; } .Trade .TradeLine .TradeActions > * { margin-left: 0.5rem; }