/* オーバーレイ */
#overlay {
    display: none;
    /* 最初は非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100505;

    justify-content: center;
    align-items: center;
}

#overlay iframe {
    width: 90%;
    height: 90%;
    border: none;
    border-radius: 12px;
    background: #fff;
}

#overlay button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 1.5em;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

#overlay button:hover {
    background: #c0392b;
}
/*----------------------------------------------------------------------------------------------------------------------*/
/* オーバーレイ */
#overlay_scg_home {
    display: none;
    /* 最初は非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1009999;

    justify-content: center;
    align-items: center;
}

#overlay_scg_home iframe {
    width: 90%;
    height: 90%;
    border: none;
    border-radius: 12px;
    background: #fff;
}

#overlay_scg_home button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 1.5em;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

#overlay_scg_home button:hover {
    background: #c0392b;
}
/*----------------------------------------------------------------------------------------------------------------------*/
/* オーバーレイ */
#overlay_memo {
    display: none;
    /* 最初は非表示 */
    position: fixed;
    top: 50;
    left: 0;
    width:20%;
    height: 60%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100500;

    justify-content: center;
    align-items: center;
}

#overlay_memo iframe {
    width: 90%;
    height: 90%;
    border: none;
    border-radius: 12px;
    background: #fff;
}

#overlay_memo button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 1.5em;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

#overlay_memo button:hover {
    background: #c0392b;
}

/*----------------------------------------------------------------------------------------------------------------------*/

/* オーバーレイ */
#overlay_copy {
    display: none;
    /* 最初は非表示 */
    position: fixed;
    top: 50;
    left: 0;
    width: 40%;
    height: 60%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100501;

    justify-content: center;
    align-items: center;
}

#overlay_copy iframe {
    width: 90%;
    height: 90%;
    border: none;
    border-radius: 12px;
    background: #fff;
}

#overlay_copy button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 1.5em;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

#overlay_copy button:hover {
    background: #c0392b;
}

/*----------------------------------------------------------------------------------------------------------------------*/

/* オーバーレイ */
#overlay_music {
    display: none;
    /* 最初は非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100503;

    justify-content: center;
    align-items: center;
}

#overlay_music iframe {
    width: 90%;
    height: 90%;
    border: none;
    border-radius: 12px;
    background: #fff;
}

#overlay_music button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 1.5em;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

#overlay_music button:hover {
    background: #c0392b;
}

/*----------------------------------------------------------------------------------------------------------------------*/

/* オーバーレイ */
#overlay_custom_article {
    display: none;
    /* 最初は非表示 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100503;

    justify-content: center;
    align-items: center;
}

#overlay_custom_article iframe {
    width: 90%;
    height: 90%;
    border: none;
    border-radius: 12px;
    background: #fff;
}

#overlay_custom_article button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 1.5em;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

#overlay_custom_article button:hover {
    background: #c0392b;
}

/*----------------------------------------------------------------------------------------------------------------------*/

/* オーバーレイ全体 */
#overlay_blockform {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    width: 40%;
    height: 60%;
    z-index: 100502;
    border-radius: 16px;
    padding: 12px;
}

/* 内部フォーム */
#overlay_blockform form {
    width: 100%;
    height: 100%;
    background: #fdfdfd;
    border-radius: 16px;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* タイトル */
#overlay_blockform h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 6px;
}

/* 閉じるボタン */
#overlay_blockform button.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    font-size: 1.2em;
    padding: 6px 12px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}
#overlay_blockform button.close-btn:hover {
    background: #c0392b;
}

/* 入力欄 */
#overlay_blockform input[type="text"],
#overlay_blockform textarea,
#overlay_blockform input[type="file"] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1em;
    background: #fafafa;
    transition: border 0.2s, background 0.2s;
}
#overlay_blockform input[type="text"]:focus {
    border-color: #3498db;
    background: #fff;
}

/* ボタン共通 */
#overlay_blockform input[type="submit"],
#overlay_blockform button,
#overlay_blockform .list-remove {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

/* アクションボタン */
#overlay_blockform input[type="submit"],
#overlay_blockform button:not(.close-btn):not(.list-remove) {
    background: #3498db;
    color: #fff;
}
#overlay_blockform input[type="submit"]:hover,
#overlay_blockform button:not(.close-btn):not(.list-remove):hover {
    background: #2980b9;
}

/* 削除ボタン（リスト用） */
#overlay_blockform .list-remove {
    background: #ff7675;
    color: #fff;
    font-size: 0.8em;
    padding: 4px 10px;
}
#overlay_blockform .list-remove:hover {
    background: #d63031;
}

/* ボタン群フレックス */
.button-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.button-group input[type="submit"],
.button-group button,
.button-group input[type="file"] {
    flex: 1;
}

/* 設定リスト */
#blockIdsList, #blockKeywordsList {
    list-style: none;
    padding: 0;
    margin: 0;
}
#blockIdsList li, #blockKeywordsList li {
    background: #f7f9fc;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/*----------------------------------------------------------------------------------------------------------------------*/

/* スマホ版（768px以下） */
@media screen and (max-width: 768px) {
    #overlay,
    #overlay_memo,
    #overlay_copy {
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 8px;
        overflow-x: scroll;
        overflow-y: scroll;
    }

    /* 全般オーバーレイ */
    #overlay iframe,
    #overlay_memo iframe,
    #overlay_copy iframe {
        width: 95%;
        height: 80%;
        border-radius: 8px;
    }

    #overlay button,
    #overlay_memo button,
    #overlay_copy button {
        top: 10px;
        right: 10px;
        font-size: 1.2em;
        padding: 8px 10px;
    }

    /* ブロックフォーム全体 */
    #overlay_blockform {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        padding: 8px;
        background: rgba(0, 0, 0, 0.6); /* 背景でスマホ感 */
        display: none;
        position: flex;
        justify-content: center;
        align-items: center;
    }

    #overlay_blockform form {
        width: 95%;
        height: auto;
        max-height: 90%;
        border-radius: 12px;
        padding: 16px;
        font-size: 1em;
    }

    /* 入力欄 */
    #overlay_blockform input[type="text"],
    #overlay_blockform textarea,
    #overlay_blockform input[type="file"] {
        font-size: 1em;
        padding: 12px;
    }

    /* ボタン */
    #overlay_blockform input[type="submit"],
    #overlay_blockform button,
    #overlay_blockform .list-remove {
        font-size: 1em;
        padding: 10px 14px;
    }

    /* リスト */
    #blockIdsList li,
    #blockKeywordsList li {
        font-size: 1em;
        padding: 10px;
    }

    /* 閉じるボタン */
    #overlay_blockform button.close-btn {
        top: 8px;
        right: 8px;
        font-size: 1.4em;
        padding: 10px;
    }
}