/* --- Jetstream SNS Share Button --- */
.flowbtn12, #copy-title-url-btn, #copy-all-content-btn {
    font-size: 18px;
    border-radius: 8px;
    display: inline-block;
    width: 100%;
    font-weight: bold;
    transition: 0.3s;
    text-decoration: none;
    padding: 10px 0;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
}
ul.snsbtniti2 {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.3s;
}
ul.snsbtniti2.loading {
    opacity: 0.5;
    cursor: not-allowed;
}
ul.snsbtniti2.loading a {
    cursor: not-allowed;
}
ul.snsbtniti2 li {
    width: 200px;
    flex-shrink: 0;
    margin: 0;
}
.fl_tw2 { color: #fff; border: 1px solid #000; background: #000; } .fl_tw2:hover { color: #000; background: #fff; }
.fl_bs2 { color: #fff; border: 1px solid #48bbf8; background: #48bbf8; } .fl_bs2:hover { color: #48bbf8; background: #fff; }
.fl_th2 { color: #fff; border: 1px solid #000; background: #000; } .fl_th2:hover { color: #000; background: #fff; }
.fl_ha2 { color: #fff; border: 1px solid #1899cd; background: #1899cd; } .fl_ha2:hover { color: #1899cd; background: #fff; }
.fl_pi2 { color: #fff; border: 1px solid #e60019; background: #e60019; } .fl_pi2:hover { color: #e60019; background: #fff; }
.fl_fb2 { color: #fff; border: 1px solid #3b5998; background: #3b5998; } .fl_fb2:hover { color: #3b5998; background: #fff; }
.fl_li2 { color: #fff; border: 1px solid #00c300; background: #00c300; } .fl_li2:hover { color: #00c300; background: #fff; }
.copy-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.copy-title-url-container, .copy-all-content-container {
    position: relative;
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
}
#copy-title-url-btn { background-color: #ffd800; color: #fff; border: 1px solid #ffd800; } #copy-title-url-btn:hover { background-color: #fff; color: #ffd800; }
#copy-all-content-btn { background-color: #6c757d; color: #fff; border: 1px solid #6c757d; } #copy-all-content-btn:hover { background-color: #fff; color: #6c757d; }
.copy-message {
    display: none;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(51, 51, 51, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.3s ease-in-out;
    z-index: 10;
    pointer-events: none;
}
.copy-message.show {
    display: block;
    opacity: 1;
}

/* --- AI要約トグルスイッチ --- */
.ai-summary-toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    position: relative;
}
.toggle-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}
.ai-summary-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.ai-summary-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .toggle-slider {
    background-color: #4285f4;
}
input:checked + .toggle-slider:before {
    transform: translateX(26px);
}
input:disabled + .toggle-slider {
    cursor: not-allowed;
    background-color: #e9e9e9;
}
#ai-share-message {
    bottom: auto;
    top: calc(100% + 5px);
}

/* --- Jetstream Gemini --- */
.jetstream-gemini-button-v2, .jetstream-gemini-button-image {
    transition: opacity 0.3s, transform 0.3s;
}
.jetstream-gemini-button-v2:disabled, .jetstream-gemini-button-image:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.jetstream-gemini-button-v2 {
    background: linear-gradient(145deg, #4285f4, #9b72cb, #d96570, #f2a600);
    background-size: 400% 400%;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: gradient-animation 10s ease infinite;
}
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.jetstream-gemini-button-v2:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.jetstream-gemini-button-v2 .gemini-icon {
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm.53 16.59a1.5 1.5 0 0 1-2.12 0L4.59 12.7a1.5 1.5 0 0 1 0-2.12l5.82-5.82a1.5 1.5 0 0 1 2.12 0l5.82 5.82a1.5 1.5 0 0 1 0 2.12zM12 14.12l-3.53-3.53L12 7.06l3.53 3.53z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}
.jetstream-gemini-button-image {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}
.jetstream-gemini-button-image img {
    max-width: 200px;
    height: auto;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border-radius: 8px;
}
.jetstream-gemini-button-image:hover:not(:disabled) img {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.jetstream-gemini-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.jetstream-gemini-modal-content {
    background-color: #ffffff;
    padding: 25px;
    border: 1px solid #ddd;
    width: 90%;
    max-width: 650px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeIn 0.3s;
    transition: background-color 0.3s, color 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.jetstream-gemini-modal-close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}
#gemini-response-content {
    margin-top: 15px;
    margin-bottom: 20px;
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 10px;
    line-height: 1.6;
}
.gemini-prompt-wrapper {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    transition: border-color 0.3s;
}
#gemini-user-prompt {
    width: 100%;
    height: 80px;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    resize: vertical;
    background-color: #fff;
    color: #333;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.gemini-prompt-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
}
#gemini-submit-prompt {
    padding: 10px 20px;
    border: none;
    background-color: #1a73e8;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}
.gemini-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #1a73e8;
    animation: gemini-spin 1s ease infinite;
    margin: 20px auto;
}
@keyframes gemini-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.content_point {
    position: relative;
    padding-top: 20px !important;
    padding-right: 20px !important;
}
.content_point > .jetstream-gemini-button-v2, .content_point > .jetstream-gemini-button-image {
    position: absolute;
    top: 15px;
    right: 15px;
    transform: scale(0.8);
    transform-origin: top right;
}
.content_point > p.has-text-color {
    padding-right: 180px;
}
.gemini-custom-content-wrapper {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

/* 追加されたスタイル */
.gemini-modal-actions {
    display: flex;
    justify-content: center; /* ボタンを中央に配置 */
    align-items: center;
    margin-top: 20px;
    position: relative; /* メッセージ表示用にrelativeを設定 */
}

#copy-summary-and-info-btn {
    /* 既存の .jetstream-gemini-button-v2 スタイルを継承 */
    padding: 10px 20px; /* パディングを調整 */
    font-size: 15px; /* フォントサイズを調整 */
    width: auto; /* 幅を自動調整 */
}

#copy-summary-message {
    bottom: calc(100% + 5px); /* ボタンの上に表示 */
    top: auto; /* topの指定を解除 */
}


@media screen and (max-width: 600px) {
    .content_point > .jetstream-gemini-button-v2, .content_point > .jetstream-gemini-button-image {
        top: 10px;
        right: 10px;
        transform: scale(0.75);
    }
    .content_point > p.has-text-color {
        padding-right: 140px;
    }
}
@media screen and (max-width: 420px) {
    .content_point > .jetstream-gemini-button-v2, .content_point > .jetstream-gemini-button-image {
        transform: scale(0.65);
    }
    .content_point > p.has-text-color {
        padding-right: 120px;
    }
}
html.jetstream-dark-mode-active .jetstream-gemini-button-image img {
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}
html.jetstream-dark-mode-active .jetstream-gemini-button-image:hover img {
    border-color: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}
html.jetstream-dark-mode-active .jetstream-gemini-button-v2 {
    background: #333;
    border: 1px solid #555;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
html.jetstream-dark-mode-active .jetstream-gemini-button-v2:hover {
    background: #444;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}
html.jetstream-dark-mode-active .jetstream-gemini-modal-content {
    background-color: #282828;
    color: #E0E0E0;
    border-color: #444;
}
html.jetstream-dark-mode-active .jetstream-gemini-modal-close {
    color: #aaa;
}
html.jetstream-dark-mode-active .jetstream-gemini-modal-close:hover {
    color: #fff;
}
html.jetstream-dark-mode-active .gemini-prompt-wrapper,
html.jetstream-dark-mode-active .gemini-custom-content-wrapper {
    border-top-color: #444;
}
html.jetstream-dark-mode-active #gemini-user-prompt {
    background-color: #1A1A1A;
    color: #E0E0E0;
    border-color: #555;
}
html.jetstream-dark-mode-active #gemini-user-prompt:focus {
    border-color: #8ab4f8;
}
html.jetstream-dark-mode-active #gemini-submit-prompt {
    background-color: #8ab4f8;
    color: #1A1A1A;
    font-weight: bold;
}
html.jetstream-dark-mode-active #gemini-submit-prompt:hover {
    background-color: #a4e0ff;
}

/* --- 動的に無効化されたボタンのスタイル --- */
.flowbtn12.jetstream-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* aタグのクリックイベントを無効化 */
}