/**
 * EN Pochi Link Plugin Styles
 */

/* 商品リンクボックスの基本スタイル */
.en-pochi-link-box {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* レイアウト設定 */
.en-pochi-link-box.layout-horizontal .en-pochi-link-info {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.en-pochi-link-box.layout-horizontal .en-pochi-link-thumb {
  flex-shrink: 0;
  width: 150px;
}

.en-pochi-link-box.layout-horizontal .en-pochi-link-content {
  flex: 1;
  min-width: 0;
}

.en-pochi-link-box.layout-vertical .en-pochi-link-info {
  display: block;
  margin-bottom: 15px;
}

.en-pochi-link-box.layout-vertical .en-pochi-link-thumb {
  width: 100%;
  max-width: 280px;
  margin: 0 auto 15px auto;
  text-align: center;
}

.en-pochi-link-box.layout-vertical .en-pochi-link-content {
  width: 100%;
}

.en-pochi-link-box * {
  box-sizing: border-box;
}

/* 商品画像 */
.en-pochi-link-thumb img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.en-pochi-link-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  line-height: 1.4;
  color: #333;
}

.en-pochi-link-title a {
  color: #333;
  text-decoration: none;
}

.en-pochi-link-title a:hover {
  text-decoration: underline;
}

.en-pochi-link-price {
  font-size: 18px;
  font-weight: bold;
  color: #d32f2f;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
}

.en-pochi-link-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 8px 0;
}

/* ボタンエリア */
.en-pochi-link-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.en-pochi-link-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.en-pochi-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Amazon ボタン */
.en-pochi-link-btn.amazon {
  background: #ff9900;
  color: white;
}

.en-pochi-link-btn.amazon:hover {
  background: #e68900;
}

/* 楽天 ボタン */
.en-pochi-link-btn.rakuten {
  background: #bf0000;
  color: white;
}

.en-pochi-link-btn.rakuten:hover {
  background: #a60000;
}

/* Yahoo! ボタン */
.en-pochi-link-btn.yahoo {
  background: #ff0033;
  color: white;
}

.en-pochi-link-btn.yahoo:hover {
  background: #e6002e;
}

/* メルカリ ボタン */
.en-pochi-link-btn.mercari {
  background: #ff5722;
  color: white;
}

.en-pochi-link-btn.mercari:hover {
  background: #e64a19;
}

/* もしもアフィリエイト ボタン */
.en-pochi-link-btn.moshimo {
  background: #00bcd4;
  color: white;
}

.en-pochi-link-btn.moshimo:hover {
  background: #00acc1;
}

/* レスポンシブ対応 */
/* タブレット対応 */
@media (max-width: 1024px) and (min-width: 769px) {
  .en-pochi-link-box.layout-horizontal .en-pochi-link-thumb {
    width: 180px;
  }
  
  .en-pochi-link-box.layout-vertical .en-pochi-link-thumb {
    max-width: 220px;
  }
}

@media (max-width: 768px) {
  .en-pochi-link-box.layout-horizontal .en-pochi-link-info {
    flex-direction: column;
    gap: 10px;
  }
  
  .en-pochi-link-box.layout-horizontal .en-pochi-link-thumb {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .en-pochi-link-buttons {
    flex-direction: column;
  }
  
  .en-pochi-link-btn {
    flex: none;
    width: 100%;
  }
}

/* 管理画面用スタイル */
.en-pochi-link-admin-wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.en-pochi-link-admin-tabs {
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.en-pochi-link-admin-tabs .nav-tab {
  border: 1px solid #ddd;
  border-bottom: none;
  background: #f9f9f9;
  margin-right: 5px;
}

.en-pochi-link-admin-tabs .nav-tab-active {
  background: #fff;
  border-bottom: 1px solid #fff;
}

.en-pochi-link-admin-content {
  background: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
}

.en-pochi-link-form-table {
  width: 100%;
  border-collapse: collapse;
}

.en-pochi-link-form-table th,
.en-pochi-link-form-table td {
  padding: 15px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.en-pochi-link-form-table th {
  width: 200px;
  font-weight: bold;
  text-align: left;
}

.en-pochi-link-form-table input[type="text"],
.en-pochi-link-form-table input[type="url"],
.en-pochi-link-form-table textarea {
  width: 100%;
  max-width: 400px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.en-pochi-link-form-table textarea {
  height: 100px;
  resize: vertical;
}

/* 商品検索フォーム */
.en-pochi-link-search-form {
  margin-bottom: 20px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 4px;
}

.en-pochi-link-search-form input[type="text"] {
  width: 300px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.en-pochi-link-search-form button {
  padding: 8px 16px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 10px;
}

.en-pochi-link-search-form button:hover {
  background: #005a87;
}

/* 商品検索結果 */
.en-pochi-link-search-results {
  margin-top: 20px;
}

.en-pochi-link-search-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  background: #fff;
}

.en-pochi-link-search-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.en-pochi-link-search-item-content {
  flex: 1;
}

.en-pochi-link-search-item-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.en-pochi-link-search-item-price {
  color: #d32f2f;
  font-weight: bold;
  margin-bottom: 5px;
}

.en-pochi-link-search-item-select {
  padding: 5px 10px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.en-pochi-link-search-item-select:hover {
  background: #005a87;
}

/* ローディング */
.en-pochi-link-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: en-pochi-link-spin 1s linear infinite;
}

@keyframes en-pochi-link-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* エラーメッセージ */
.en-pochi-link-error {
  color: #d32f2f;
  background: #ffebee;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
}

/* 成功メッセージ */
.en-pochi-link-success {
  color: #2e7d32;
  background: #e8f5e8;
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
}