/* waifu-wars/css/guild.css - Styles for the Guild Hall, chat, and quests */

#guild-chat-container, #quest-board-container {
    background: var(--theme-bg-color);
    border: 1px solid var(--theme-border-color);
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    z-index: 2;
    color: var(--theme-body-text-color);
}

#guild-chat-container {
    position: absolute;
    top: 85px; /* Below player info */
    left: 10px;
    width: 300px;
    bottom: 75px; /* Stop above taskbar with a 10px margin */
}

#guild-chat-container h3, #quest-board-container h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--theme-border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: center;
    color: var(--theme-primary-text-color);
}

#chat-log {
    flex-grow: 1;
    overflow-y: auto;
    text-align: left;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--theme-panel-bg-color);
    border-radius: 5px;
}
.chat-message {
    margin-bottom: 8px;
    line-height: 1.4;
}
.chat-message .sender {
    font-weight: bold;
}
.chat-message.player .sender {
    color: #87CEFA;
}
.chat-message.system .sender {
    color: #ffd700;
}
.chat-message.system .text {
    font-style: italic;
    color: #ccc;
}
#chat-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--theme-border-color);
    background: #333;
    color: white;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
}
#chat-input:focus {
    outline: none;
    border-color: var(--theme-primary-text-color);
}

#quest-board-container {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 350px;
    bottom: 75px; /* Stop above taskbar with a 10px margin */
}
#quest-board-lists {
    overflow-y: auto;
}
#quest-board-lists h4 {
    margin: 15px 0 5px 0;
    border-bottom: 1px solid var(--theme-secondary-text-color);
    padding-bottom: 5px;
    color: var(--theme-secondary-text-color);
}
#quest-board-lists ul {
    list-style: '⬦ ';
    padding-left: 20px;
    margin: 0;
}
.quest-list-item {
    padding: 5px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}
.quest-list-item:hover {
    background-color: rgba(255,255,255,0.1);
}
.quest-list-item.completable {
    background-color: rgba(60, 179, 113, 0.3);
    color: #98fb98;
    font-weight: bold;
}
.quest-list-item.completable:hover {
    background-color: rgba(60, 179, 113, 0.5);
}
.quest-list-item.in-progress {
    cursor: default;
    color: #aaa;
    font-style: italic;
}
.quest-list-item.in-progress:hover {
    background-color: transparent;
}

.popup.quest-log-popup {
    width: 600px;
    max-width: 90vw;
    min-height: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: var(--theme-bg-color);
    border-color: var(--theme-border-color);
}

.popup.quest-log-popup h3 {
    text-align: center;
    margin-top: 0;
    font-family: 'Georgia', serif;
    color: var(--theme-primary-text-color);
}

.quest-tabs {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--theme-border-color);
}

.quest-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--theme-secondary-text-color);
    cursor: pointer;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    font-family: 'Georgia', serif;
}

.quest-tab-btn.active {
    color: white;
    border-bottom-color: var(--theme-primary-text-color);
}

.quest-list {
    display: none;
}

.quest-list.active {
    display: block;
}

#quest-content {
    flex-grow: 1;
    overflow-y: auto;
}
#quest-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#quest-content .quest-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(160, 140, 109, 0.3);
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: block;
}
.quest-item-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.quest-main-info {
    flex-grow: 1;
}
.abandon-quest-btn {
    padding: 4px 8px;
    background: #8b0000;
    color: white;
    border: 1px solid #ff0000;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    flex-shrink: 0;
}
.abandon-quest-btn:hover {
    background: #a52a2a;
}
.quest-note {
    font-size: 0.9em;
    color: #ccc;
    margin-top: 5px;
    padding-left: 10px;
}
.quest-farm-toggle {
    margin-top: 5px;
    padding-left: 10px;
    display: flex;
    align-items: center;
}
.quest-farm-toggle label {
    margin-left: 5px;
    cursor: pointer;
}
.quest-timer {
    font-size: 0.9em;
    color: #ffc107;
    margin-top: 5px;
    padding-left: 10px;
}
.quest-timer.expired {
    color: #ff4500;
}

/* --- Mobile Optimizations --- */
@media (max-width: 1024px) {
    #guild-chat-container, #quest-board-container {
        display: none;
    }
}