/* バナー生成プラグイン フロントエンドスタイル */

/* メインコンテナ */
.bmp-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0;
    background: #f5f7fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ヘッダー */
.bmp-header {
    text-align: left;
    background-color: #2d3748;
    color: white;
    padding: 0.75rem 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.bmp-title {
    font-size: 24px;
    margin: 0;
    font-weight: 700;
    color: white;
}

/* メッセージ表示エリア */
.bmp-message-container {
    padding: 0 20px;
}

/* パターン選択エリア */
.bmp-layout-selection {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 1.5rem;
    margin: 20px;
}

.bmp-layout-selection h3 {
    font-size: 16px;
    font-weight: bold;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* レイアウトボタングループ（横並び） */
.bmp-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* メインコンテンツエリア - 2カラム */
.bmp-main-content {
    margin: 20px;
    display: flex;
    gap: 20px;
}

/* 左カラム - バナープレビュー */
.bmp-left-column {
    flex: 1;
    min-width: 560px;
}

/* 右カラム - 設定パネル */
.bmp-right-column {
    flex: 1;
    min-width: 500px;
}

/* セクション共通スタイル */
.bmp-section {
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 1.5rem;
    background: #f8fafc;
}

.bmp-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* レイアウト選択ボタン */
.bmp-layout-button {
    width: 91px;
    height: 56px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.bmp-layout-button:hover {
    border-color: #4299e1;
}

.bmp-layout-button.selected {
    border: 3px solid #4299e1;
}

.bmp-layout-thumbnail {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* バナープレビューエリア */
.bmp-preview-container {
    width: 100%;
    height: 400px;
    margin-bottom: 1rem;
    background: #1a202c;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

/* ドラッグ可能要素 */
.bmp-draggable {
    position: absolute;
    cursor: move;
    padding: 10px;
    background-color: rgba(74, 85, 104, 0.8);
    border: 2px dashed #4299e1;
    border-radius: 2px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.bmp-draggable:hover {
    background-color: rgba(66, 153, 225, 0.5);
}

/* ドラッグ可能要素のサイズと位置 */
.bmp-logo {
    top: 20px;
    left: 20px;
    width: 100px;
    height: 40px;
}

.bmp-main-copy {
    top: 80px;
    left: 20px;
    width: 280px;
    height: 60px;
}

.bmp-sub-copy {
    top: 160px;
    left: 20px;
    width: 280px;
    height: 40px;
}

.bmp-image {
    top: 20px;
    right: 20px;
    width: 180px;
    height: 180px;
    background-color: #4299e1;
}

.bmp-date {
    bottom: 30px;
    left: 20px;
    width: 160px;
    height: 40px;
}

.bmp-cta {
    bottom: 30px;
    left: 200px;
    width: 200px;
    height: 40px;
    background-color: #ed8936;
    border-radius: 20px;
}

/* ドラッグヒント */
.bmp-drag-hint {
    text-align: center;
    font-style: italic;
    color: #718096;
    margin-top: 0.5rem;
    font-size: 14px;
}

/* フォームスタイル */
.bmp-form-group {
    margin-bottom: 1rem;
}

.bmp-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.bmp-text-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
}

.bmp-text-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* 画像選択 */
.bmp-image-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.bmp-image-preview {
    width: 100px;
    height: 60px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #f7fafc;
    background-size: cover;
    background-position: center;
}

.bmp-image-upload-button {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    color: #4a5568;
    cursor: pointer;
    font-size: 14px;
}

.bmp-image-upload-button:hover {
    background: #f7fafc;
}

/* タブ設定 */
.bmp-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.bmp-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bmp-tab.active {
    color: #4299e1;
    border-bottom: 2px solid #4299e1;
}

.bmp-tab:hover {
    color: #4299e1;
}

.bmp-tab-pane {
    display: none;
}

.bmp-tab-pane.active {
    display: block;
}

/* チェックボックスとラジオボタン */
.bmp-style-grid {
    display: flex;
    gap: 2rem;
}

.bmp-style-column {
    flex: 1;
}

.bmp-checkbox-wrapper,
.bmp-radio-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.bmp-checkbox,
.bmp-radio {
    margin-right: 0.5rem;
}

.bmp-checkbox-label,
.bmp-radio-label {
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
}

/* カラーピッカー */
.bmp-color-settings {
    margin-bottom: 1rem;
}

.bmp-color-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.bmp-color-label {
    width: 120px;
    font-size: 14px;
    color: #4a5568;
}

.bmp-color-picker {
    position: relative;
    display: flex;
    align-items: center;
}

.bmp-color-preview {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-right: 0.5rem;
}

input[type="color"] {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 12px;
    padding: 0;
    background: none;
    cursor: pointer;
}

/* アクションボタン */
.bmp-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.bmp-action-row {
    margin-bottom: 0.75rem;
}

.bmp-action-row:last-child {
    margin-bottom: 0;
}

.bmp-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
}

.bmp-button-primary {
    background: #4299e1;
    color: white;
}

.bmp-button-primary:hover {
    background: #3182ce;
}

.bmp-button-success {
    background: #48bb78;
    color: white;
}

.bmp-button-success:hover {
    background: #38a169;
}

.bmp-button-secondary {
    background: #a0aec0;
    color: white;
}

.bmp-button-secondary:hover {
    background: #718096;
}

/* プロンプト生成エリア */
.bmp-prompt-section {
    margin-bottom: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 1.5rem;
}

.bmp-prompt-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
    background-color: #f7fafc;
    resize: vertical;
    margin-bottom: 1rem;
}

.bmp-prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* エラーと成功メッセージ */
.bmp-message {
    padding: 0.75rem 1.25rem;
    margin: 1rem 0;
    border-radius: 4px;
    display: none;
}

.bmp-error-message {
    color: #c53030;
    background-color: #fed7d7;
    border: 1px solid #feb2b2;
}

.bmp-success-message {
    color: #2f855a;
    background-color: #c6f6d5;
    border: 1px solid #9ae6b4;
}

/* レスポンシブデザイン */
@media (max-width: 1200px) {
    .bmp-main-content {
        flex-direction: column;
    }
    
    .bmp-left-column,
    .bmp-right-column {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .bmp-container {
        margin: 1rem;
    }
    
    .bmp-layout-selection,
    .bmp-section,
    .bmp-prompt-section {
        padding: 1rem;
    }
    
    .bmp-style-grid {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .bmp-actions {
        flex-direction: column;
    }
    
    .bmp-button {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .bmp-layout-selection h3 {
        text-align: center;
    }
    
    .bmp-button-group {
        justify-content: center;
    }
    
    .bmp-color-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bmp-color-label {
        margin-bottom: 0.5rem;
    }
    
    .bmp-tabs {
        flex-direction: column;
    }
    
    .bmp-tab {
        text-align: center;
    }
}