.code-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
}

.code-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* パスワード生成ページのスタイルを再利用 */
.password-display-area #after-textarea {
    padding-right: 50px;
    height: auto; /* textareaの高さを行数で制御 */
}



/* --- style.css に追記 --- */
.password-display-area {
    position: relative;
    display: flex;
    align-items: center;
}

.copy-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #555;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 5;
}
.copy-button:hover {
    color: var(--primary-color);
}

.copy-feedback {
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    /* ▼▼▼ ここが重要 ▼▼▼ */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
}

.copy-feedback.show {
    opacity: 1;
    visibility: visible;
}

/* ======== ▼テーブルタグ作成ページ専用スタイル▼ ======== */
.table-generator-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 992px) {
    .table-generator-layout {
        /* PCでは2カラムレイアウト */
        grid-template-columns: 400px 1fr;
    }
}

.controls-panel .control-group:not(:last-child) {
    margin-bottom: 25px;
}

.controls-panel h3 {
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.grid-controls, .color-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.controls-panel label {
    display: block;
    font-size: 0.9rem;
}
.controls-panel input[type="number"],
.controls-panel select {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.color-controls fieldset {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
}
.color-controls legend {
    font-size: 0.9rem;
    padding: 0 5px;
}
.color-controls label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.color-controls input[type="color"] {
    width: 40px;
    height: 25px;
    border: 1px solid #ccc;
    padding: 2px;
}

.nowrap-controls {
    margin-top: 15px;
}
.nowrap-controls legend {
    font-weight: bold;
    margin-bottom: 8px;
}
.nowrap-controls label {
    margin-right: 15px;
    display: inline-flex;
}
.nowrap-controls input {
    margin-right: 5px;
}


#alignment-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.bulk-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
.bulk-buttons .button {
    padding: 8px 12px;
}


.table-preview {
    border: 1px solid #ccc;
    padding: 10px;
    overflow-x: auto;
    background-color: #fdfdfd;
}

.table-preview table {
    width: 100%;
}

.table-preview th, .table-preview td {
    min-width: 80px;
    padding: 8px;
    border: 1px solid #ccc; /* プレビュー用の仮枠線 */
}
.table-preview [contenteditable="true"]:focus {
    outline: 2px solid var(--primary-color);
    background-color: #e8f0fe;
}

.output-panel .password-display-area #html-output {
     height: auto;
}

