/* ============================================
   WORDLE HELPER PAGE STYLES - COMPACT LAYOUT
   ============================================ */

.wordle-compact-layout {
    padding: 1.5rem;
}

/* Header */
.wordle-header-compact {
    text-align: center;
    margin-bottom: 1.5rem;
}

.wordle-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(135deg, #A5EEFF 0%, #64C2A6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(165, 238, 255, 0.3));
}

/* Main Input Row */
.wordle-main-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(165, 238, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.excluded-group {
    min-width: 180px;
}

/* Inputs Grid - All three sections */
.inputs-grid {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Known Letters Section (Green) */
.known-section {
    padding: 1rem;
    border: 2px solid rgba(100, 194, 166, 0.4);
    border-radius: 12px;
    background: rgba(100, 194, 166, 0.08);
    text-align: center;
}

.known-section .wordle-boxes-container {
    justify-content: center;
}

/* Excluded Letters Section (Gray) */
.excluded-section {
    padding: 1rem;
    border: 2px solid rgba(128, 128, 128, 0.4);
    border-radius: 12px;
    background: rgba(128, 128, 128, 0.08);
    min-width: 140px;
    display: flex;
    flex-direction: column;
}

.excluded-section .input-label {
    display: block;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Section Labels */
.section-label-green,
.section-label-yellow,
.section-label-gray {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem !important;
}

.section-label-green {
    color: #64C2A6 !important;
}

.section-label-yellow {
    color: #ffc107 !important;
}

.section-label-gray {
    color: #9a9a9a !important;
}

.button-group {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.find-button-group {
    display: flex;
    justify-content: center;
    align-items: center !important;;
    width: 100%;
    margin-top: 0.5rem;
}

/* Wordle Character Boxes */
.wordle-boxes-container {
    display: flex;
    gap: 0.5rem;
}

.wordle-char-box {
    width: 56px !important;
    height: 56px;
}

.wordle-char-box .mud-input-outlined-border {
    height: 100%;
    border-color: rgba(165, 238, 255, 0.3) !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.wordle-char-box:hover .mud-input-outlined-border,
.wordle-char-box:focus-within .mud-input-outlined-border {
    border-color: #64C2A6 !important;
    box-shadow: 0 0 12px rgba(100, 194, 166, 0.3);
}

.wordle-char-box input,
.wordle-char-box .mud-input-slot input.mud-input-root {
    text-align: center !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 0 !important;
    height: 100%;
    width: 100%;
    color: #A5EEFF !important;
    caret-color: #64C2A6;
}

.wordle-char-box .mud-input {
    margin-top: 0;
}

.wordle-char-box .mud-input-slot {
    padding: 0 !important;
}

/* Filled box styling */
.wordle-char-box:has(input:not(:placeholder-shown)) .mud-input-outlined-border,
.wordle-char-box:has(input[value]:not([value=""])) .mud-input-outlined-border {
    background: linear-gradient(145deg, rgba(100, 194, 166, 0.15), rgba(165, 238, 255, 0.1));
    border-color: #64C2A6 !important;
}

/* Excluded Letters Box */
.excluded-letters-box {
    width: 100%;
}

.excluded-letters-box .mud-input-outlined-border {
    border-color: rgba(154, 154, 154, 0.4) !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.excluded-letters-box:hover .mud-input-outlined-border,
.excluded-letters-box:focus-within .mud-input-outlined-border {
    border-color: #9a9a9a !important;
    box-shadow: 0 0 12px rgba(154, 154, 154, 0.2);
}

.excluded-letters-box input {
    text-transform: uppercase !important;
    letter-spacing: 0.2rem;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #9a9a9a !important;
    padding: 0.5rem !important;
}

.excluded-letters-box .mud-input-slot {
    min-height: 56px;
}

/* Misplaced Characters Section (Yellow) */
.misplaced-section {
    padding: 1rem;
    border: 2px solid rgba(255, 193, 7, 0.4);
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.08);
    display: flex;
    flex-direction: column;
}

.misplaced-section .input-label {
    display: block;
    margin-bottom: 0.75rem;
    text-align: center;
}

.misplaced-entries {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.misplaced-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 193, 7, 0.05);
    border-radius: 8px;
}

.misplaced-letter-box {
    width: 48px !important;
    height: 48px;
}

.misplaced-letter-box .mud-input-outlined-border {
    height: 100%;
    border-color: rgba(255, 193, 7, 0.4) !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.misplaced-letter-box:hover .mud-input-outlined-border,
.misplaced-letter-box:focus-within .mud-input-outlined-border {
    border-color: #ffc107 !important;
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.3);
}

.misplaced-letter-box input,
.misplaced-letter-box .mud-input-slot input.mud-input-root {
    text-align: center !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 0 !important;
    height: 100%;
    width: 100%;
    color: #ffc107 !important;
    caret-color: #ffc107;
}

.misplaced-letter-box .mud-input {
    margin-top: 0;
}

.misplaced-letter-box .mud-input-slot {
    padding: 0 !important;
}

.position-toggles {
    display: flex;
    gap: 0.25rem;
}

.position-toggle {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.position-toggle:hover {
    border-color: rgba(255, 193, 7, 0.6);
    color: rgba(255, 255, 255, 0.8);
}

.position-toggle.active {
    background: #ffc107;
    border-color: #ffc107;
    color: #1a1a1a;
}

.remove-entry-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-entry-btn:hover:not(.hidden) {
    background: rgba(220, 53, 69, 0.4);
}

.remove-entry-btn.hidden {
    visibility: hidden;
    cursor: default;
}

.add-entry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem auto 0;
    padding: 0.5rem 1rem;
    border: 1px dashed rgba(255, 193, 7, 0.4);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 193, 7, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-entry-btn:hover {
    border-color: #ffc107;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

/* Action Button */
.check-words-btn {
    width: 200px !important;
    height: 56px;
    padding: 0 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(35, 102, 139, 0.4) !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    white-space: nowrap;
}

.check-words-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(100, 194, 166, 0.5) !important;
}

/* Results Section */
.results-section {
    border-top: 1px solid rgba(165, 238, 255, 0.15);
    padding-top: 1rem;
}

.results-header-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.results-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-secondary);
}

.results-count {
    display: inline-block;
    background: rgba(100, 194, 166, 0.15);
    color: #64C2A6;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(100, 194, 166, 0.3);
}

/* Words Grid */
.words-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .words-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (min-width: 992px) {
    .words-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

.word-card {
    background: linear-gradient(145deg, rgba(45, 50, 55, 0.6), rgba(35, 40, 45, 0.4));
    border: 1px solid rgba(165, 238, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.word-card:hover {
    transform: translateY(-2px);
    border-color: rgba(165, 238, 255, 0.3);
    box-shadow: 0 4px 12px rgba(165, 238, 255, 0.1);
}

.word-text {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #A5EEFF 0%, #64C2A6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.more-results-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin: 0.75rem 0 0 0;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .wordle-compact-layout {
        padding: 1rem;
    }

    .wordle-title {
        font-size: 1.5rem;
    }

    .wordle-main-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .input-group {
        width: 100%;
    }

    .wordle-boxes-container {
        justify-content: center;
    }

    .wordle-char-box {
        width: 50px !important;
        height: 50px;
    }

    .wordle-char-box input,
    .wordle-char-box .mud-input-slot input.mud-input-root {
        font-size: 1.5rem !important;
    }

    .check-words-btn {
        width: 200px !important;
    }

    .words-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .misplaced-entry {
        flex-wrap: wrap;
        justify-content: center;
    }

    .position-toggle {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .inputs-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .known-section,
    .excluded-section,
    .misplaced-section {
        width: 100%;
    }
}

/* Override MudBlazor input colors for dark theme */
.wordle-char-box .mud-input-label,
.excluded-letters-box .mud-input-label {
    color: rgba(165, 238, 255, 0.6) !important;
}

/* Smooth transitions */
.wordle-char-box,
.excluded-letters-box,
.word-card,
.check-words-btn {
    transition: all 0.2s ease;
}

.mud-input > input.mud-input-root {
    height: 3lh !important;
}