@charset "utf-8";

/**
 * Atoms: アイコンコンポーネント
 * SVGアイコン、Font Awesome、装飾アイコンの統一スタイル
 */

/* === Base Icon === */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* === Icon Sizes === */
.icon--xs {
  width: 12px;
  height: 12px;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--md {
  width: 20px;
  height: 20px;
}

.icon--lg {
  width: 24px;
  height: 24px;
}

.icon--xl {
  width: 32px;
  height: 32px;
}

.icon--2xl {
  width: 48px;
  height: 48px;
}

/* === SVG Icons === */
.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* === Icon Colors === */
.icon--primary {
  color: var(--col_primary);
}

.icon--white {
  color: var(--col_white);
}

.icon--gray {
  color: var(--col_gray_medium);
}

.icon--success {
  color: var(--col_success);
}

.icon--warning {
  color: var(--col_warning);
}

.icon--danger {
  color: var(--col_danger);
}

/* === Icon with Background === */
.icon-bg {
  border-radius: var(--radius_md);
  padding: var(--space_sm);
}

.icon-bg--primary {
  background: var(--col_primary);
  color: var(--col_white);
}

.icon-bg--secondary {
  background: var(--bg_gray);
  color: var(--col_gray_medium);
}

.icon-bg--rounded {
  border-radius: var(--radius_full);
}

/* === Animated Icons === */
.icon--spin {
  animation: spin 1s linear infinite;
}

.icon--pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.icon--bounce {
  animation: bounce 1s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* === Chevron Icons === */
.icon-chevron {
  transition: transform 0.3s ease;
}

.icon-chevron--up {
  transform: rotate(180deg);
}

.icon-chevron--down {
  transform: rotate(0deg);
}

.icon-chevron--left {
  transform: rotate(90deg);
}

.icon-chevron--right {
  transform: rotate(-90deg);
}

/* === Social Icons === */
.icon-social {
  width: 40px;
  height: 40px;
  border-radius: var(--radius_full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--col_white);
  text-decoration: none;
  transition: all 0.3s ease;
}

.icon-social:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow_md);
}

.icon-social--twitter {
  background: #1da1f2;
}

.icon-social--facebook {
  background: #4267b2;
}

.icon-social--linkedin {
  background: #0077b5;
}

.icon-social--youtube {
  background: #ff0000;
}

.icon-social--instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* === Status Icons === */
.icon-status {
  width: 16px;
  height: 16px;
  border-radius: var(--radius_full);
  position: relative;
}

.icon-status::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius_full);
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.icon-status--online {
  background: var(--col_success);
}

.icon-status--online::before {
  background: var(--col_success);
}

.icon-status--offline {
  background: var(--col_gray_medium);
}

.icon-status--busy {
  background: var(--col_danger);
}

.icon-status--busy::before {
  background: var(--col_danger);
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* === Icon Lists === */
.icon-list {
  list-style: none;
  padding: 0;
}

.icon-list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space_md);
  margin-bottom: var(--space_lg);
}

.icon-list-item:last-child {
  margin-bottom: 0;
}

.icon-list-item .icon {
  margin-top: 2px;
  color: var(--col_primary);
}

/* === Decorative Icons === */
.icon-decoration {
  position: absolute;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.icon-decoration--top-right {
  top: 10%;
  right: 10%;
}

.icon-decoration--bottom-left {
  bottom: 10%;
  left: 10%;
}

/* === Font Awesome Compatibility === */
.fa, .fas, .far, .fal, .fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
}