/*
|--------------------------------------------------------------------------
| 4education - Clica e Arrasta - Laravel V22.1
|--------------------------------------------------------------------------
*/

:root {
    --drag-primary: #c125fa;
    --drag-primary-dark: #9e18d1;
    --drag-primary-soft: #fbf4fe;
    --drag-page: #f5f6f8;
    --drag-card: #ffffff;
    --drag-text: #332c36;
    --drag-muted: #766b79;
    --drag-border: #e4d9e8;
    --drag-success: #46aa60;
    --drag-danger: #df5757;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--drag-page);
    color: var(--drag-text);
    font-family: Arial, Helvetica, sans-serif;
}

button {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.drag-game-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.drag-game-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    background: var(--drag-primary);
    box-shadow: 0 2px 8px rgba(42, 28, 47, 0.10);
}

.drag-game-logo {
    display: block;
    width: auto;
    max-width: 220px;
    height: 48px;
    object-fit: contain;
}

.drag-game-page {
    flex: 1 0 auto;
    width: 100%;
    padding: 24px 16px 28px;
}

.drag-game-shell {
    width: min(1040px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
}

/* Pergunta centralizada no mesmo eixo do jogo. */
.drag-question-area {
    width: min(960px, 100%) !important;
    max-width: 960px !important;
    margin: 0 auto !important;
    align-self: center !important;
}

.drag-question-area #question-container {
    width: 100% !important;
    margin: 0 !important;
}

.drag-question-area .question-text {
    display: -webkit-box !important;
    width: 100% !important;
    max-height: calc(1.5em * 3) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    overflow-wrap: anywhere !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
}

/*
 * IMPORTANTE:
 * O botão .game-question-read-more NÃO recebe estilo neste arquivo.
 * Aparência, hover, tamanho, borda e responsividade vêm exclusivamente
 * de game-question-standard.css, como nos outros jogos.
 */

/* Alternativas | indicador | área de soltar */
.drag-workspace {
    position: relative;
    width: min(960px, 100%);
    min-height: 390px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 78px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
}

.drag-options-panel,
.drag-play-area {
    position: relative;
    z-index: 2;
    border: 1px solid var(--drag-border);
    border-radius: 16px;
    background: var(--drag-card);
    box-shadow: 0 8px 24px rgba(51, 38, 56, 0.08);
}

.drag-options-panel {
    padding: 19px;
}

.drag-panel-heading {
    margin-bottom: 8px;
}

.drag-panel-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--drag-primary-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.drag-panel-heading h1 {
    margin: 0;
    color: var(--drag-text);
    font-size: 20px;
    font-weight: 800;
}

.drag-panel-help {
    margin: 0 0 16px;
    color: var(--drag-muted);
    font-size: 12px;
    line-height: 1.45;
}

.drag-options {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

/* Novo design das alternativas */
.drag-option {
    position: relative;
    min-height: 62px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 25px;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 2px solid #e8ddec;
    border-radius: 13px;
    background: #ffffff;
    color: var(--drag-text);
    cursor: grab;
    user-select: none;
    touch-action: none;
    box-shadow: 0 4px 12px rgba(51, 38, 56, 0.06);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background-color 0.16s ease,
        box-shadow 0.16s ease,
        opacity 0.16s ease;
}

.drag-option:hover {
    transform: translateY(-2px);
    border-color: var(--drag-primary);
    background: var(--drag-primary-soft);
    box-shadow: 0 7px 16px rgba(193, 37, 250, 0.12);
}

.drag-option:focus-visible {
    outline: 3px solid rgba(193, 37, 250, 0.20);
    outline-offset: 2px;
}

.drag-option.dragging {
    border-color: var(--drag-primary);
    background: var(--drag-primary);
    color: #ffffff;
    opacity: 0.88;
    transform: scale(1.025) rotate(1deg);
    box-shadow: 0 9px 20px rgba(193, 37, 250, 0.22);
}

.drag-option-index {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--drag-primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.drag-option-text {
    min-width: 0;
    overflow-wrap: anywhere;
    color: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.drag-option-grip {
    display: grid;
    place-items: center;
    color: #ac9caf;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.drag-option-grip::before {
    content: "⠿";
}

.drag-option:hover .drag-option-grip {
    color: var(--drag-primary-dark);
}

.drag-option.dragging .drag-option-index {
    background: #ffffff;
    color: var(--drag-primary-dark);
}

.drag-option.dragging .drag-option-grip {
    color: #ffffff;
}

.drag-option.is-correct {
    border-color: var(--drag-success);
    background: #eff9f2;
    color: #246f38;
    opacity: 1;
}

.drag-option.is-correct .drag-option-index {
    background: var(--drag-success);
    color: #ffffff;
}

.drag-option.is-incorrect {
    border-color: var(--drag-danger);
    background: #fff0f1;
    color: #a83c43;
    opacity: 1;
}

.drag-option.is-incorrect .drag-option-index {
    background: var(--drag-danger);
    color: #ffffff;
}

.drag-option.is-muted {
    opacity: 0.40;
}

/* Indicador sempre visível entre os painéis */
.drag-transfer-indicator {
    position: relative;
    z-index: 4;
    align-self: center;
    justify-self: center;
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--drag-primary);
    pointer-events: none;
}

.drag-transfer-label,
.drag-transfer-caption {
    color: var(--drag-primary-dark);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.drag-transfer-arrow {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 2px solid var(--drag-primary);
    border-radius: 50%;
    background: #ffffff;
    color: var(--drag-primary);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(193, 37, 250, 0.14);
    animation: dragArrowMove 1.4s ease-in-out infinite;
}

@keyframes dragArrowMove {
    0%,
    100% {
        transform: translateX(-3px);
    }

    50% {
        transform: translateX(5px);
    }
}

.drag-play-area {
    min-height: 390px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 26px;
    overflow: hidden;
}

.drag-ghost {
    width: 112px;
    height: 112px;
    margin-bottom: 9px;
    color: var(--drag-primary);
    animation: dragGhostFloat 4s ease-in-out infinite;
}

.drag-ghost svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.drag-ghost path {
    fill: rgba(193, 37, 250, 0.10);
    stroke: currentColor;
    stroke-width: 6;
    stroke-linejoin: round;
}

.drag-ghost circle {
    fill: currentColor;
}

.drag-ghost.is-correct {
    color: var(--drag-success);
    animation: dragGhostCelebrate 0.8s ease;
}

.drag-ghost.is-incorrect {
    color: var(--drag-danger);
    animation: dragGhostWrong 0.55s ease;
}

@keyframes dragGhostFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes dragGhostCelebrate {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.16) translateY(-9px);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes dragGhostWrong {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-9px) rotate(-5deg);
    }

    75% {
        transform: translateX(9px) rotate(5deg);
    }
}

.drag-instruction {
    margin: 0 0 11px;
    color: var(--drag-primary-dark);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.drag-drop-zone {
    width: min(385px, 94%);
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px dashed var(--drag-primary);
    border-radius: 14px;
    background: #fcf9fd;
    color: var(--drag-muted);
    text-align: center;
    transition:
        transform 0.16s ease,
        background-color 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.drag-drop-zone.drag-over {
    transform: scale(1.025);
    border-color: var(--drag-primary-dark);
    background: #f4e9f9;
    box-shadow: 0 8px 18px rgba(193, 37, 250, 0.12);
}

.drag-drop-placeholder {
    font-size: 12px;
}

.drag-selected {
    width: 100%;
    padding: 13px 15px;
    border-radius: 11px;
    background: var(--drag-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.drag-result {
    width: min(960px, 100%);
    margin: 0 auto;
}

.drag-result.visible {
    display: block !important;
}

.drag-actions {
    width: min(960px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

.drag-next-button {
    min-height: 43px;
    padding: 9px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--drag-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.drag-next-button:hover {
    background: var(--drag-primary-dark);
}

.drag-error,
.drag-empty-state {
    width: min(960px, 100%);
    margin: 0 auto;
    padding: 15px 17px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--drag-border);
}

.drag-error {
    color: #9b3636;
    border-color: #efc1c1;
    background: #fff1f1;
}

.drag-empty-state strong {
    display: block;
    margin-bottom: 5px;
}

.drag-empty-state p {
    margin: 0;
    color: var(--drag-muted);
}

.drag-footer,
.platform-footer.drag-footer {
    flex: 0 0 auto !important;
    width: 100% !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: auto 0 0 !important;
    padding: 14px 18px !important;
    background: var(--drag-primary-dark) !important;
    color: #ffffff !important;
    text-align: center !important;
}

.drag-footer p {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 12px !important;
}

.drag-touch-mirror {
    position: fixed;
    z-index: 5000;
    pointer-events: none;
    opacity: 0.94;
    margin: 0;
    transform: translate(-50%, -50%);
}

@media (max-width: 800px) {
    .drag-game-page {
        padding: 20px 10px 22px;
    }

    .drag-game-shell {
        gap: 15px;
    }

    .drag-question-area {
        width: min(520px, 100%) !important;
    }

    .drag-workspace {
        width: min(520px, 100%);
        grid-template-columns: 1fr;
        min-height: 0;
        row-gap: 12px;
    }

    .drag-options-panel,
    .drag-play-area {
        width: 100%;
        margin: 0 auto;
    }

    .drag-transfer-indicator {
        width: auto;
        min-height: 58px;
    }

    .drag-transfer-arrow {
        width: 42px;
        height: 42px;
        font-size: 24px;
        animation: dragArrowMoveMobile 1.4s ease-in-out infinite;
    }

    @keyframes dragArrowMoveMobile {
        0%,
        100% {
            transform: rotate(90deg) translateX(-3px);
        }

        50% {
            transform: rotate(90deg) translateX(5px);
        }
    }

    .drag-play-area {
        min-height: 315px;
    }

    .drag-result,
    .drag-actions,
    .drag-error,
    .drag-empty-state {
        width: min(520px, 100%);
    }

    .drag-actions {
        justify-content: center;
    }
}
