/*
Theme Name: Lalivel
Theme URI:
Author: Naoto Yoshida from NY CodeWorks
Author URI:
Description: A original theme for Lalivel
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lalivel
*/

/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/
/* Reset & Base Styles */

/* Colors */
:root {
  /* Primary Colors */
  --color-primary: #e1d6c4;
  --color-primary-dark: #dfccae;

  /* Background Colors */
  --color-bg-primary: var(--color-primary);
  --color-bg-body: #fbf9f6;

  /* Text Colors */
  --color-text-white: #ffffff;

  /* Brand Colors */
  --color-line: #06c755;
  --color-amazon: #f4a433;
  --color-rakuten: #dc143c;
  --color-kindle: #52a7e8;

  /* Functional Colors */
  --color-border: var(--color-primary-dark);
  --color-button-active: var(--color-primary-dark);

  /* Affiliate Button Colors */
  --color-button-amazon: var(--color-amazon);
  --color-button-rakuten: var(--color-rakuten);
  --color-button-kindle: var(--color-kindle);
}

/* Base Styles */
html {
  margin-top: 0 !important;
}

body {
  background-color: var(--color-bg-body);
}

/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/
/* Header */
.l-header {
  background-color: var(--color-bg-primary);
  opacity: 0;
  transform: translateY(-100%);
  animation: slideInHeader 1s ease-out forwards;
  animation-delay: 1s;
  transition: all 0.3s ease-in-out;
}

.l-header.absolute {
  background: transparent;
}

.l-header.fixed {
  transform: translateY(0);
}

/* Adjust the logo position to be centered */
.l-header .container {
  position: relative;
}

/* Section */
/* .l-ranking {
  background-color: var(--color-bg-primary);
} */

/* Footer */
.l-footer {
  background-color: var(--color-bg-primary);
}

/*--------------------------------------------------------------
# Components
--------------------------------------------------------------*/
/* Buttons */
.c-button {
  border: 1px solid var(--color-border);
}

.c-button--active {
  background-color: var(--color-button-active);
}

/* Genre Buttons & Tags */
.c-genre {
  border: 1px solid var(--color-primary-dark);
  background-color: #fff;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.c-genre--active {
  border: 1px solid #ffffff;
  background-color: var(--color-primary-dark);
  color: var(--color-text-white);
  opacity: 1;
}

.c-genre:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-text-white);
  border: 1px solid #ffffff;
  opacity: 1;
}

/* Select Box */
select {
  border-color: var(--color-primary-dark);
  min-width: 160px;
}

select:focus {
  ring-color: var(--color-primary-dark);
}

/* Affiliate Buttons */
.c-button--amazon {
  background-color: var(--color-button-amazon);
  color: #ffffff;
}

.c-button--rakuten {
  background-color: var(--color-button-rakuten);
  color: #ffffff;
}

.c-button--kindle {
  background-color: var(--color-button-kindle);
  color: #ffffff;
}

/* Forms */
.form {
  max-width: 100%;
  border: 2px solid var(--color-primary-dark);
  border-radius: 0.75rem;
}

.form br {
  display: none !important;
}

.form label span {
  margin-left: 1rem;
  background-color: #ff0000;
}

.mw_wp_form input[type="text"],
.mw_wp_form input[type="email"],
.mw_wp_form textarea {
  border-color: var(--color-primary-dark);
}

.formBack,
.formSubmit,
.mw_wp_form button[type="submit"] {
  border: 1px solid var(--color-primary-dark);
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Images */
.header-logo {
  height: 30px;
  width: auto;
}

@media (min-width: 768px) {
  .header-logo {
    height: 60px;
    width: auto;
  }
}

.c-icon-crown,
.c-icon-book,
.c-icon-mail {
  width: 40px;
  height: 40px;
}

.c-icon-ranking {
  max-width: 40px;
  width: 100%;
  max-height: 40px;
  height: 100%;
}

@media (max-width: 767px) {
  .c-icon-crown,
  .c-icon-book,
  .c-icon-mail {
    width: 22px;
    height: 22px;
  }
}

/*--------------------------------------------------------------
# Plugins
--------------------------------------------------------------*/
/* Swiper Navigation Styles */
.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 12px;
}

/* Swiper touch behavior fixes */
.swiper {
  touch-action: pan-y;
  -webkit-overflow-scrolling: auto;
}

.swiper-wrapper {
  will-change: transform;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.swiper-slide {
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

@media (max-width: 767px) {
  /* Additional mobile-specific fixes */
  .swiper {
    overflow: hidden;
    position: relative;
  }
}

/* Like Button Styles */
.like-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-primary-dark);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.like-button:hover {
  background-color: rgba(var(--color-primary-dark-rgb), 0.1);
}

.like-button svg {
  transition: all 0.3s ease;
}

.like-button.liked {
  background-color: var(--color-primary-dark);
  color: white;
}

.like-button.liked svg {
  fill: currentColor;
}

/* Header Animation */
@keyframes slideInHeader {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Recaptcha */
.grecaptcha-badge {
  z-index: 99999;
}

/* リッチエディタコンテンツのスタイル */
.rich-content {
  /* デフォルトのスタイル */
  font-size: 1rem;
  line-height: 1.75;
}

.rich-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.rich-content h2 {
  font-size: 2rem;
  margin-bottom: 0.875rem;
  font-weight: bold;
}

.rich-content h3 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: bold;
}

.rich-content h4 {
  font-size: 1.5rem;
  margin-bottom: 0.625rem;
  font-weight: bold;
}

.rich-content h5 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.rich-content h6 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
  font-weight: bold;
}

.rich-content p {
  margin-bottom: 1rem;
}

.rich-content ul,
.rich-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.rich-content ul {
  list-style-type: disc;
}

.rich-content ol {
  list-style-type: decimal;
}

.rich-content li {
  margin-bottom: 0.5rem;
}

.rich-content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.rich-content a:hover {
  color: var(--color-primary-dark);
}

/* レスポンシブ対応 */
@media (min-width: 768px) {
  .rich-content {
    font-size: 1.125rem;
  }

  .rich-content h1 {
    font-size: 3rem;
  }

  .rich-content h2 {
    font-size: 2.5rem;
  }

  .rich-content h3 {
    font-size: 2rem;
  }

  .rich-content h4 {
    font-size: 1.75rem;
  }

  .rich-content h5 {
    font-size: 1.5rem;
  }

  .rich-content h6 {
    font-size: 1.25rem;
  }
}

/* ランキングアイコン */
.ranking-slider .absolute img,
.monthly-slider .absolute img,
.l-ranking .absolute img,
.l-monthly-ranking .absolute img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  box-shadow: none;
  aspect-ratio: auto;
  border-radius: 0;
}

.ranking-slider .absolute img:hover,
.monthly-slider .absolute img:hover,
.l-ranking .absolute img:hover,
.l-monthly-ranking .absolute img:hover {
  box-shadow: none;
}
