/* ============================================================
   SHADOWSKINGS — KEEP UPGRADES PANEL
   Readable / structured / premium construction controls
   ============================================================ */

.keep-upgrades-panel {
    font-size: 15px;
    color: #e9ddf7;
}


/* ============================================================
   UPGRADE LIST
   ============================================================ */

#keep-upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* ============================================================
   STANDARD + PREMIUM UPGRADE CARDS
   ============================================================ */

.keep-building-entry {
    position: relative;
    box-sizing: border-box;

    width: 100%;

    padding: 18px 20px;

    border: 1px solid rgba(166, 91, 218, 0.42);
    border-left: 3px solid rgba(178, 92, 226, 0.85);

    border-radius: 7px;

    background:
        linear-gradient(
            135deg,
            rgba(30, 19, 38, 0.98),
            rgba(14, 11, 20, 0.98)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 3px 12px rgba(0, 0, 0, 0.28);
}


/* ============================================================
   PREMIUM CONSTRUCTION CARD
   ============================================================ */

.keep-premium-construction {
    border-left-color: #c58bff;

    background:
        linear-gradient(
            135deg,
            rgba(42, 25, 54, 0.98),
            rgba(18, 12, 25, 0.98)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 4px 16px rgba(0, 0, 0, 0.34);
}


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

.building-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    margin-bottom: 9px;

    padding-bottom: 9px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}


.building-name {
    color: #f1e6ff;

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

    letter-spacing: 0.4px;

    line-height: 1.25;
}


.building-effect {
    flex-shrink: 0;

    color: #f0c96b;

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

    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ============================================================
   DESCRIPTION / LEVEL
   ============================================================ */

.building-desc {
    margin: 5px 0 10px;

    color: #bca9cc;

    font-size: 14px;
    line-height: 1.45;
}


/* ============================================================
   META INFORMATION
   ============================================================ */

.building-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 8px 22px;

    margin-top: 8px;

    color: #a997b7;

    font-size: 13px;
    line-height: 1.4;
}


.building-meta span {
    display: inline-flex;
    align-items: center;
}


.keep-premium-construction .building-meta {
    color: #c0aecf;
}


.keep-premium-construction .building-meta span:first-child {
    color: #e7d9f2;
    font-weight: 700;
}


/* ============================================================
   ACTIVE CONSTRUCTION TIMER
   ============================================================ */

[data-keep-premium-timer] {
    color: #f0c96b !important;

    font-size: 14px;
    font-weight: 800;
}


/* ============================================================
   ACTION AREA
   ============================================================ */

.building-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    margin-top: 16px;
}


.building-actions button {
    min-height: 38px;

    padding: 0 16px;

    border: 1px solid rgba(177, 92, 225, 0.55);
    border-radius: 6px;

    background:
        linear-gradient(
            180deg,
            rgba(91, 42, 119, 0.95),
            rgba(55, 27, 72, 0.95)
        );

    color: #f3e8ff;

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

    letter-spacing: 0.35px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}


.building-actions button:hover:not(:disabled) {
    border-color: rgba(211, 142, 255, 0.85);

    background:
        linear-gradient(
            180deg,
            rgba(111, 51, 145, 0.98),
            rgba(69, 32, 89, 0.98)
        );

    transform: translateY(-1px);
}


.building-actions button:active:not(:disabled) {
    transform: translateY(0);
}


.building-actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* ============================================================
   PREMIUM TOKEN INPUT
   ============================================================ */

.keep-premium-token-input {
    box-sizing: border-box;

    width: 105px;
    height: 38px;

    padding: 0 10px;

    border: 1px solid rgba(181, 145, 211, 0.5);
    border-radius: 5px;

    background: #f5f3f7;

    color: #17111d;

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

    text-align: center;

    outline: none;
}


.keep-premium-token-input:focus {
    border-color: #c58bff;

    box-shadow:
        0 0 0 2px rgba(197, 139, 255, 0.16);
}


/* ============================================================
   PREMIUM BUTTONS
   ============================================================ */

.keep-premium-accelerate-button {
    min-width: 108px;
}


.keep-premium-finish-button {
    min-width: 108px;

    border-color: rgba(213, 166, 76, 0.55) !important;

    background:
        linear-gradient(
            180deg,
            rgba(91, 63, 28, 0.95),
            rgba(58, 39, 18, 0.95)
        ) !important;
}


.keep-premium-finish-button:hover:not(:disabled) {
    border-color: rgba(242, 199, 104, 0.85) !important;

    background:
        linear-gradient(
            180deg,
            rgba(116, 80, 34, 0.98),
            rgba(72, 48, 21, 0.98)
        ) !important;
}


/* ============================================================
   STANDARD UPGRADE BUTTON
   ============================================================ */

.upgrade-entry:not(.keep-premium-construction)
    .building-actions {
    margin-top: 14px;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.keep-upgrades-empty {
    padding: 32px 20px;

    border: 1px dashed rgba(177, 92, 225, 0.3);
    border-radius: 7px;

    color: #a997b7;

    font-size: 15px;

    text-align: center;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

    .building-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 5px;
    }


    .building-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


@media (max-width: 600px) {

    .keep-building-entry {
        padding: 15px;
    }


    .building-actions {
        align-items: stretch;
        flex-direction: column;
    }


    .keep-premium-token-input,
    .building-actions button {
        width: 100%;
    }
}
