/*!
 Theme Name:   Cocoon Child - 396 Chat
 Template:     cocoon-master
 Description:  396 Chat 会員サイト用 Cocoon 子テーマ
 Version:      1.0.0
 Text Domain:  cocoon-child-396chat
*/

/* ==========================================================================
   396 Chat カスタムログインページ
   ========================================================================== */

.chat396-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 1rem;
}

.chat396-login-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 420px;
    width: 100%;
    padding: 2.5rem 2rem;
}

.chat396-login-card .site-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.chat396-login-card .site-logo img {
    max-width: 180px;
    height: auto;
}

.chat396-login-card .site-logo .site-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
}

.chat396-login-card h2 {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

/* フォーム要素 */
.chat396-login-card label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.3rem;
}

.chat396-login-card input[type="text"],
.chat396-login-card input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.chat396-login-card input[type="text"]:focus,
.chat396-login-card input[type="password"]:focus {
    border-color: #4a90d9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.chat396-login-card .login-remember {
    margin-bottom: 1rem;
}

.chat396-login-card .login-remember label {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    font-size: 0.85rem;
    color: #666;
}

.chat396-login-card .login-remember input[type="checkbox"] {
    margin-right: 0.4rem;
}

.chat396-login-card input[type="submit"],
.chat396-login-card .login-submit input {
    width: 100%;
    padding: 0.75rem;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat396-login-card input[type="submit"]:hover,
.chat396-login-card .login-submit input:hover {
    background: #357abd;
}

/* エラーメッセージ */
.chat396-login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #dc2626;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* パスワードリセットリンク */
.chat396-login-links {
    text-align: center;
    margin-top: 1.2rem;
}

.chat396-login-links a {
    color: #4a90d9;
    font-size: 0.85rem;
    text-decoration: none;
}

.chat396-login-links a:hover {
    text-decoration: underline;
}

/* reCAPTCHA バッジ位置調整 */
.chat396-login-card .grecaptcha-badge {
    margin: 0.5rem auto;
}

.chat396-recaptcha-notice {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin-top: 1rem;
    line-height: 1.4;
}

.chat396-recaptcha-notice a {
    color: #999;
    text-decoration: underline;
}

/* モバイル対応 */
@media (max-width: 480px) {
    .chat396-login-card {
        padding: 1.5rem 1.2rem;
        margin: 0 0.5rem;
    }

    .chat396-login-card .site-logo .site-name {
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   396 Chat 会員マイページ共通
   ========================================================================== */

.chat396-mypage-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* 共通ナビゲーション */
.chat396-member-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    border-bottom: 2px solid #e0e0e0;
}

.chat396-member-nav li {
    margin: 0;
}

.chat396-member-nav li a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.chat396-member-nav li a:hover {
    color: #4a90d9;
}

.chat396-member-nav li.active a {
    color: #4a90d9;
    border-bottom-color: #4a90d9;
    font-weight: 600;
}

/* カード */
.chat396-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.chat396-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

/* 情報テーブル */
.chat396-info-table {
    width: 100%;
    border-collapse: collapse;
}

.chat396-info-table th,
.chat396-info-table td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.9rem;
    border-bottom: 1px solid #f5f5f5;
}

.chat396-info-table th {
    color: #777;
    font-weight: 500;
    width: 35%;
    white-space: nowrap;
}

.chat396-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.8rem;
}

.chat396-note a {
    color: #4a90d9;
}

/* 挨拶 */
.chat396-greeting h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.2rem;
}

/* ステータスバッジ */
.chat396-status-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
}

.chat396-status-active {
    background: #dcfce7;
    color: #16a34a;
}

.chat396-status-expired {
    background: #fef2f2;
    color: #dc2626;
}

.chat396-status-suspended {
    background: #fff7ed;
    color: #ea580c;
}

.chat396-status-banned {
    background: #fef2f2;
    color: #991b1b;
}

.chat396-plan-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    margin-left: 0.5rem;
}

.chat396-expires {
    font-size: 0.85rem;
    color: #555;
    margin-left: 0.5rem;
}

/* ライセンスサマリー */
.chat396-license-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.chat396-license-summary:last-of-type {
    border-bottom: none;
}

/* メニューグリッド */
.chat396-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.chat396-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat396-menu-item:hover {
    border-color: #4a90d9;
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.12);
}

.chat396-menu-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.chat396-menu-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ログアウトリンク */
.chat396-logout-link {
    text-align: center;
    margin-top: 1rem;
}

.chat396-logout-link a {
    color: #999;
    font-size: 0.85rem;
    text-decoration: none;
}

.chat396-logout-link a:hover {
    color: #dc2626;
    text-decoration: underline;
}

/* ライセンスキーページ */
.chat396-license-card {
    position: relative;
}

.chat396-license-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.chat396-license-key-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    background: #f8f8f8;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.chat396-copy-btn {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.7rem;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.chat396-copy-btn:hover {
    background: #357abd;
}

.chat396-copy-btn.copied {
    background: #16a34a;
}

/* 期限切れ警告 */
.chat396-expiring {
    color: #ea580c;
    font-weight: 600;
}

.chat396-expiring-notice {
    font-size: 0.8rem;
    color: #ea580c;
}

/* 通知 */
.chat396-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 1rem;
    color: #92400e;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.chat396-notice-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.chat396-notice-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

/* ==========================================================================
   396 Chat プロンプト管理
   ========================================================================== */

.chat396-prompt-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ステップインジケーター */
.chat396-steps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.chat396-step {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    background: #f0f0f0;
    color: #999;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}

.chat396-step.active {
    background: #4a90d9;
    color: #fff;
}

.chat396-step.done {
    background: #dcfce7;
    color: #16a34a;
}

.chat396-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
}

.chat396-step.active .chat396-step-num {
    background: rgba(255, 255, 255, 0.3);
}

.chat396-step.done .chat396-step-num {
    background: rgba(22, 163, 74, 0.15);
}

.chat396-step-label {
    font-weight: 500;
}

/* 業種選択カード */
.chat396-industry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.chat396-industry-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.chat396-industry-card:hover {
    border-color: #4a90d9;
    background: #f8fbff;
}

.chat396-industry-card.selected {
    border-color: #4a90d9;
    background: #eff6ff;
}

.chat396-industry-card input[type="radio"] {
    margin-right: 0.6rem;
    accent-color: #4a90d9;
}

.chat396-industry-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

/* フォーム */
.chat396-form-group {
    margin-bottom: 1rem;
}

.chat396-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.3rem;
}

.chat396-form-group label .required {
    color: #dc2626;
}

.chat396-form-group input[type="text"],
.chat396-form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.chat396-form-group input[type="text"]:focus,
.chat396-form-group textarea:focus {
    border-color: #4a90d9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.chat396-form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.chat396-field-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
}

.chat396-industry-fields h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0.8rem 0 1rem;
}

.chat396-industry-fields hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 1rem 0;
}

/* JSONプレビュー */
#chat396-json-preview {
    width: 100%;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fafafa;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.5;
}

/* ボタン */
.chat396-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.chat396-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat396-btn-primary {
    background: #4a90d9;
    color: #fff;
}

.chat396-btn-primary:hover:not(:disabled) {
    background: #357abd;
}

.chat396-btn-secondary {
    background: #e0e0e0;
    color: #555;
}

.chat396-btn-secondary:hover {
    background: #d0d0d0;
}

.chat396-step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

/* マイページ モバイル対応 */
@media (max-width: 600px) {
    .chat396-mypage-wrapper {
        padding: 0.5rem;
    }

    .chat396-member-nav ul {
        flex-direction: column;
        border-bottom: none;
        border-left: 2px solid #e0e0e0;
        margin-bottom: 1rem;
    }

    .chat396-member-nav li a {
        border-bottom: none;
        border-left: 2px solid transparent;
        margin-bottom: 0;
        margin-left: -2px;
        padding: 0.5rem 1rem;
    }

    .chat396-member-nav li.active a {
        border-bottom: none;
        border-left-color: #4a90d9;
    }

    .chat396-menu-grid {
        grid-template-columns: 1fr;
    }

    .chat396-info-table th {
        width: auto;
        display: block;
        padding-bottom: 0;
        border-bottom: none;
    }

    .chat396-info-table td {
        display: block;
        padding-top: 0.2rem;
    }

    .chat396-card {
        padding: 1rem;
    }

    .chat396-greeting h2 {
        font-size: 1.1rem;
    }

    /* プロンプト管理 モバイル */
    .chat396-steps {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }

    .chat396-step {
        justify-content: center;
    }

    .chat396-industry-grid {
        grid-template-columns: 1fr;
    }

    .chat396-step-actions {
        flex-direction: column;
    }

    .chat396-step-actions .chat396-btn {
        width: 100%;
        text-align: center;
    }
}
