/* ============================================================
   SHADOWSKINGS — FACTIONS PANEL (FULL CLEAN FILE)
   Obsidian + Violet Rune Aesthetic
   ============================================================ */

/* ROOT PANEL */
#factions-panel {
    width: 100%;
    height: 100%;
    background: #0d0b11; /* Obsidian */
    display: flex;
    flex-direction: column;
    color: #e0d8ff;
    font-family: "Cinzel", serif;
    text-shadow: 0 0 4px #6a4fb3;
}

/* ============================================================
   HEADER
   ============================================================ */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #120f17;
    border-bottom: 2px solid #3a2a55;
    box-shadow: 0 0 12px rgba(106,79,179,0.25);
}

.panel-title {
    font-size: 22px;
    font-weight: bold;
    color: #dcd2ff;
    text-shadow: 0 0 6px #8b5cff;
}

.close-button {
    background: #1a1a1f;
    border: 1px solid #5a3ca8;
    color: #dcd2ff;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s ease;
    text-shadow: 0 0 4px #6a4fb3;
}

.close-button:hover {
    background: #2a1f3d;
    border-color: #8b5cff;
}

/* ============================================================
   TABS — Shadowmere Rune Tabs
   ============================================================ */
.faction-tabs {
    display: flex;
    justify-content: space-around;
    background: #120f17;
    border-bottom: 2px solid #3a2a55;
    padding: 10px 0;
    box-shadow: inset 0 0 12px rgba(106,79,179,0.25);
}

.faction-tab {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 15px;
    color: #b8a8e6;
    transition: 0.2s ease;
    letter-spacing: 1px;
    text-shadow: 0 0 4px #6a4fb3;
}

.faction-tab:hover {
    color: #e8e0ff;
    text-shadow: 0 0 8px #8b5cff;
}

.faction-tab.active {
    color: #ffffff;
    border-bottom: 2px solid #8b5cff;
    font-weight: bold;
    text-shadow: 0 0 10px #8b5cff;
}

/* ============================================================
   LOCAL SECTIONS
   ============================================================ */
.faction-section {
    padding: 20px;
}

.hidden-section {
    display: none !important;
}

.section-header {
    font-size: 18px;
    margin-bottom: 12px;
    color: #dcd2ff;
    font-weight: bold;
    text-shadow: 0 0 8px #8b5cff;
}

/* ============================================================
   HOUSES OVERVIEW (RESTORED)
   ============================================================ */

#houses-overview-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Each row in the overview list */
.house-overview-row {
    display: flex;
    align-items: center;
    background: #1a1a1f;
    padding: 10px 14px;
    border: 1px solid #3a2a55;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(106,79,179,0.25);
    transition: 0.2s ease;
    cursor: pointer;
}

.house-overview-row:hover {
    border-color: #8b5cff;
    box-shadow: inset 0 0 14px rgba(139,92,255,0.4);
}

/* House sigil */
.house-overview-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-right: 12px;
    border-radius: 4px;
    border: 1px solid #5a3ca8;
}

/* House name */
.house-overview-name {
    font-size: 18px;
    font-weight: bold;
    color: #e0d8ff;
    text-shadow: 0 0 4px #6a4fb3;
}

/* ============================================================
   HOUSE DETAILS (Generals / Marshal)
   ============================================================ */
.house-faction {
    background: #1a1a1f;
    border: 1px solid #3a2a55;
    padding: 8px 12px;
    border-radius: 4px;
    color: #dcd2ff;
    margin-bottom: 6px;
    box-shadow: inset 0 0 10px rgba(106,79,179,0.25);
}

/* ============================================================
   DYNAMIC CONTAINER
   ============================================================ */
#faction-dynamic-container {
    padding: 20px;
    border-top: 2px solid #3a2a55;
    background: #120f17;
    min-height: 300px;
    box-shadow: inset 0 0 12px rgba(106,79,179,0.25);
}

/* ============================================================
   COMMUNICATION BUTTONS
   ============================================================ */
.comm-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.comm-btn {
    background: #1a1a1f;
    border: 1px solid #5a3ca8;
    color: #dcd2ff;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s ease;
    text-shadow: 0 0 4px #6a4fb3;
}

.comm-btn:hover {
    background: #2a1f3d;
    border-color: #8b5cff;
}

/* ============================================================
   CREATE FACTION PANEL
   ============================================================ */
#create-faction-panel input,
#create-faction-panel select,
#create-faction-panel textarea {
    width: 100%;
    background: #1a1a1f;
    border: 1px solid #3a2a55;
    color: #e0d8ff;
    padding: 8px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-family: "Cinzel", serif;
}

#create-faction-panel input:focus,
#create-faction-panel select:focus,
#create-faction-panel textarea:focus {
    border-color: #8b5cff;
    outline: none;
    box-shadow: 0 0 8px rgba(139,92,255,0.4);
}

#create-faction-panel button {
    background: #1a1a1f;
    border: 1px solid #5a3ca8;
    color: #dcd2ff;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s ease;
}

#create-faction-panel button:hover {
    background: #2a1f3d;
    border-color: #8b5cff;
}

.panel-message {
    margin-top: 10px;
    font-size: 14px;
}

.panel-message.success {
    color: #b0ffb0;
    text-shadow: 0 0 6px rgba(0,255,0,0.4);
}

.panel-message.error {
    color: #ff9a9a;
    text-shadow: 0 0 6px rgba(255,0,0,0.4);
}
.factions-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #a00;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    z-index: 50;
}
.factions-close-btn:hover {
    background: #c00;
}

