/* catalog/view/theme/default/stylesheet/social_login.css */

.social-login-buttons {
  margin: 20px 0;
}
.social-login-buttons .buttons.clearfix {
  display: flex;
  flex-direction: column;
  gap: 10px; /* Добавляем отступ между кнопками */
}

.yandex-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 44px;
  padding: 0 16px;
  /* Используем CSS-переменную для радиуса. 8px - значение по умолчанию */
  border-radius: var(--sl-yandex-radius, 8px);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  transition: filter 0.2s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
  width: 100%;
}

.yandex-login-button:hover {
  filter: brightness(0.95);
}
.yandex-login-button:active {
  filter: brightness(0.9);
  transform: translateY(1px);
}

.yandex-login-button__icon {
  display: flex;
  align-items: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
}

.yandex-login-button__icon svg {
  width: 100%;
  height: 100%;
}

.yandex-login-button__text {
  position: relative;
  top: 1px; /* Небольшая коррекция для вертикального выравнивания текста */
  margin-left: 8px;
  font-family: Arial,
  sans-serif;
  font-weight: 500;
}

/* === Цветовые схемы кнопки Yandex === */
.yandex-login-button--yellow {
  background-color: #FFDE00;
  color: #000000;
}
/* 2. Светлая схема (Переработана) */
.yandex-login-button--light {
  background-color: #f5f5f5; /* Вместо чисто белого - мягкий светло-серый */
  color: #212121; /* Вместо чисто черного - очень темный серый для текста */
  border: 1px solid #e0e0e0; /* Более мягкая рамка */
}
.yandex-login-button--light:hover {
   background-color: #ebebeb; /* Плавное затемнение фона при наведении */
   border-color: #d1d1d1;   /* Рамка становится чуть заметнее */
   filter: none; /* Отключаем общий filter, чтобы использовать свои цвета */
}

/* 3. Темная схема (Переработана) */
.yandex-login-button--dark {
  background-color: #2c2c2c; /* Вместо чисто черного - глубокий темно-серый */
  color: #f0f0f0; /* Вместо чисто белого - мягкий светло-серый для текста */
  border: 1px solid #444;   /* Слегка заметная рамка для выделения */
}
.yandex-login-button--dark:hover {
   background-color: #3a3a3a; /* Плавное осветление фона при наведении */
   border-color: #555;      /* Рамка становится чуть светлее */
   filter: none; /* Отключаем общий filter, чтобы использовать свои цвета */
}
.yandex-login-button__icon {
  display: flex;
  align-items: center;
  /* [ИЗМЕНЕНО] Убираем фиксированный размер отсюда */
  margin-right: 12px;
}

.yandex-login-button__icon svg {
  width: 100%;
  height: 100%;
}


/* === Стили для кнопки Сбер ID (Sber) === */
.sber-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: -apple-system, system-ui, sans-serif;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    width: 100%;
}

.sber-login-button:hover {
    filter: brightness(0.95);
}

.sber-login-button svg {
    /* Базовый отступ от текста */
    margin-right: 12px;
    /* Размер иконки теперь задается классами ниже */
}

/* Размеры кнопок (только геометрия, которая не зависит от цвета) */
.sber-login-button--size-s {
    /* Высота и размер шрифта задаются инлайн-стилем из PHP */
    padding: 0 16px;
    border-radius: 6px;
}

.sber-login-button--size-m {
    /* Высота и размер шрифта задаются инлайн-стилем из PHP */
    padding: 0 20px;
    border-radius: 8px;
}

.sber-login-button--size-l {
    /* Высота и размер шрифта задаются инлайн-стилем из PHP */
    padding: 0 24px; 
    border-radius: 12px;
}

/* [ИСПРАВЛЕНО] Размеры ИКОНКИ в зависимости от размера кнопки */
.sber-login-button--size-s svg {
    width: 16px;
    height: 16px;
}

.sber-login-button--size-m svg {
    width: 22px;
    height: 22px;
}

.sber-login-button--size-l svg {
    width: 26px;
    height: 26px;
}

/* [Google] Начало: Полностью переработанные и исправленные стили */
.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Это центрирует группу (иконка + текст) */
  box-sizing: border-box;
  text-decoration: none !important;
  font-family: 'Roboto', sans-serif; /* Рекомендованный Google шрифт */
  font-weight: 500;
  transition: background-color .2s, box-shadow .2s;
  cursor: pointer;
  width: 100%;
  border-radius: 8px; /* [ИЗМЕНЕНИЕ] Устанавливаем новый стандартный радиус */
}

/* Контейнер для иконки */
.google-login-button__icon {
  margin-right: 12px; /* Отступ между иконкой и текстом */
  line-height: 0; /* Убирает лишнюю высоту у контейнера SVG */
}

.google-login-button__icon svg {
  width: 20px;
  height: 20px;
}

/* Текст (теперь без лишних правил) */
.google-login-button__text {
  line-height: 1;
}

/* --- Темы --- */
/* Светлая тема (стандартная) */
.google-login-button--light {
  background-color: #fff;
  color: #3C4043 !important;
  border: 1px solid #dadce0;
}
.google-login-button--light.google-login-button--with-shadow {
  box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}
.google-login-button--light:hover {
  border-color: #cacdd1;
  background-color: #f8f9fa;
}
.google-login-button--light:hover.google-login-button--with-shadow {
   box-shadow: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 6px 3px rgba(60,64,67,.15);
}

/* [ИЗМЕНЕНИЕ] Темная тема с официальными цветами Google */
.google-login-button--dark {
  background-color: #1a73e8;
  color: #fff !important;
  border: 1px solid transparent;
}
.google-login-button--dark:hover {
  background-color: #287ae6;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}
.google-login-button--dark:active {
  background-color: #5595e8;
}

/* --- Размеры --- */
.google-login-button--size-s {
  height: 32px;
  font-size: 13px;
}
.google-login-button--size-m {
  height: 40px; /* Стандартный размер Google */
  font-size: 14px;
}
.google-login-button--size-l {
  height: 48px;
  font-size: 16px;
}
/* [Google] Конец */

/*
 * Финальные стили для виджета Telegram.
 * Задача: идеально отцентрировать iframe с кнопкой фиксированной ширины.
*/
.telegram-login-container {
  width: 100%;             /* 1. Контейнер занимает всю ширину */
  display: flex;           /* 2. Включаем режим Flexbox */
  justify-content: center; /* 3. Центрируем дочерний элемент (iframe) по горизонтали */
}

/* Стили для кнопки Facebook с поддержкой уведомления */
.facebook-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  background-color: #1877F2;
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  transition: background-color 0.2s ease-in-out;
  cursor: pointer;
  border: none;
}
.facebook-login-button:hover {
  background-color: #166fe5;
}
.facebook-login-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M22,12c0-5.52-4.48-10-10-10S2,6.48,2,12c0,4.84,3.44,8.87,8,9.8V15H8v-3h2V9.5C10,7.57,11.57,6,13.5,6H16v3h-1.5 c-0.83,0-1,0.47-1,1v2h2.5l-0.5,3H13v6.95C18.05,21.45,22,17.19,22,12z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.facebook-disclaimer {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 2px;
}

/* Стили для интеграции с модальными окнами Unishop2 v2 */
#popup_register, 
.modal-login .modal-body {
    display: flex;
    flex-direction: column;
}
#popup_register .popup_register,
.modal-login .modal-login__form {
    order: 1;
}
.social-login-wrapper-unishop {
    order: 2; 
    margin-top: 15px;
    margin-bottom: 15px;
}
#popup_register .modal-register__btn,
.modal-login .modal-login__btn {
    order: 3;
}
#popup_register .modal-register__links,
.modal-login .modal-login__links {
    order: 4;
}

/* === Стили для кнопки GitHub === */
.github-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 44px; /* Стандартная высота */
  padding: 0 16px;
  background-color: #333333; /* Фирменный цвет GitHub */
  color: #ffffff !important; /* !important для перекрытия общих стилей ссылок */
  border-radius: 8px;
  text-decoration: none !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  transition: background-color 0.2s ease-in-out;
  cursor: pointer;
  border: none;
}

.github-login-button:hover {
  background-color: #444444; /* Чуть светлее при наведении */
  color: #ffffff;
}

.github-login-button .fa-github {
  margin-right: 12px;
  font-size: 1.4em;
}

/* [НАЧАЛО ИЗМЕНЕНИЙ] Новые стили для формата "Только иконки" */

/* Контейнер для иконок в ряд */
.social-buttons--icons .buttons.clearfix {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px; /* Отступ между иконками */
}

/* Общий стиль для кнопки-иконки */
.social-buttons--icons .social-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    font-size: 24px; /* Размер иконки внутри */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-buttons--icons .social-button-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

/* Цвета для каждой социальной сети */
.social-buttons--icons .social-button-icon--yandex {
    background-color: #FFDE00;
    color: #000000;
}
.social-buttons--icons .social-button-icon--vk {
    background-color: #0077FF;
    color: #FFFFFF;
}
.social-buttons--icons .social-button-icon--sber {
    background-color: #21A038;
    color: #FFFFFF;
}
.social-buttons--icons .social-button-icon--google {
    background-color: #FFFFFF;
    color: #757575;
    border: 1px solid #E0E0E0;
}
.social-buttons--icons .social-button-icon--telegram {
    background-color: #2AABEE;
    color: #FFFFFF;
}
.social-buttons--icons .social-button-icon--facebook {
    background-color: #1877F2;
    color: #FFFFFF;
}
.social-buttons--icons .social-button-icon--steam {
    background-color: #2a475e;
    color: #c7d5e0;
}
.social-buttons--icons .social-button-icon--github {
    background-color: #333333;
    color: #FFFFFF;
}

/* SVG иконки должны подхватывать цвет родителя */
.social-buttons--icons .social-button-icon svg {
    width: 1em; /* Размер подстраивается под font-size */
    height: 1em;
    fill: currentColor; /* Наследует цвет от родительского <a> */
}
/* [НОВОЕ ПРАВИЛО] Сбрасываем fill для многоцветной иконки Google, 
   чтобы использовались её встроенные цвета, а не цвет родителя. */
.social-buttons--icons .social-button-icon--google svg {
    fill: initial;
}
/* [НОВОЕ ПРАВИЛО] Уменьшаем размер конкретно для SVG иконки Google */
.social-buttons--icons .social-button-icon--vk svg,
.social-buttons--icons .social-button-icon--google svg {
    width: 22px;  /* Устанавливаем фиксированный размер чуть меньше, чем у остальных (было 24px) */
    height: 22px;
}
/* [ИСПРАВЛЕННОЕ ПРАВИЛО v2] Увеличиваем иконки VK и GitHub для лучшего баланса */
.social-buttons--icons .social-button-icon--vk .fa,
.social-buttons--icons .social-button-icon--github .fa {
    font-size: 22px; /* Стандартный размер 24px, делаем чуть крупнее */
}