/**
 * BCP Creator - フロントエンドスタイル
 * WordPress版
 */

/* ベーススタイル */
.bcp-creator-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
}

.bcp-creator-container * {
    box-sizing: border-box;
}

/* 画面切り替え */
.bcp-screen {
    display: none !important;
}

.bcp-screen.active {
    display: block !important;
}

/* ボタン */
.bcp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.bcp-btn i {
    margin-right: 8px;
}

.bcp-btn-primary {
    background-color: #2563eb;
    color: white;
}

.bcp-btn-primary:hover {
    background-color: #1d4ed8;
}

.bcp-btn-secondary {
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.bcp-btn-secondary:hover {
    background-color: #f9fafb;
}

.bcp-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.bcp-btn-block {
    width: 100%;
}

.bcp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ヒーロセクション */
.bcp-hero {
    background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
    min-height: 100vh;
    padding: 20px;
}

.bcp-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bcp-header i {
    font-size: 24px;
    color: #2563eb;
    margin-right: 12px;
}

.bcp-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: #111827;
}

.bcp-hero-content {
    text-align: center;
    padding: 40px 20px;
}

.bcp-hero-title {
    font-size: 36px;
    font-weight: bold;
    color: #111827;
    margin-bottom: 20px;
}

.bcp-highlight {
    color: #2563eb;
}

.bcp-hero-description {
    font-size: 18px;
    color: #4b5563;
    max-width: 800px;
    margin: 0 auto 30px;
}

.bcp-disclaimer-link {
    margin-top: 16px;
}

.bcp-disclaimer-link a {
    color: #2563eb;
    text-decoration: underline;
    font-size: 14px;
}

/* 情報セクション */
.bcp-info-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bcp-info-section h3 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 32px;
    color: #111827;
}

.bcp-info-section h3 i {
    color: #2563eb;
    margin-right: 8px;
}

.bcp-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.bcp-info-item {
    text-align: center;
    padding: 24px;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.bcp-info-item:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bcp-info-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.bcp-info-icon i {
    font-size: 24px;
}

.bcp-info-icon-red {
    background-color: #fee2e2;
}

.bcp-info-icon-red i {
    color: #dc2626;
}

.bcp-info-icon-green {
    background-color: #dcfce7;
}

.bcp-info-icon-green i {
    color: #16a34a;
}

.bcp-info-icon-blue {
    background-color: #dbeafe;
}

.bcp-info-icon-blue i {
    color: #2563eb;
}

.bcp-info-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.bcp-info-item p {
    color: #6b7280;
    margin: 0;
}

/* 特徴 */
.bcp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.bcp-feature {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.bcp-feature:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bcp-feature i {
    font-size: 24px;
    color: #2563eb;
    margin-bottom: 12px;
}

.bcp-feature h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.bcp-feature p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* フォームコンテナ */
.bcp-form-container {
    min-height: 100vh;
    background-color: #f9fafb;
}

.bcp-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bcp-back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
}

.bcp-back-btn:hover {
    color: #111827;
}

.bcp-form-header h1 {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    color: #111827;
}

.bcp-step-indicator {
    font-size: 14px;
    color: #6b7280;
}

/* プログレスバー */
.bcp-progress {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.bcp-progress-bar {
    flex: 1;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 16px;
}

.bcp-progress-bar > div {
    height: 100%;
    background-color: #2563eb;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bcp-progress span {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

/* フォームコンテンツ */
.bcp-form-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
}

.bcp-form-title {
    margin-bottom: 32px;
}

.bcp-form-title h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #111827;
}

.bcp-form-title p {
    color: #6b7280;
    margin: 0;
}

/* フォーム */
.bcp-form {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bcp-form-group {
    margin-bottom: 24px;
}

.bcp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.bcp-form-group label i {
    color: #2563eb;
    margin-right: 8px;
}

.bcp-form-group input[type="text"],
.bcp-form-group input[type="email"],
.bcp-form-group input[type="tel"],
.bcp-form-group select,
.bcp-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bcp-form-group input:focus,
.bcp-form-group select:focus,
.bcp-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bcp-form-hint {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

/* タスク入力 */
.bcp-task-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bcp-task-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bcp-task-input span {
    width: 16px;
    color: #dc2626;
    font-weight: bold;
}

.bcp-task-input input {
    flex: 1;
}

.bcp-required {
    color: #dc2626;
}

/* チェックボックス・ラジオ */
.bcp-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.bcp-checkbox-item,
.bcp-radio-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.bcp-checkbox-item:hover,
.bcp-radio-item:hover {
    background-color: #f9fafb;
}

.bcp-checkbox-item input,
.bcp-radio-item input {
    margin-right: 12px;
    margin-top: 2px;
    width: 20px;
    height: 20px;
}

.bcp-radio-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bcp-radio-item div {
    flex: 1;
}

.bcp-radio-item strong {
    display: block;
    color: #111827;
    margin-bottom: 4px;
}

.bcp-radio-item span {
    font-size: 14px;
    color: #6b7280;
}

/* フォームアクション */
.bcp-form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* 生成中画面 */
.bcp-generating {
    min-height: 100vh;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.bcp-generating-content {
    max-width: 600px;
    width: 100%;
    background: white;
    padding: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.bcp-generating-icon {
    width: 96px;
    height: 96px;
    background-color: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
}

.bcp-generating-icon i {
    font-size: 40px;
    color: #2563eb;
}

.bcp-generating-content h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #111827;
}

.bcp-generating-content > p {
    color: #6b7280;
    margin-bottom: 32px;
}

.bcp-generating-progress {
    margin-bottom: 32px;
}

.bcp-generating-progress-bar {
    height: 12px;
    background-color: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bcp-generating-progress-bar > div {
    height: 100%;
    background-color: #2563eb;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.bcp-generating-time {
    font-size: 14px;
    color: #6b7280;
}

.bcp-generating-steps {
    text-align: left;
}

.bcp-generating-step {
    display: flex;
    align-items: center;
    padding: 12px 0;
    color: #9ca3af;
}

.bcp-generating-step.active {
    color: #374151;
}

.bcp-generating-step i {
    margin-right: 12px;
    width: 20px;
}

.bcp-generating-step.active i {
    color: #2563eb;
}

.bcp-status-message {
    margin-top: 24px;
}

/* 完了画面 */
.bcp-completion {
    min-height: 100vh;
    background-color: #f9fafb;
}

.bcp-completion-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bcp-completion-header i {
    font-size: 24px;
    color: #2563eb;
    margin-right: 12px;
}

.bcp-completion-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: #111827;
}

.bcp-completion-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.bcp-success-message {
    display: flex;
    align-items: center;
    padding: 24px;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    margin-bottom: 32px;
}

.bcp-success-message i {
    font-size: 32px;
    color: #16a34a;
    margin-right: 16px;
}

.bcp-success-message h2 {
    font-size: 20px;
    font-weight: bold;
    color: #14532d;
    margin: 0 0 8px;
}

.bcp-success-message p {
    color: #166534;
    margin: 0;
}

.bcp-completion-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .bcp-completion-grid {
        grid-template-columns: 1fr;
    }
}

.bcp-completion-sidebar {
    position: sticky;
    top: 32px;
    height: fit-content;
}

.bcp-actions-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bcp-actions-card h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #111827;
}

.bcp-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.bcp-info-card {
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.bcp-info-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}

.bcp-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bcp-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.bcp-info-row span:first-child {
    color: #6b7280;
}

.bcp-info-row span:last-child {
    font-weight: 500;
    color: #111827;
}

/* プレビューカード */
.bcp-preview-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bcp-preview-card h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
    color: #111827;
}

/* BCPプレビュー */
.bcp-preview-content {
    line-height: 1.8;
}

.bcp-preview-content h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #1f2937;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 0.5rem;
}

.bcp-preview-content h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #374151;
    border-left: 4px solid #2563eb;
    padding-left: 0.75rem;
}

.bcp-preview-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #4b5563;
}

.bcp-preview-content p {
    margin-bottom: 1rem;
    color: #374151;
}

.bcp-preview-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.bcp-preview-content ol {
    list-style-type: decimal;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.bcp-preview-content li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.bcp-preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.bcp-preview-content th {
    background-color: #f3f4f6;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid #d1d5db;
}

.bcp-preview-content td {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
}

.bcp-preview-placeholder {
    text-align: center;
    padding: 48px;
    color: #9ca3af;
}

.bcp-preview-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* モーダル */
.bcp-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.bcp-modal.hidden {
    display: none;
}

.bcp-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.bcp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background-color: #2563eb;
    color: white;
}

.bcp-modal-header h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
}

.bcp-modal-header h3 i {
    margin-right: 8px;
}

.bcp-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.bcp-modal-close:hover {
    opacity: 0.8;
}

.bcp-modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.bcp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* 免責事項 */
.bcp-disclaimer-content section {
    margin-bottom: 24px;
}

.bcp-disclaimer-content h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #111827;
}

.bcp-disclaimer-content p {
    color: #4b5563;
    line-height: 1.6;
}

.bcp-disclaimer-content ul {
    list-style-type: disc;
    margin-left: 24px;
    color: #4b5563;
}

.bcp-disclaimer-content li {
    margin-bottom: 8px;
}

.bcp-disclaimer-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.bcp-disclaimer-footer p {
    font-size: 14px;
    color: #6b7280;
}

/* ビューワー */
.bcp-viewer {
    min-height: 100vh;
    background-color: #f9fafb;
}

.bcp-viewer-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bcp-viewer-header i {
    font-size: 24px;
    color: #2563eb;
    margin-right: 12px;
}

.bcp-viewer-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: #111827;
}

.bcp-viewer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

.bcp-viewer-actions {
    margin-top: 32px;
    text-align: center;
}

/* ローディング */
.bcp-loading {
    text-align: center;
    padding: 48px;
    color: #6b7280;
}

.bcp-loading i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #2563eb;
}

/* エラー */
.bcp-error {
    text-align: center;
    padding: 48px;
    color: #dc2626;
    background-color: #fef2f2;
    border-radius: 12px;
}

/* アニメーション */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* チェックボックスラベル */
.bcp-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.bcp-checkbox-label input {
    margin-right: 8px;
}

/* レスポンシブ */
@media (max-width: 640px) {
    .bcp-hero-title {
        font-size: 28px;
    }

    .bcp-form {
        padding: 24px 16px;
    }

    .bcp-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .bcp-form-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .bcp-form-actions button {
        width: 100%;
    }
}

/* プリント用 */
@media print {
    .bcp-header,
    .bcp-btn,
    .bcp-form-actions,
    .bcp-completion-sidebar {
        display: none !important;
    }

    .bcp-screen {
        display: block !important;
    }

    .bcp-completion-grid {
        grid-template-columns: 1fr;
    }
}
