/* =====================================================
   Quest Journal & Achievement Diary Styles
   ===================================================== */

/* ===== Quest Sidebar Entries ===== */
.rs-quest-entry {
    padding: 4px 8px;
    font-family: 'Crimson Text', serif;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid rgba(200, 162, 84, 0.1);
    transition: background 0.15s;
}

.rs-quest-entry:hover {
    background: rgba(200, 162, 84, 0.08);
}

.rs-quest-entry.status-completed {
    color: #4ade80;
}

.rs-quest-entry.status-in_progress {
    color: #fbbf24;
}

.rs-quest-entry.status-not_started {
    color: #ef4444;
}

.rs-quest-entry.status-locked {
    color: #6b7280;
}

.rs-quest-entry .quest-qp {
    float: right;
    font-size: 11px;
    opacity: 0.7;
}

/* Quest Points Counter */
.rs-quest-points-header {
    padding: 4px 8px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    color: var(--df-gold, #c8a254);
    border-bottom: 1px solid rgba(200, 162, 84, 0.2);
    text-align: center;
}

/* ===== Quest Detail Modal ===== */
.quest-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: questModalFadeIn 0.15s ease;
}

@keyframes questModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quest-modal-content {
    position: relative;
    background: linear-gradient(180deg, var(--df-bg-card, #352c22) 0%, var(--df-bg-deep, #252014) 100%);
    border: 2px solid var(--df-border-bright, #c8a254);
    border-radius: 4px;
    padding: 14px 16px 16px;
    max-width: 420px;
    width: 92%;
    max-height: 75vh;
    overflow-y: auto;
    color: var(--df-text-bright, #e8dcc8);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 10px rgba(200, 162, 84, 0.15);
    font-family: 'Crimson Text', serif;
    font-size: 13px;
    line-height: 1.45;
}

.quest-modal-content::-webkit-scrollbar {
    width: 5px;
}

.quest-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.quest-modal-content::-webkit-scrollbar-thumb {
    background: rgba(200, 162, 84, 0.4);
    border-radius: 3px;
}

.quest-modal-close {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
    transition: color 0.15s;
}

.quest-modal-close:hover {
    color: #ef4444;
}

/* Quest Complete Modal */
.quest-complete-modal {
    text-align: center;
    max-width: 360px;
}

.quest-complete-header {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
    margin-bottom: 4px;
}

.quest-complete-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    color: var(--df-gold, #c8a254);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(200, 162, 84, 0.25);
}

.quest-complete-rewards {
    text-align: left;
}

.quest-complete-reward-item {
    font-size: 13px;
    padding: 3px 0;
    color: #d0c8b8;
}

/* Modal header */
.quest-modal-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(200, 162, 84, 0.25);
}

.quest-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--df-gold, #c8a254);
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    margin-bottom: 6px;
}

.quest-modal-badges {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.quest-modal-badge {
    font-family: 'Crimson Text', serif;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 8px;
    border: 1px solid rgba(200, 162, 84, 0.5);
    color: rgba(200, 162, 84, 0.85);
    white-space: nowrap;
}

/* Modal description */
.quest-modal-desc {
    font-size: 13px;
    color: #b8b0a0;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(200, 162, 84, 0.12);
    line-height: 1.5;
}

/* Modal sections */
.quest-modal-section {
    margin-bottom: 10px;
}

.quest-modal-section-title {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--df-gold, #c8a254);
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(200, 162, 84, 0.15);
}

/* Requirements */
.quest-modal-req {
    padding: 2px 0;
    font-size: 13px;
    color: #d0c8b8;
}

/* Journal steps */
.quest-modal-step {
    padding: 2px 0 2px 14px;
    position: relative;
    font-size: 13px;
}

.quest-modal-step::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.quest-modal-step.done {
    color: #4ade80;
    text-decoration: line-through;
    opacity: 0.65;
}

.quest-modal-step.done::before {
    background: #4ade80;
}

.quest-modal-step.current {
    color: #fbbf24;
}

.quest-modal-step.current::before {
    background: #fbbf24;
}

.quest-modal-step.future {
    color: #6b7280;
}

.quest-modal-step.future::before {
    background: #4b5563;
}

/* Rewards */
.quest-modal-reward {
    padding: 2px 0;
    font-size: 13px;
    color: #d0c8b8;
}

/* Action buttons */
.quest-action-btn {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    padding: 5px 14px;
    margin: 3px;
    border: 1px solid var(--df-gold, #c8a254);
    background: rgba(200, 162, 84, 0.1);
    color: var(--df-gold, #c8a254);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}

.quest-action-btn:hover {
    background: rgba(200, 162, 84, 0.2);
}

/* ===== Achievement Diary (in panel) ===== */
.diary-region-entry {
    padding: 5px 8px;
    font-family: 'Crimson Text', serif;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid rgba(200, 162, 84, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
}

.diary-region-entry:hover {
    background: rgba(200, 162, 84, 0.08);
}

.diary-region-name {
    color: var(--df-text-bright, #e8dcc8);
}

.diary-tier-dots {
    display: flex;
    gap: 4px;
}

.diary-tier-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(200, 162, 84, 0.3);
}

.diary-tier-dot.claimed {
    background: #4ade80;
    border-color: #4ade80;
}

.diary-tier-dot.complete {
    background: #fbbf24;
    border-color: #fbbf24;
}

.diary-tier-dot.incomplete {
    background: #374151;
    border-color: #4b5563;
}

/* Diary detail (in-panel view) */
.diary-detail-panel {
    padding: 6px 8px;
    color: var(--df-text-bright, #e8dcc8);
}

.diary-detail-back {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    color: var(--df-accent-warm, #d4763c);
    cursor: pointer;
    margin-bottom: 4px;
    display: inline-block;
}

.diary-detail-back:hover {
    text-decoration: underline;
}

.diary-detail-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--df-gold, #c8a254);
    text-align: center;
    margin-bottom: 6px;
}

.diary-tier-section {
    margin-bottom: 8px;
}

.diary-tier-header {
    font-family: 'Cinzel', serif;
    font-size: 13px;
    color: var(--df-gold, #c8a254);
    padding: 3px 0;
    border-bottom: 1px solid rgba(200, 162, 84, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diary-tier-header .tier-progress {
    font-family: 'Crimson Text', serif;
    font-size: 11px;
    color: var(--df-text-bright, #e8dcc8);
    opacity: 0.7;
}

.diary-task {
    font-family: 'Crimson Text', serif;
    font-size: 12px;
    padding: 2px 0 2px 16px;
    position: relative;
    color: var(--df-text-bright, #e8dcc8);
}

.diary-task::before {
    content: '\2610';
    position: absolute;
    left: 1px;
    color: #6b7280;
    font-size: 11px;
}

.diary-task.completed {
    color: #4ade80;
    text-decoration: line-through;
    opacity: 0.7;
}

.diary-task.completed::before {
    content: '\2611';
    color: #4ade80;
}

.diary-claim-btn {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 11px;
    padding: 3px 10px;
    margin-top: 3px;
    border: 1px solid #4ade80;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}

.diary-claim-btn:hover {
    background: rgba(74, 222, 128, 0.2);
}

.diary-claim-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #6b7280;
    color: #6b7280;
}
