/* ===========================================
   SHARED SOLVER STYLES
   Used by: all solver/descrambler pages
   =========================================== */

/* --- SEARCH BAR: pill input with circular button inside --- */
.search-wrap {
    position: relative;
    margin-bottom: 10px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    border: 2px solid #336699;
    border-radius: 50px;
    padding: 14px 60px 14px 22px;
    font-size: 17px;
    font-weight: 500;
    color: #1f2937;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #1f6fb2;
    box-shadow: 0 0 0 3px rgba(51, 102, 153, 0.18);
}

.search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.search-go {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #336699;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
}

.search-go:hover {
    background: #2d5580;
}

.search-go svg {
    width: 22px;
    height: 22px;
}

/* --- OPTIONS BUTTON: separate pill below search --- */
.btn-options-pill {
    border-radius: 20px;
    margin: 8px auto 0;
    max-width: 160px;
    font-size: 1rem;
    padding: 6px 16px;
    background: #edf1f5;
    border: 1px solid #c8c6c6;
    color: #336699;
    font-weight: 600;
    display: block;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-options-pill:hover {
    background: #d4e8fb;
}

/* --- WORD CHIPS: rounded pills --- */
.li-btn {
    display: inline-block;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 1.05em;
    margin: 4px;
    border-radius: 24px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.li-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.li-btn > a {
    display: inline-block;
    text-decoration: none;
}

.li-btn.light {
    background-color: #e8f0fa;
    color: #336699;
}

.li-btn.light:hover {
    background-color: #d4e8fb;
}

.li-btn.dark {
    background-color: #336699;
    color: #f3f3f3;
}

/* --- CONTENT BOXES: rounded --- */
.content-box {
    border-radius: 12px;
    background-color: #fafafa;
    padding: 20px;
    margin: 12px 0;
    border: 1px solid #eee;
    font-size: 1.1em;
}

/* --- LIGHT BOX: rounded --- */
.light-box {
    padding: 12px;
    margin: 16px 0;
    background-color: #f5f7fa;
    border-radius: 12px;
}

/* --- RESULTS SECTION: rounded --- */
.unscrambled-answers {
    border: 2px solid #d4e8fb;
    padding: 12px;
    margin: 16px 0;
    border-radius: 12px;
}

/* --- ALL BUTTONS: rounded pills --- */
.btn {
    border-radius: 24px;
}

.btn.btn-outline {
    padding: 6px 16px;
    border: 1px solid #c8c6c6;
    border-radius: 24px;
    margin: 4px;
    display: inline-block;
    background-color: #edf1f5;
    font-size: 1em;
    transition: background-color 0.15s;
}

.btn.btn-outline:hover {
    background-color: #d4e8fb;
}

.btn.btn-outline.active {
    background-color: #336699;
    color: #fff;
    border-color: #336699;
}

/* --- LETTER / LENGTH CHIPS --- */
li.btn.letter,
li.btn.length {
    display: inline-block;
    margin: 3px;
    padding: 0;
}

li.btn.letter a,
li.btn.length a {
    background-color: #336699;
    color: #f3f3f3;
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    transition: background-color 0.15s;
}

li.btn.letter a:hover,
li.btn.length a:hover {
    background-color: #275280;
    text-decoration: none;
}

/* --- ADVANCED OPTIONS: rounded card --- */
.card {
    border-radius: 12px;
    border: 1px solid #ddd;
}

.card-header {
    border-radius: 12px 12px 0 0;
}

.card-body .form-control,
.card-body .form-select,
.card-body select.form-control {
    border-radius: 10px;
}

/* --- HIGHLIGHT for jump-to --- */
.highlight-section {
    animation: highlightFade 1.5s;
}

@keyframes highlightFade {
    0% { background-color: rgba(51,102,153,0.12); }
    100% { background-color: transparent; }
}

/* --- JUMP BUTTONS --- */
.jump-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
}

.jump-buttons .btn {
    margin: 0 0 5px 0;
    border-radius: 20px;
}

.sort-buttons,
.jump-section {
    margin-bottom: 10px;
}

/* --- RESULTS ACTIONS (copy/download) --- */
.results-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.results-actions .btn {
    font-size: 1em;
    padding: 6px 16px;
    border-radius: 24px;
}

/* --- POINTS superscript --- */
.li-btn sup {
    font-size: 0.75em;
    color: #888;
    margin-left: 2px;
}

/* --- BADGE in jump buttons --- */
.jump-buttons .badge {
    background: #336699;
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.8em;
    margin-left: 4px;
}

/* --- ANAGRAM: exact vs partial --- */
.anagram-exact {
    border-left: 4px solid #336699;
    padding-left: 12px;
}

.anagram-partial {
    border-left: 4px solid #b8d4f0;
    padding-left: 12px;
    opacity: 0.9;
}

/* --- PAGE HEADER rounded bottom --- */
.page-header-main {
    padding: 12px;
    background-color: #dfefff;
    border-radius: 0 0 16px 16px;
}

/* --- FOOTER rounded top --- */
.footer {
    border-radius: 16px 16px 0 0;
}

/* --- MOBILE --- */
@media only screen and (max-width: 576px) {
    .search-input {
        font-size: 16px;
        padding: 12px 54px 12px 18px;
    }

    .search-go {
        width: 40px;
        height: 40px;
        right: 5px;
    }

    .search-go svg {
        width: 20px;
        height: 20px;
    }

    .li-btn {
        padding: 5px 10px;
        font-size: 1em;
        margin: 3px;
    }

    .content-box {
        padding: 14px;
        border-radius: 10px;
    }

    .light-box {
        border-radius: 10px;
    }

    .unscrambled-answers {
        border-radius: 10px;
        padding: 8px;
    }


    .jump-buttons .btn {
        font-size: 0.95em;
        padding: 4px 10px;
    }

    .btn-options-pill {
        max-width: 140px;
        font-size: 0.95em;
    }
}
