/**
 * Стили для WP Social Login
 */

/* Блок социальных кнопок */
.wcsl-social-login {
  margin: 20px 0;
}

.wcsl-separator {
  text-align: center;
  position: relative;
  margin: 20px 0;
  overflow: hidden;
}

.wcsl-separator span {
  display: inline-block;
  position: relative;
  padding: 0 15px;
  background: #fff;
  color: #666;
  font-size: 14px;
}

.wcsl-separator::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

/* Контейнер кнопок */
.wcsl-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* VK ID виджет */
.wcsl-vk-widget {
  min-height: 48px;
  width: 100%;
  position: relative;
}

/* VK ID iframe контейнер */
.wcsl-vk-widget > div,
.wcsl-vk-widget iframe {
  width: 100% !important;
  max-width: 100%;
}

.wcsl-vk-widget.wcsl-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.wcsl-vk-widget.wcsl-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid #0077ff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: wcsl-spin 0.6s linear infinite;
  z-index: 10;
}

@keyframes wcsl-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Базовые стили кнопок */
.wcsl-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.wcsl-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #fff;
}

.wcsl-button:active {
  transform: translateY(0);
}

/* Кнопка VK */
.wcsl-button-vk {
  background-color: #0077ff;
  background: linear-gradient(135deg, #0077ff 0%, #0055cc 100%);
}

.wcsl-button-vk:hover {
  background: linear-gradient(135deg, #0066ee 0%, #0044bb 100%);
}

/* Кнопка Яндекс */
.wcsl-button-yandex {
  background-color: #fc0;
  background: linear-gradient(135deg, #fc0 0%, #f90 100%);
  color: #000;
}

.wcsl-button-yandex:hover {
  background: linear-gradient(135deg, #ffdd00 0%, #ff9900 100%);
  color: #000;
}

/* Страница социальных связей */
.wcsl-social-connections {
  margin: 20px 0;
}

.wcsl-social-connections h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.wcsl-social-connections > p {
  color: #666;
  margin-bottom: 20px;
}

/* Таблица связей */
.wcsl-connections-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.wcsl-connections-table thead {
  background-color: #f8f8f8;
}

.wcsl-connections-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
}

.wcsl-connections-table td {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.wcsl-connections-table tbody tr:hover {
  background-color: #fafafa;
}

/* Статусы */
.wcsl-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.wcsl-status-connected {
  background-color: #e7f5ec;
  color: #2e7d32;
}

.wcsl-status-not-connected {
  background-color: #fff3e0;
  color: #f57c00;
}

/* Кнопки подключения/отвязки */
.wcsl-connect-button,
.wcsl-disconnect-button {
  padding: 8px 16px;
  font-size: 14px;
}

/* Модальное окно привязки соцсети */
.wcsl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wcslFadeIn 0.15s ease;
}
@keyframes wcslFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.wcsl-modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px 32px 28px;
  width: 360px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  position: relative;
  animation: wcslSlideUp 0.18s ease;
}
@keyframes wcslSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.wcsl-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 4px 6px;
  border-radius: 6px;
  transition:
    color 0.15s,
    background 0.15s;
}
.wcsl-modal-close:hover {
  color: #333;
  background: #f0f0f0;
}
.wcsl-modal-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 20px;
  padding-right: 24px;
}
.wcsl-modal-widget {
  min-height: 48px;
}
.wcsl-modal .wcsl-social-error {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.wcsl-connect-button {
  background-color: #0077ff;
  color: #fff;
}

.wcsl-connect-button:hover {
  background-color: #0066ee;
  color: #fff;
}

.wcsl-disconnect-button {
  background-color: #f44336;
  color: #fff;
}

.wcsl-disconnect-button:hover {
  background-color: #d32f2f;
  color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
  .wcsl-connections-table {
    font-size: 14px;
  }

  .wcsl-connections-table th,
  .wcsl-connections-table td {
    padding: 8px;
  }

  .wcsl-button {
    padding: 10px 16px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .wcsl-connections-table {
    display: block;
    overflow-x: auto;
  }

  .wcsl-connections-table thead {
    display: none;
  }

  .wcsl-connections-table tbody,
  .wcsl-connections-table tr,
  .wcsl-connections-table td {
    display: block;
    width: 100%;
  }

  .wcsl-connections-table tr {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
  }

  .wcsl-connections-table td {
    text-align: left;
    padding: 8px 0;
    border: none;
  }

  .wcsl-connections-table td::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #666;
  }
}
