/* filename: wp-content/plugins/wp-wow/css/wow-achievements.css */

/* Parent category tabs */
.wp-wow-ach-parent-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.wp-wow-parent-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.wp-wow-parent-tab-link:hover {
    background: #020617;
    border-color: rgba(96,165,250,.7);
}

.wp-wow-parent-tab-link.is-active {
    background: linear-gradient(135deg,#1d4ed8,#22c55e);
    border-color: transparent;
    color: #f9fafb;
    transform: translateY(-1px);
}

.wp-wow-parent-tab-count {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    font-size: 11px;
}

/* Active parent title */
.wp-wow-active-parent-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin: 0 0 12px;
    text-transform: uppercase;
    color: #f9fafb;
}

/* Category blocks */
.wp-wow-ach-category-block {
    margin-bottom: 28px;
    padding: 14px 0 8px;
    border-top: 1px solid rgba(15,23,42,.9);
}

.wp-wow-ach-category-block:first-of-type {
    border-top: none;
}

.wp-wow-ach-category-nested {
    margin-top: 10px;
    padding-left: 18px;
    border-left: 1px dashed rgba(148,163,184,.3);
}

.wp-wow-ach-category-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 8px;
}

.wp-wow-ach-category-title {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.wp-wow-ach-category-meta {
    font-size: 11px;
    color: #9ca3af;
}

/* Achievement list */
.wp-wow-achievement-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Achievement row — green/red border only */
.wp-wow-ach-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(15,23,42,.55);
    border: 2px solid transparent;
    transition: transform .1s ease, background .15s ease;
}

.wp-wow-ach-row.earned {
    border-color: rgba(34,197,94,0.8);
}

.wp-wow-ach-row.not-earned {
    border-color: rgba(185,28,28,0.8);
    opacity: .85;
}

.wp-wow-ach-row:hover {
    transform: translateY(-2px);
    background: rgba(15,23,42,.85);
}

/* Icon */
.wp-wow-ach-row-icon {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
}

.wp-wow-ach-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Title & points */
.wp-wow-ach-row-title-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wp-wow-ach-row-title {
    font-size: 15px;
    font-weight: 500;
    color: #e5e9f0;
    margin: 0;
}

.wp-wow-ach-row-points {
    padding: 2px 8px;
    border-radius: 999px;
    background: #111827;
    border: 1px solid #fbbf24;
    color: #fbbf24;
    font-size: 12px;
}

/* Description */
.wp-wow-ach-row-desc {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #d1d5db;
}

/* Account-wide */
.wp-wow-ach-row-accountwide {
    padding: 2px 8px;
    background: #1f2937;
    border-radius: 999px;
    border: 1px solid #818cf8;
    color: #c7d2fe;
    font-size: 11px;
    display: inline-block;
    margin-top: 4px;
}

/* Criteria block under description – 2 columns, last item stays left */
.wp-wow-ach-criteria-block {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 24px;
}

/* Einzelnes Criteria-Item (main + child) */
.wp-wow-ach-criteria-item {
    width: 100%;
    font-size: 12px;
    color: #e2e8f0;
    padding: 4px 8px;
    text-align: center;
    box-sizing: border-box;
}

/* If there is only ONE criteria item, center it */
.wp-wow-ach-criteria-item:only-child {
    grid-column: 1 / -1;
    text-align: center;
    justify-self: center;
}

/* Optional: leichte optische Unterscheidung, falls du willst */
.wp-wow-ach-criteria-main {
    font-weight: 500;
}

.wp-wow-ach-criteria-child {
    opacity: 0.95;
}

/* Auf Handy: 1 Spalte */
@media (max-width: 640px) {
    .wp-wow-ach-criteria-block {
        grid-template-columns: 1fr;
    }

    .wp-wow-ach-criteria-item:only-child {
        grid-column: auto;
        justify-self: center;
    }
}

/* Reward centered */
.wp-wow-ach-row-reward-line {
    margin-top: 10px;
    text-align: center;
}

.wp-wow-ach-row-reward-text {
    border: 1px dashed #ef4444;
    color: #fca5a5;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
    font-size: 11px;
    line-height: 1.2;
}

.wp-wow-ach-row-reward-text.is-earned {
    border: 1px dashed #22c55e;   /* green */
    color: #86efac;
}

/* Force reward styling based on the row state (wins against most theme rules) */
.wp-wow-ach-row.earned .wp-wow-ach-row-reward-text {
    border-color: #22c55e;
    color: #86efac;
}

.wp-wow-ach-row.not-earned .wp-wow-ach-row-reward-text {
    border-color: #ef4444;
    color: #fca5a5;
}

.wp-wow-ach-criteria-item.is-completed {
    border: 1px solid rgba(34, 197, 94, 0.9);
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
}

.wp-wow-ach-criteria-item.is-not-completed {
    border: 1px solid rgba(248, 113, 113, 0.7);
    background: rgba(248, 113, 113, 0.15);
    color: #fecaca;
}

.wp-wow-ach-row-title.is-account-wide {
    color: #3ab4ff !important;
}

.wp-wow-ach-progress {
    margin-top: 6px;
}

.wp-wow-ach-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #020617;
    overflow: hidden;
}

.wp-wow-ach-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg,#38bdf8,#22c55e);
    border-radius: 999px;
}

.wp-wow-ach-progress-label {
    margin-top: 3px;
    font-size: 11px;
    color: #e5e7eb;
    text-align: right;
}

.wp-wow-ach-row-completed {
    margin-top: 6px;
    font-size: 11px;
    color: #9ca3af;
    text-align: right;
}