/**
 * LINE Friend Banner スタイルシート
 *
 * @package LINE_Friend_Banner
 * @since 1.0.0
 */

/* 基本スタイル */
.line-friend-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  transition: transform 0.3s ease;
}

.line-friend-banner:hover {
  transform: scale(1.05);
}

.line-friend-banner a,
.line-friend-banner__link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* メッセージなしの場合はblockに戻す */
.line-friend-banner:not(.line-friend-banner--with-message) a {
  display: block;
}

.line-friend-banner img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  background-color: transparent;
}

/* デフォルトテキストリンクのスタイル */
.line-friend-banner__text {
  display: inline-block;
  padding: 12px 20px;
  background-color: #06c755;
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.line-friend-banner a:hover .line-friend-banner__text {
  background-color: #05b34a;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .line-friend-banner {
    bottom: 10px;
    right: 10px;
  }

  .line-friend-banner__text {
    padding: 10px 16px;
    font-size: 12px;
  }
}

/* 表示位置バリエーション */
.line-friend-banner--bottom-right {
  bottom: 20px;
  right: 20px;
  left: auto;
}

.line-friend-banner--bottom-left {
  bottom: 20px;
  left: 20px;
  right: auto;
}

/* モバイル非表示用 */
@media (max-width: 768px) {
  .line-friend-banner--hide-mobile {
    display: none;
  }

  .line-friend-banner--bottom-right {
    bottom: 10px;
    right: 10px;
  }

  .line-friend-banner--bottom-left {
    bottom: 10px;
    left: 10px;
  }
}

/* 閉じるボタン基本スタイル */
.line-friend-banner__close {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background-color: #333333;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.line-friend-banner__close:hover {
  background-color: #e53935;
  border-color: #e53935;
  transform: scale(1.1);
}

.line-friend-banner__close:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.4);
}

/* 閉じるボタン位置バリエーション */
.line-friend-banner__close--top-right {
  top: -8px;
  right: -8px;
}

.line-friend-banner__close--top-left {
  top: -8px;
  left: -8px;
}

.line-friend-banner__close--bottom-right {
  bottom: -8px;
  right: -8px;
}

.line-friend-banner__close--bottom-left {
  bottom: -8px;
  left: -8px;
}

/* モバイル時の閉じるボタン調整 */
@media (max-width: 768px) {
  .line-friend-banner__close {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }

  .line-friend-banner__close--top-right {
    top: -7px;
    right: -7px;
  }

  .line-friend-banner__close--top-left {
    top: -7px;
    left: -7px;
  }

  .line-friend-banner__close--bottom-right {
    bottom: -7px;
    right: -7px;
  }

  .line-friend-banner__close--bottom-left {
    bottom: -7px;
    left: -7px;
  }
}

/* ラッパー要素（閉じるボタン配置用） */
.line-friend-banner__image-wrap,
.line-friend-banner__message-wrap {
  position: relative;
  display: inline-block;
}

/* メッセージスタイル */
.line-friend-banner__message {
  display: block;
  padding: 8px 12px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  white-space: pre-line;
  font-weight: 500;
  line-height: 1;
}

/* メッセージ付きバナーのレイアウト */
.line-friend-banner--with-message {
  display: flex;
  align-items: center;
}

/* モバイル時のメッセージ調整 */
@media (max-width: 768px) {
  .line-friend-banner__message {
    padding: 6px 10px;
    font-size: 12px !important;
  }

  .line-friend-banner--with-message .line-friend-banner__link {
    gap: 6px;
  }
}
