/* YL Social Login Styles */

.yl-social-login-container {
  margin: 24px 0 0 0;
  text-align: center;
}

.yl-social-login-divider {
  position: relative;
  margin-bottom: 20px;
  text-align: center;
}

.yl-social-login-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e0e0e0;
  z-index: 0;
}

.yl-social-login-divider span {
  padding: 0 15px;
  position: relative;
  z-index: 2;
  font-weight: 600;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: -0.2px;
  color: #4e4e43;
  text-transform: uppercase;
  background-color: #ffffff;
  display: inline-block;
}

.yl-social-login-buttons {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

/* Button Base Styles */
.yl-social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 234px;
  height: 40px;
  gap: 8px;
  opacity: 1;
  border-radius: 4px;
}

.yl-social-login-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.yl-social-login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.yl-social-login-btn i {
  font-size: 18px;
}

/* Button Sizes */
.yl-social-login-btn-small {
  padding: 8px 16px;
  min-height: 36px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0px;
  text-align: center;
  vertical-align: middle;
}

.yl-social-login-btn-medium {
  padding: 12px 20px;
  font-size: 16px;
  min-height: 44px;
}

.yl-social-login-btn-large {
  padding: 16px 24px;
  font-size: 18px;
  min-height: 52px;
}

/* Modern Style */
.yl-social-login-btn-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.yl-social-login-btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.yl-social-login-btn-modern.yl-social-login-btn-google {
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
}

.yl-social-login-btn-modern.yl-social-login-btn-facebook {
  background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
}

.yl-social-login-btn-modern.yl-social-login-btn-twitter {
  background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.yl-social-login-btn-modern.yl-social-login-btn-linkedin {
  background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
}

.yl-social-login-btn-modern.yl-social-login-btn-github {
  background: linear-gradient(135deg, #333 0%, #24292e 100%);
}

/* Classic Style */
.yl-social-login-btn-classic {
  border: 1px solid #010101;
  background-color: white;
  color: #333;
}

.yl-social-login-btn-classic:hover {
  border-color: #999;
  background-color: #f7eeed;
}

.yl-social-login-btn-classic.yl-social-login-btn-google {
  border-color: #010101;
  color: #010101;
}

.yl-social-login-btn-classic.yl-social-login-btn-google:hover {
  background-color: #f7eeed;
  color: #131313;
}

.yl-social-login-btn-classic.yl-social-login-btn-facebook {
  border-color: #010101;
  color: #131313;
}

.yl-social-login-btn-classic.yl-social-login-btn-facebook:hover {
  background-color: #f7eeed;
  color: #131313;
}

.yl-social-login-btn-classic.yl-social-login-btn-twitter {
  border-color: #1da1f2;
  color: #1da1f2;
}

.yl-social-login-btn-classic.yl-social-login-btn-twitter:hover {
  background-color: #1da1f2;
  color: white;
}

.yl-social-login-btn-classic.yl-social-login-btn-linkedin {
  border-color: #0077b5;
  color: #0077b5;
}

.yl-social-login-btn-classic.yl-social-login-btn-linkedin:hover {
  background-color: #0077b5;
  color: white;
}

.yl-social-login-btn-classic.yl-social-login-btn-github {
  border-color: #333;
  color: #333;
}

.yl-social-login-btn-classic.yl-social-login-btn-github:hover {
  background-color: #333;
  color: white;
}

/* Minimal Style */
.yl-social-login-btn-minimal {
  background-color: transparent;
  color: #666;
  border: 1px solid #e0e0e0;
}

.yl-social-login-btn-minimal:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
}

.yl-social-login-btn-minimal.yl-social-login-btn-google {
  color: #4285f4;
}

.yl-social-login-btn-minimal.yl-social-login-btn-facebook {
  color: #1877f2;
}

.yl-social-login-btn-minimal.yl-social-login-btn-twitter {
  color: #1da1f2;
}

.yl-social-login-btn-minimal.yl-social-login-btn-linkedin {
  color: #0077b5;
}

.yl-social-login-btn-minimal.yl-social-login-btn-github {
  color: #333;
}

/* Loading State */
.yl-social-login-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.yl-social-login-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: yl-social-login-spin 1s linear infinite;
}

@keyframes yl-social-login-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 480px) {
  .yl-social-login-buttons {
    max-width: 100%;
  }

  .yl-social-login-btn-medium {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 40px;
  }

  .yl-social-login-btn-large {
    padding: 12px 20px;
    font-size: 16px;
    min-height: 44px;
  }
}

/* ==========================
   YL Theme Login Page integration
   Scope to .container-login to avoid affecting other pages
   ========================== */
.container-login .yl-social-login-container { margin-top: 16px; }
.container-login .yl-social-login-divider { margin: 12px 0 16px; }
.container-login .yl-social-login-divider::before { background-color: #e1e1d7; }
.container-login .yl-social-login-divider span { background-color: #fff; color: #6b6b6b; }

.container-login .yl-social-login-buttons { display: flex; gap: 12px; max-width: 100%; }
.container-login .yl-social-login-btn { width: 100% !important; height: 48px; border-radius: 8px; }
.container-login .yl-social-login-btn img { width: 18px; height: 18px; }

@media (max-width: 480px) {
  .container-login .yl-social-login-buttons { flex-direction: column; }
}

/* Error States */
.yl-social-login-error {
  color: #dc3545;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

.yl-social-login-success {
  color: #28a745;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

/* WooCommerce Account Form Integration */
.yl-social-accounts-section {
  margin: 30px 0;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.yl-social-accounts-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.yl-social-accounts-section h4 {
  margin: 15px 0 10px 0;
  color: #555;
  font-size: 16px;
  font-weight: 500;
}

.yl-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.yl-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.yl-account-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.yl-account-info {
  flex: 1;
}

.yl-account-provider {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.yl-provider-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 4px;
}

.yl-provider-name {
  font-weight: 500;
  color: #333;
}

.yl-account-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yl-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.yl-status-badge.yl-linked {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.yl-status-badge.yl-available {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.yl-linked-date {
  font-size: 12px;
  color: #666;
}

.yl-account-actions {
  margin-left: 15px;
}

.yl-account-actions .button {
  padding: 6px 12px;
  font-size: 12px;
  min-height: auto;
}

.yl-unlink-account {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.yl-unlink-account:hover {
  background: #c82333;
  border-color: #bd2130;
}

.yl-link-account {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.yl-link-account:hover {
  background: #218838;
  border-color: #1e7e34;
}

/* Responsive design for account grid */
@media (max-width: 768px) {
  .yl-accounts-grid {
    grid-template-columns: 1fr;
  }

  .yl-account-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .yl-account-actions {
    margin-left: 0;
    width: 100%;
  }

  .yl-account-actions .button {
    width: 100%;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .yl-social-login-divider::before {
    background-color: #444;
  }

  .yl-social-login-divider span {
    background-color: #ffff;
    color: #4e4e43;
  }

  .yl-social-login-btn-classic {
    background-color: #ffffff;
    border-color: #444;
    color: #fff;
  }

  .yl-social-login-btn-classic:hover {
    background-color: #3a3a3a;
    border-color: #555;
  }

  .yl-social-login-btn-minimal {
    border-color: #444;
    color: #ccc;
  }

  .yl-social-login-btn-minimal:hover {
    background-color: #2a2a2a;
    border-color: #555;
  }

  .yl-social-accounts-section {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
  }

  .yl-social-accounts-section h3,
  .yl-social-accounts-section h4 {
    color: #fff;
  }

  .yl-account-item {
    background: #333;
    border-color: #555;
    color: #ccc;
  }

  .yl-provider-name {
    color: #fff;
  }

  .yl-linked-date {
    color: #aaa;
  }
}

/* Profile Section Styles */
.yl-profile-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.yl-profile-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.yl-profile-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

/* User Information Styles */
.yl-user-info {
  margin-bottom: 32px;
}

.yl-info-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.yl-info-row:last-child {
  border-bottom: none;
}

.yl-info-label {
  flex: 0 0 120px;
  font-weight: 500;
  color: #666;
  font-size: 14px;
}

.yl-info-value {
  flex: 1;
  color: #333;
  font-size: 14px;
}

/* Account Sections */
.yl-linked-accounts,
.yl-available-accounts {
  margin-bottom: 32px;
}

.yl-linked-accounts h4,
.yl-available-accounts h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.yl-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Account Item Styles */
.yl-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.yl-account-item:hover {
  background: #f1f3f4;
  border-color: #dadce0;
}

/* Account Button Styles */
.yl-account-button {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 6px;
  cursor: default;
  transition: all 0.2s ease;
}

.yl-account-button:hover {
  border-color: #bdc1c6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yl-available-button {
  cursor: pointer;
  background: #f8f9fa;
}

.yl-available-button:hover {
  background: #ffffff;
  border-color: #4285f4;
}

.yl-provider-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.yl-provider-text {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* Account Actions */
.yl-account-actions {
  margin-left: 16px;
}

.yl-account-actions .button {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #5f6368;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yl-account-actions .button:hover {
  background: #f1f3f4;
  border-color: #bdc1c6;
  color: #202124;
}

.yl-unlink-account {
  color: #d93025 !important;
  border-color: #d93025 !important;
}

.yl-unlink-account:hover {
  background: #fce8e6 !important;
  color: #c5221f !important;
}

.yl-link-account {
  color: #1a73e8 !important;
  border-color: #1a73e8 !important;
}

.yl-link-account:hover {
  background: #e8f0fe !important;
  color: #174ea6 !important;
}

/* Linked Date */
.yl-linked-date {
  font-size: 12px;
  color: #5f6368;
  margin-top: 4px;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .yl-profile-section {
    margin: 0 16px;
    padding: 16px;
  }

  .yl-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .yl-info-label {
    flex: none;
    font-size: 12px;
    color: #5f6368;
  }

  .yl-account-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .yl-account-actions {
    margin-left: 0;
    align-self: flex-end;
  }

  .yl-account-button {
    justify-content: center;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .yl-profile-section {
    background: #202124;
    color: #e8eaed;
  }

  .yl-profile-header h3,
  .yl-linked-accounts h4,
  .yl-available-accounts h4 {
    color: #e8eaed;
  }

  .yl-info-label {
    color: #9aa0a6;
  }

  .yl-info-value {
    color: #e8eaed;
  }

  .yl-account-item {
    background: #303134;
    border-color: #5f6368;
  }

  .yl-account-item:hover {
    background: #3c4043;
    border-color: #9aa0a6;
  }

  .yl-account-button {
    background: #202124;
    border-color: #5f6368;
    color: #e8eaed;
  }

  .yl-account-button:hover {
    border-color: #9aa0a6;
  }

  .yl-available-button {
    background: #303134;
  }

  .yl-available-button:hover {
    background: #202124;
    border-color: #8ab4f8;
  }

  .yl-provider-text {
    color: #e8eaed;
  }

  .yl-account-actions .button {
    background: #202124;
    border-color: #5f6368;
    color: #9aa0a6;
  }

  .yl-account-actions .button:hover {
    background: #303134;
    border-color: #9aa0a6;
    color: #e8eaed;
  }

  .yl-linked-date {
    color: #9aa0a6;
  }
}

/* Social Button Styles */
.yl-social-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  max-width: 430px;
  align-items: flex-start;
}

.yl-social-button {
  display: flex;
  align-items: center;
  width: 430px;
  height: 40px;
  gap: 8px;
  padding: 12px;
  border: 1px solid #131313;
  border-radius: 4px;
  background: #ffffff;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  cursor: default;
  justify-content: center;
}

.yl-social-button-inner {
  display: flex;
  align-items: center;
}

.yl-social-button:hover {
  opacity: 0.8;
}

.yl-social-button .yl-provider-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.yl-social-button .yl-provider-text {
  font-size: 14px;
  font-weight: 500;
  color: #131313;
  flex: 1;
}

/* Responsive Design */
@media (max-width: 480px) {
  .yl-social-buttons-container {
    max-width: 100%;
  }

  .yl-social-button {
    width: 100%;
    max-width: 430px;
  }
}

/* Social Login Messages */
.yl-social-login-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  max-width: 300px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.yl-social-login-message.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.yl-social-login-message.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Dark Mode Support for Messages */
@media (prefers-color-scheme: dark) {
  .yl-social-login-message.success {
    background-color: #1e4d2b;
    border-color: #2d5a3a;
    color: #d4edda;
  }

  .yl-social-login-message.error {
    background-color: #4d1e1e;
    border-color: #5a2d2d;
    color: #f8d7da;
  }
}
