/**
 * Word Scramble Styles
 *
 * Game-specific styles for the Word Scramble game.
 *
 * @package AIML_Games_WordScramble
 * @since 1.0.0
 */

/* Word Scramble Game Area */
.ws-game-area {
    margin: 20px 0;
}

/* Word List Container */
.ws-word-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Each Word Row */
.ws-word-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    flex-wrap: wrap;
}

/* Scrambled Word Display */
.ws-scrambled-word {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
}

.ws-reshuffle {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.ws-reshuffle:hover {
    opacity: 1;
    transform: scale(1.2);
}

.ws-scrambled-text {
    color: #2563eb;
}

/* Answer Input */
.ws-answer-input {
    flex: 1;
    min-width: 150px;
    padding: 10px 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s, background-color 0.3s;
}

.ws-answer-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ws-answer-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Answer Input States */
.ws-answer-input.ws-correct {
    background-color: #d1fae5;
    border-color: #10b981;
}

.ws-answer-input.ws-incorrect {
    background-color: #fee2e2;
    border-color: #ef4444;
}

.ws-answer-input.ws-empty {
    background-color: #fef3c7;
    border-color: #f59e0b;
}

.ws-answer-input.ws-revealed {
    background-color: #e0f2fe;
    /* Border color preserved from ws-correct/ws-incorrect/ws-empty to show result status */
}

/* Hint Button */
.ws-hint-btn {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.ws-hint-btn:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.ws-hint-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.ws-hint-btn.ws-hint-used {
    background: #d1fae5;
    border-color: #10b981;
    color: #059669;
}

/* Hint Text */
.ws-hint-text {
    display: none;
    flex-basis: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #4b5563;
    background: #fef9c3;
    border-left: 3px solid #eab308;
    border-radius: 0 6px 6px 0;
}

.ws-hint-text.ws-hint-visible {
    display: block;
}

/* Submit Button Area */
.ws-button-area {
    margin: 25px 0;
    text-align: center;
}

.ws-submit-btn {
    font-size: 18px !important;
    padding: 12px 30px !important;
    height: auto !important;
}

/* Responsive */
@media (max-width: 600px) {
    .ws-word-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ws-scrambled-word {
        min-width: auto;
    }

    .ws-answer-input {
        min-width: auto;
    }

    .ws-hint-btn {
        align-self: flex-start;
    }

    .ws-submit-btn {
        font-size: 16px !important;
        padding: 10px 24px !important;
    }
}
