/* 例文Clip お礼メール自動作成ツール */
.rtmg-wrap {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0;
    font-family: inherit;
    color: #222;
}

.rtmg-header {
    background: linear-gradient(135deg, #f7fbff, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 26px;
    margin-bottom: 20px;
}

.rtmg-header h2{
    margin:8px 0 10px;
    font-size:1.7rem;
    color:#ffffff !important;

    /* Cocoon対策 */
    background:transparent !important;
    background-color:transparent !important;
    border:none !important;
    box-shadow:none !important;
    padding:0 !important;
}

.rtmg-header p {
    margin: 0;
    line-height: 1.8;
}

.rtmg-badge {
    display: inline-block;
    background: #e8f2ff;
    color: #1d5fa7;
    border: 1px solid #c8def8;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

.rtmg-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 20px;
}

.rtmg-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.rtmg-card h3 {
    margin: 0 0 16px;
    font-size: 1.25rem;
    border-left: 5px solid #2b70c9;
    padding-left: 10px;
}

.rtmg-card h4 {
    margin: 18px 0 8px;
}

.rtmg-card label {
    display: block;
    font-weight: 700;
    margin: 14px 0 6px;
}

.rtmg-card input,
.rtmg-card select,
.rtmg-card textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 16px;
    background: #fff;
}

.rtmg-card textarea {
    min-height: 105px;
    resize: vertical;
    line-height: 1.7;
}

#rtmg_result {
    min-height: 360px;
    margin-top: 12px;
    white-space: pre-wrap;
}

.rtmg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.rtmg-actions button,
.rtmg-tab,
.rtmg-subject-btn {
    border: none;
    border-radius: 10px;
    padding: 11px 15px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s ease;
}

.rtmg-main-btn {
    background: #2b70c9;
    color: #fff;
    font-weight: 700;
}

.rtmg-sub-btn {
    background: #eef2f7;
    color: #223;
}

.rtmg-actions button:hover,
.rtmg-tab:hover,
.rtmg-subject-btn:hover {
    opacity: 0.86;
    transform: translateY(-1px);
}

.rtmg-subject-list {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.rtmg-subject-btn {
    text-align: left;
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.rtmg-subject-btn.is-selected {
    border-color: #2b70c9;
    background: #eef6ff;
    color: #124f91;
    font-weight: 700;
}

.rtmg-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.rtmg-tab {
    background: #f1f5f9;
    color: #1e293b;
}

.rtmg-tab.is-active {
    background: #2b70c9;
    color: #fff;
    font-weight: 700;
}

.rtmg-placeholder {
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 12px;
}

.rtmg-notice {
    min-height: 1.5em;
    margin: 10px 0 0;
    color: #1d5fa7;
    font-weight: 700;
}

.rtmg-check {
    margin-top: 18px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
}

.rtmg-check ul {
    margin: 8px 0 0 1.2em;
    padding: 0;
}

.rtmg-check li {
    margin-bottom: 6px;
    line-height: 1.7;
}

@media (max-width: 840px) {
    .rtmg-grid {
        grid-template-columns: 1fr;
    }

    .rtmg-header,
    .rtmg-card {
        padding: 18px;
    }

    #rtmg_result {
        min-height: 300px;
    }
}

@media (prefers-color-scheme: dark) {
    .rtmg-wrap {
        color: #e5e7eb;
    }

    .rtmg-header,
    .rtmg-card {
        background: #111827;
        border-color: #334155;
    }

    .rtmg-header {
        background: linear-gradient(135deg, #102033, #111827);
    }

    .rtmg-card input,
    .rtmg-card select,
    .rtmg-card textarea {
        background: #0f172a;
        color: #e5e7eb;
        border-color: #475569;
    }

    .rtmg-sub-btn,
    .rtmg-tab,
    .rtmg-subject-btn,
    .rtmg-placeholder,
    .rtmg-check {
        background: #1f2937;
        color: #e5e7eb;
        border-color: #475569;
    }

    .rtmg-subject-btn.is-selected {
        background: #17365c;
        color: #fff;
    }

}
