/**
 * 共用WordPress フロント用スタイル
 * sharedwp-frontend.css
 */

/* ----------------------------------------
 * ドメイン一覧テーブル（共通）
 * ---------------------------------------- */

.sharedwp-domain-list {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.sharedwp-domain-list__table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 13px;
}

.sharedwp-domain-list__table th,
.sharedwp-domain-list__table td {
    padding: 6px 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.sharedwp-domain-list__table th {
    background-color: #f7f7f7;
    font-weight: 600;
    text-align: left;
}

/* サイトセル内のリンク */
.sharedwp-domain-list__table td p {
    margin: 0;
}

.sharedwp-domain-list__table td a {
    text-decoration: none;
}

.sharedwp-domain-list__table td a:hover {
    text-decoration: underline;
}

/* ----------------------------------------
 * 上限に達した行のグレーアウト（JS制御）
 * ---------------------------------------- */

.sharedwp-domain-row--disabled {
    opacity: 0.4;
    pointer-events: none; /* 行ごとクリック不可（リンクも含めて封じる） */
}

/* すでに30本満了など、サーバ側で出しているアラート */
.sharedwp-domain-list__alert {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background-color: #fff4e5;
    border-left: 4px solid #ffa500;
    font-size: 0.9rem;
}

/* ----------------------------------------
 * AI手動選択モード用：上限メッセージ
 * ---------------------------------------- */

.sharedwp-domain-list__limit-message {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #c00;
}



/* ----------------------------------------
 * タスクログ：バッチID列
 * ---------------------------------------- */

.sharedwp-col-batch-key {
    white-space: nowrap;
}

.sharedwp-batch-key {
    display: inline-block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-size: 11px;
    font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
}

.sharedwp-batch-copy {
    margin-left: 4px;
    padding: 0 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.sharedwp-batch-copy.is-copied {
    opacity: 0.7;
}


/* ----------------------------------------
 * タスクログ：サテライト列
 * ---------------------------------------- */

.sharedwp-col-domain {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* サテライト列内の a / small 調整（任意） */
.sharedwp-col-domain a {
    text-decoration: none;
}

.sharedwp-col-domain a:hover {
    text-decoration: underline;
}

.sharedwp-col-domain small {
    display: block;
    font-size: 11px;
    color: #666;
}


/* ----------------------------------------
 * タスクログ：エラー内容列（failedタブ）
 * ---------------------------------------- */

.sharedwp-col-error-message {
    max-width: 280px;
    white-space: normal;      /* 折り返し可 */
    word-break: break-word;   /* 長いURLやメッセージでも折り返す */
    font-size: 12px;
}

.sharedwp-col-error-message span {
    display: inline-block;
}


/* ----------------------------------------
 * タスクログ：ステータスバッジ（pendingタブなど）
 * ---------------------------------------- */

.sharedwp-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #ddd;
    font-size: 11px;
    line-height: 1.4;
}

/* 実行中ステータス */
.sharedwp-status-badge.is-running {
    background-color: #e6f7ff;
    border-color: #1890ff;
    color: #0050b3;
}

/* 待機中ステータス */
.sharedwp-status-badge.is-pending {
    background-color: #fffbe6;
    border-color: #faad14;
    color: #7f4e00;
}



/* ----------------------------------------
 * Runtime control：運営ステータスカード
 * ---------------------------------------- */

.sharedwp-runtime-card {
    margin: 16px 0 20px;
    padding: 16px 18px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sharedwp-runtime-card h4 {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.4;
}

.sharedwp-runtime-card__summary {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.sharedwp-runtime-card__row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f6f7f7;
}

.sharedwp-runtime-card__row.is-total {
    background: #eef4ff;
    border: 1px solid #c9d8f0;
}

.sharedwp-runtime-card__label {
    min-width: 140px;
    font-weight: 600;
    color: #1d2327;
}

.sharedwp-runtime-card__total {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: #111;
}

.sharedwp-runtime-card__row.is-total .sharedwp-runtime-card__total {
    font-size: 24px;
}

.sharedwp-runtime-card__meta {
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

.sharedwp-runtime-card__toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.sharedwp-runtime-toggle-form {
    margin: 0;
}

.sharedwp-runtime-card__updated {
    margin: 12px 0 0;
    font-size: 12px;
    color: #646970;
}

/* ----------------------------------------
 * Runtime control：トグルボタン
 * ---------------------------------------- */

.sharedwp-runtime-toggle {
    min-width: 150px;
    font-weight: 600;
    border-width: 1px;
}

.sharedwp-runtime-toggle.is-running {
    border-color: #1f8f4e;
    background: #e8f7ee;
    color: #166534;
}

.sharedwp-runtime-toggle.is-running:hover,
.sharedwp-runtime-toggle.is-running:focus {
    border-color: #157347;
    background: #dff2e7;
    color: #14532d;
}

.sharedwp-runtime-toggle.is-paused {
    border-color: #d63638;
    background: #fdeaea;
    color: #a12622;
}

.sharedwp-runtime-toggle.is-paused:hover,
.sharedwp-runtime-toggle.is-paused:focus {
    border-color: #b32d2e;
    background: #f9dede;
    color: #8f1d1f;
}

/* ----------------------------------------
 * Runtime control：フロント notice
 * ---------------------------------------- */

.sharedwp-runtime-notice {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    background: #f0f6fc;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.6;
}

.sharedwp-runtime-notice--warning {
    border-left-color: #dba617;
    background: #fff8e5;
}

.sharedwp-runtime-notice--danger {
    border-left-color: #d63638;
    background: #fef1f1;
}

/* ----------------------------------------
 * Runtime paused：JS が付与する補助状態
 * ---------------------------------------- */

.is-runtime-paused {
    opacity: 0.6;
    pointer-events: none;
}