/* Medieval Town UI Styles */

/* Main Town Container */
.town-container {
    width: 100%;
    height: 100%;
    background-color: rgb(101, 67, 33); /* Medieval brown background */
}

/* Header Styles */
.town-header {
    background-color: rgb(139, 69, 19);
    padding: 10px;
    justify-content: space-between;
    flex-direction: row;
    border-bottom-width: 3px;
    border-bottom-color: rgb(101, 67, 33);
    min-height: 60px;
}

.town-title {
    font-size: 24px;
    color: rgb(255, 215, 0);
    -unity-font-style: bold;
    -unity-text-align: middle-left;
}

.header-controls {
    flex-direction: row;
    align-items: center;
}

.header-button {
    background-color: rgb(160, 82, 45);
    color: rgb(255, 255, 255);
    border-width: 2px;
    border-color: rgb(101, 67, 33);
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 5px;
    font-size: 14px;
    -unity-font-style: bold;
}

.header-button:hover {
    background-color: rgb(205, 133, 63);
    scale: 1.05;
}

/* Medieval Town Grid Layout */
.town-grid {
    flex-grow: 1;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

/* Town Walls */
.town-wall-horizontal {
    height: 20px;
    background-color: rgb(75, 75, 75);
    width: 100%;
    border-top-width: 2px;
    border-bottom-width: 2px;
    border-color: rgb(55, 55, 55);
    margin: 5px 0;
}

/* Districts */
.town-district {
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    margin: 10px 0;
    min-height: 120px;
}

/* Streets */
.main-street {
    height: 30px;
    background-color: rgb(160, 160, 160);
    width: 80%;
    align-self: center;
    margin: 5px 0;
    border-radius: 3px;
}

.side-street {
    height: 20px;
    background-color: rgb(140, 140, 140);
    width: 60%;
    align-self: center;
    margin: 5px 0;
    border-radius: 2px;
}

/* Base Building Styles */
.town-building {
    width: 120px;
    height: 100px;
    border-width: 3px;
    border-color: rgb(101, 67, 33);
    margin: 5px;
    padding: 5px;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    position: relative;
}

.building-label {
    font-size: 12px;
    color: rgb(255, 255, 255);
    -unity-font-style: bold;
    -unity-text-align: middle-center;
}

/* Interactive Building Effects */
.interactable-building {
    border-color: rgb(255, 215, 0);
    border-width: 4px;
}

.interactable-building:hover {
    scale: 1.1;
    border-color: rgb(255, 255, 255);
}

/* Shop Building Colors */
.weapon-shop {
    background-color: rgb(178, 34, 34);
}

.armor-shop {
    background-color: rgb(70, 130, 180);
}

.potion-shop {
    background-color: rgb(138, 43, 226);
}

.general-shop {
    background-color: rgb(255, 140, 0);
}

/* Special Buildings */
.castle {
    background-color: rgb(112, 128, 144);
    width: 180px;
    height: 140px;
}

.noble-house {
    background-color: rgb(188, 143, 143);
    width: 140px;
    height: 110px;
}

.guild {
    background-color: rgb(184, 134, 11);
}

.inn {
    background-color: rgb(160, 82, 45);
}

.harbor {
    background-color: rgb(72, 61, 139);
}

.town-house {
    background-color: rgb(205, 133, 63);
    width: 80px;
    height: 80px;
}

/* Town Square */
.town-square {
    background-color: rgb(143, 188, 143);
    width: 150px;
    height: 120px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
}

.fountain {
    width: 40px;
    height: 40px;
    background-color: rgb(135, 206, 235);
    border-radius: 50%;
    border-width: 2px;
    border-color: rgb(169, 169, 169);
}

/* Shop Banners */
.shop-banner {
    background-color: rgb(220, 20, 60);
    width: 110px;
    height: 20px;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    position: absolute;
    top: -15px;
    left: 5px;
}

.interaction-banner {
    background-color: rgb(255, 215, 0);
    width: 110px;
    height: 20px;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    position: absolute;
    top: -15px;
    left: 5px;
}

.banner-text {
    font-size: 10px;
    color: rgb(255, 255, 255);
    -unity-font-style: bold;
    -unity-text-align: middle-center;
}

/* Bottom Panel */
.bottom-panel {
    background-color: rgb(139, 69, 19);
    padding: 15px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-top-width: 3px;
    border-top-color: rgb(101, 67, 33);
    min-height: 50px;
}

.interaction-hint {
    font-size: 14px;
    color: rgb(255, 215, 0);
    -unity-font-style: italic;
}

.money-display {
    flex-direction: row;
    align-items: center;
}

.money-label {
    font-size: 14px;
    color: rgb(255, 255, 255);
    margin-right: 10px;
    -unity-font-style: bold;
}

.money-amount {
    font-size: 16px;
    color: rgb(255, 215, 0);
    -unity-font-style: bold;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
}

/* Hover Effects for All Buildings */
.town-building:hover .building-label {
    color: rgb(255, 215, 0);
    font-size: 13px;
}
