/*
 * チャット欄コピペツール専用CSS
 */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    background: #f3f4f6;
    color: #222;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Yu Gothic",Meiryo,sans-serif;
}

.container {
    max-width: 1000px;
    margin: auto;
}

h1 {
    margin: 0 0 8px;
}

.description,.info {
    color: #6b7280;
    font-size: 13px;
}

.description {
    margin-bottom: 20px;
}

#blocks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.block {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.block.dragging {
    opacity: .45;
}

.block.drag-over {
    background: #eff6ff;
    border-color: #60a5fa;
}

.drag-handle {
    width: 32px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 22px;
    cursor: grab;
    user-select: none;
}

.move-buttons {
    width: 38px;
    flex: 0 0 38px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.move-button {
    flex: 1;
    min-height: 28px;
    border: 0;
    border-radius: 5px;
    background: #e5e7eb;
    font-weight: bold;
    cursor: pointer;
}

.move-button:hover:not(:disabled) {
    background: #d1d5db;
}

.move-button:disabled {
    opacity: .35;
    cursor: default;
}

.text-area {
    flex: 1;
    min-width: 0;
    min-height: 70px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    resize: vertical;
    font: 15px/1.5 inherit;
}

.text-area:focus {
    outline: 2px solid #93c5fd;
}

.actions {
    width: 155px;
    flex: 0 0 155px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.copy-button,.delete-button,.toolbar button {
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

.copy-button {
    flex: 1;
    background: #2563eb;
    color: #fff;
    font-weight: bold;
}

.copy-button:hover {
    background: #1d4ed8;
}

.delete-button {
    min-height: 30px;
    background: #fee2e2;
    color: #b91c1c;
}

.delete-button:hover {
    background: #fecaca;
}

.copy-status {
    min-height: 18px;
    text-align: center;
    color: #15803d;
    font-size: 12px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.toolbar button {
    padding: 10px 18px;
    background: #374151;
    color: #fff;
    font-weight: bold;
}

.toolbar .secondary {
    background: #6b7280;
}

.info {
    margin-top: 18px;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .toolbar button {
        flex: 1 1 100%;
    }

    .block {
        flex-wrap: wrap;
    }

    .move-buttons {
        width: 70px;
        flex-basis: 70px;
        flex-direction: row;
    }

    .text-area {
        order: 3;
        flex-basis: 100%;
    }

    .actions {
        flex: 1;
        width: auto;
    }
}

/* コピー按钮の表示をブラウザ間で揃える */
.copy-button {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 0;
    border-radius: 5px;
    background: #2563eb;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    white-space: pre-wrap;
    cursor: pointer;
}

.copy-button:hover {
    background: #1d4ed8;
}

.copy-button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.copy-button:active {
    background: #1e40af;
}
