@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
// [alert title="タイトル"]本文[/alert]
add_shortcode('alert', function($atts, $content = null) {
  $atts = shortcode_atts([
    'title' => '',
  ], $atts, 'alert');

  $title = $atts['title'] ? esc_html($atts['title']) : '';
  $content = do_shortcode($content);
  $content = wp_kses_post($content);

  ob_start(); ?>
  <div class="my-alert-box">
    <?php if ($title): ?>
      <div class="my-alert-title"><?php echo $title; ?></div>
    <?php endif; ?>
    <div class="my-alert-body"><?php echo $content; ?></div>
  </div>
  <?php
  return ob_get_clean();
});
