/* theme.css */
* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, sans-serif;
    background-color: #f8f9fa;
    overflow: hidden; /* 全体がスクロールするのを防ぐ */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 12px;
}

.top-controls {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* copyボタンを左右に2分割するラッパー */
.copy-split {
    display: flex;
    gap: 8px;
    flex: 1;
}
.copy-split button {
    width: 50%;
}

.update-notification {
    background-color: hsl(156, 76%, 42%);
    color: #000;
    padding: 8px 12px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.update-notification button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ボタンの共通設定：横いっぱいに広がる */
button {
    width: 100%;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: block;
    transition: filter 0.2s ease;
}

button:hover {
    filter: brightness(1.1);
}

/* 録音ボタン：一番大きく目立たせる */
.main-record-btn {
    height: 60px;
    font-size: 1.2rem;
    background-color: #007bff;
    color: white;
    margin-bottom: 8px;
}

/* 録音コントロール */
.stop-controls {
    display: flex;
    gap: 8px;
    width: 100%;
}

.stop-btn, .restart-btn {
    height: 60px;
    font-size: 1.2rem;
    background-color: #007bff;
    color: white;
}

.stop-btn {
    flex: 2;
}

.restart-btn {
    flex: 1;
    background-color: #ff9800;
    color: white;
    font-size: 0.8rem;
}

/* コピーボタン：録音よりは控えめだが横いっぱいに */
.copy-btn {
    height: 45px;
    font-size: 1rem;
    background-color: #6c757d;
    color: white;
}

/* 結果表示：自動的に広がり、中身だけスクロールする */
#result {
    flex-grow: 1;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 1rem;
}
#result:empty::before {
    content: "🎤 ...";  /* マイクのアイコンなど */
    display: block;
    text-align: center;
    color: #adb5bd;
    margin-top: 40px;
    font-size: 1.5rem;
}


/* 設定ボタン */
.settings-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    background-color: #6c757d;
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.setting-category {
    width: 100%;
    padding: 0.1em 0.5em 0.1em 0.5em;
    background-color: rgba(128, 128, 128, 0.2);
    border-radius: 5px;
    margin: 0;
}

.danger-link-btn {
    background: none;
    color: #dc3545;
    font-size: 0.8rem;
    font-weight: normal;
    text-decoration: underline;
    width: 100%;
    padding: 8px;
}


/* ダイアログ */
.dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.dialog.show {
    display: flex;
}

.dialog-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#logsDialog .dialog-content {
    width: 90%;
    height: 90%;
    max-width: none;
    max-height: none;
}

.dialog-content h3 {
    border-bottom: 1px solid #ccc;
}

.dialog-content button {
    height: 50px;
    margin: 5px 0;
    font-size: 1.1rem;
}

.dialog-content input {
    font-size: 1.1rem;
}

.setting-item {
    margin: 15px 0;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1rem;
}

.prompt-input {
    width: 100%;
    height: 100px;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-family: -apple-system, sans-serif;
    resize: vertical;
    box-sizing: border-box;
}

.dialog-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

#logsList {
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    margin-bottom: 20px;
}


.lang-dropdown {
    width: 100%;
    height: 35px;
    margin-bottom: 8px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    background-color: white;
    padding: 0 10px;
    font-size: 0.9rem;
}

@media (prefers-color-scheme: dark) {
    .lang-dropdown {
        background-color: #333;
        color: white;
        border-color: #444;
    }
}

@media (prefers-color-scheme: dark) {
    body { background-color: #121212; color: #e0e0e0; }
    #result { background-color: #1e1e1e; border-color: #333; }
    .dialog-content { background-color: #1e1e1e; }
}

