/* Enyoi Store Info プラグイン - エディタ用スタイル */

/* エディタ内でのブロックコンテナ */
.wp-block-enyoi-store-info-store-info {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* フロントエンドと統一したプレビュー表示 */
.enyoi-store-info {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%; /* エディタ内では100%に制限 */
    box-sizing: border-box;
    overflow: hidden;
}

.enyoi-store-info.enyoi-store-info--compact {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #f1f5f9;
    padding-top: .5rem;
}

.enyoi-store-info__content {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 0 2rem 2rem 2rem;
    max-width: 100%;
    box-sizing: border-box;
}

.enyoi-store-info__details {
    flex: 1;
    min-width: 250px; /* エディタ内では少し狭めに */
    max-width: 100%;
    box-sizing: border-box;
}

.enyoi-store-info__item {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.enyoi-store-info__label {
    font-weight: 600;
    color: #555555;
    min-width: 100px;
    margin-right: 12px;
    font-size: 14px;
}

.enyoi-store-info__value {
    flex: 1;
    color: #333333;
    line-height: 1.5;
    font-size: 14px;
}

.enyoi-store-info__value a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.enyoi-store-info__value a:hover {
    color: #005177;
    text-decoration: underline;
}

.enyoi-store-info__map {
    flex: 1;
    min-width: 250px; /* エディタ内では少し狭めに */
    max-width: 100%; /* エディタ内では制限 */
    width: 100%;
    min-height: 300px; /* エディタ内では少し低めに */
    box-sizing: border-box;
}

.enyoi-store-info__map iframe {
    width: 100% !important;
    max-width: 100%;
    height: 300px; /* エディタ内では少し低めに */
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 0;
    box-sizing: border-box;
}

/* デバイス別電話番号表示制御 */
.enyoi-store-info__phone-mobile {
    display: none;
}

.enyoi-store-info__phone-desktop {
    display: inline;
}

/* タブレット・スマートフォン: モバイル版を表示、デスクトップ版を非表示 */
@media (max-width: 1024px) {
    .enyoi-store-info__phone-mobile {
        display: inline;
    }

    .enyoi-store-info__phone-desktop {
        display: none;
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .enyoi-store-info {
        padding: 16px;
        margin: 16px 0;
        max-width: 100%;
    }

    .enyoi-store-info__content {
        flex-direction: column;
        gap: 16px;
        padding: 0 1rem 1rem 1rem; /* エディタ内ではパディングを調整 */
    }

    .enyoi-store-info__item {
        flex-direction: column;
        margin-bottom: 16px;
    }

    .enyoi-store-info__label {
        margin-right: 0;
        margin-bottom: 4px;
        min-width: auto;
    }

    .enyoi-store-info__title {
        font-size: 20px;
    }

    .enyoi-store-info__map {
        min-width: 100%;
        max-width: 100%;
        min-height: 250px; /* モバイルではさらに低く */
    }

    .enyoi-store-info__map iframe {
        height: 250px; /* モバイルではさらに低く */
    }
}

/* 美容院テーマに合わせたカラーバリエーション */
.enyoi-store-info.theme-elegant {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
}

.enyoi-store-info.theme-elegant .enyoi-store-info__title {
    color: #495057;
    border-bottom-color: #dee2e6;
}

.enyoi-store-info.theme-elegant .enyoi-store-info__label {
    color: #6c757d;
}

.enyoi-store-info.theme-elegant .enyoi-store-info__value a {
    color: #007bff;
}

.enyoi-store-info.theme-elegant .enyoi-store-info__value a:hover {
    color: #0056b3;
}

/* エディタ専用スタイル */

/* エディタ専用スタイル */

/* ブロックラッパー */
.wp-block-enyoi-store-info-store-info {
    margin: 16px 0;
    max-width: 100%;
    overflow: hidden;
}

/* ブロックエディタでのプレビューは通常のスタイルを使用 */
.wp-block-enyoi-store-info-store-info .enyoi-store-info {
    margin: 0;
    max-width: 100%;
}

/* エディタ内でのコンテナ調整 */
.editor-styles-wrapper .wp-block-enyoi-store-info-store-info {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.editor-styles-wrapper .enyoi-store-info {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* サイドバーコントロール用スタイル */
.enyoi-store-info-editor {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.enyoi-store-info-editor__title {
    margin-bottom: 20px;
}

.enyoi-store-info-editor__title input {
    width: 100%;
    font-size: 20px;
    font-weight: 600;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #ffffff;
}

.enyoi-store-info-editor__fields {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.enyoi-store-info-editor__field {
    display: flex;
    flex-direction: column;
}

.enyoi-store-info-editor__field label {
    font-weight: 600;
    color: #555555;
    margin-bottom: 6px;
    font-size: 14px;
}

.enyoi-store-info-editor__field input,
.enyoi-store-info-editor__field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.enyoi-store-info-editor__field input:focus,
.enyoi-store-info-editor__field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.enyoi-store-info-editor__field textarea {
    min-height: 60px;
    resize: vertical;
}

.enyoi-store-info-editor__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.enyoi-store-info-editor__toggle input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.enyoi-store-info-editor__toggle label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* WordPress コンポーネントのスタイル調整 */
.components-panel__body.is-opened .enyoi-store-info-editor {
    padding: 16px;
}

.components-base-control .components-base-control__field {
    margin-bottom: 0;
}

.components-text-control__input,
.components-textarea-control__input {
    width: 100%;
}