/**
 * Word Search (Mots Meles) Activity Styles
 * Mobile-first design
 *
 * @package Crowdaa_Challenges_Calendar
 * @since 4.12.331
 */

/* ========== CONTAINER ========== */

.word-search-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
}

/* ========== GAME INTERFACE ========== */



/* Header */
.ws-header {
    text-align: center;
    margin-bottom: 20px;
}

.ws-header-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.3);
}

.ws-header-icon svg {
    color: white;
}

.ws-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    margin: 0 0 8px 0;
}

.ws-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Stats container (progress + timer) */
.ws-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

/* Progress bar */
.ws-progress {
    flex: 1;
}

.ws-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ws-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #eab308 0%, #ca8a04 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ws-progress-text {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* Timer */
.ws-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fef9c3;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    color: #854d0e;
    white-space: nowrap;
}

.ws-timer svg {
    color: #eab308;
}

.ws-timer-warning {
    background: linear-gradient(135deg, #fecaca 0%, #fee2e2 100%);
    color: #dc2626;
    animation: ws-timer-pulse 0.5s ease-in-out infinite alternate;
}

.ws-timer-warning svg {
    color: #dc2626;
}

@keyframes ws-timer-pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

/* Grid */
.ws-grid-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.ws-grid {
    display: grid;
    gap: 2px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 8px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.ws-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.ws-cell:hover {
    background: #fef9c3;
}

.ws-cell.ws-selecting {
    background: #fef08a;
    color: #854d0e;
    transform: scale(1.1);
    z-index: 1;
}

.ws-cell.ws-found {
    background: linear-gradient(135deg, #d9f99d 0%, #bef264 100%);
    color: #3f6212;
    box-shadow: inset 0 0 0 2px #65a30d;
}

/* Word list */
.ws-word-list {
    background: #fef9c3;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ws-word-list-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #854d0e;
    margin-bottom: 12px;
    font-size: 14px;
}

.ws-word-list-title svg {
    color: #eab308;
}

.ws-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-word {
    display: inline-block;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #854d0e;
    transition: all 0.2s ease;
}

.ws-word.ws-word-found {
    background: #84cc16;
    color: white;
    text-decoration: line-through;
}

/* Found words list (shown during game) */
.ws-found-words {
    background: #dcfce7;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ws-found-words-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 12px;
    font-size: 14px;
}

.ws-found-words-title svg {
    color: #22c55e;
}

.ws-found-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-found-word-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #22c55e;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.ws-found-word-item svg {
    color: white;
}

/* Points info */
.ws-points-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fef3c7;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #92400e;
}

.ws-points-info svg {
    color: #f59e0b;
}

/* ========== RESULTS ========== */

.ws-results {
    background: white;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ws-results-header {
    text-align: center;
    margin-bottom: 24px;
}

.ws-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(132, 204, 22, 0.3);
}

.ws-results-icon svg {
    color: white;
}

.ws-results-title {
    font-size: 24px;
    font-weight: 700;
    color: #166534;
    margin: 0 0 8px 0;
}

.ws-results-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Points badge */
.ws-results-points {
    text-align: center;
    margin-bottom: 24px;
}

.ws-points-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
}

.ws-points-badge.ws-has-points {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(132, 204, 22, 0.3);
}

.ws-points-badge.ws-no-points {
    background: #f3f4f6;
    color: #6b7280;
}

.ws-points-value {
    font-size: 28px;
    font-weight: 700;
}

.ws-points-label {
    font-size: 14px;
}

/* Results words list */
.ws-results-words {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
}

.ws-results-words-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    font-size: 14px;
}

.ws-results-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-result-word {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.ws-result-word.ws-found {
    background: #dcfce7;
    color: #166534;
}

.ws-result-word.ws-missed {
    background: #fee2e2;
    color: #dc2626;
    text-decoration: line-through;
}

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

@media (max-width: 360px) {
    .ws-cell {
        font-size: 11px;
    }
}

@media (min-width: 480px) {
    .ws-game,
    .ws-results {
        padding: 32px 28px;
    }

    .ws-cell {
        font-size: 16px;
    }
}
