/**
 * Website Card - My Account / My Website endpoint
 * Light theme with white background per design reference
 */

/* Card container - horizontal on desktop, vertical on mobile */
.website-card {
  display: flex;
  flex-direction: row;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e8e8e8;
}

/* Screenshot section - left on desktop */
.website-card-screenshot {
  flex: 0 0 42%;
  min-height: 220px;
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.website-card-screenshot .screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.website-card-screenshot .screenshot-placeholder {
  width: 100%;
  min-height: 220px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-refresh {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #2c2c2c;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.screenshot-refresh:hover {
  background: #1a1a1a;
}

.screenshot-refresh svg {
  color: #ffffff;
}

/* Info section - right on desktop */
.website-card-info {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.website-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.website-domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ssl-badge {
  flex-shrink: 0;
  color: #22c55e;
  display: flex;
  align-items: center;
}

.website-domain {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  word-break: break-all;
}

.copy-button {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 0.2s, background 0.2s;
}

.copy-button:hover {
  color: #1a1a1a;
  background: #f3f4f6;
}

.copy-button .copy-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  padding: 4px 10px;
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.copy-button.tooltip-active .copy-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

.card-menu-trigger {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.card-menu-trigger:hover {
  color: #1a1a1a;
  background: #f3f4f6;
}

/* Action buttons */
.website-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.site-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  font-family: inherit;
}

/* WP Admin - primary blue button */
.site-button.admin-button {
  background: #2c8ad1;
  color: #ffffff;
  border-color: #2c8ad1;
}

.site-button.admin-button:hover {
  background: #2477b8;
  border-color: #2477b8;
  color: #ffffff;
}

/* Secondary buttons - white with border */
.site-button.visit-button {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #d1d5db;
}

.site-button.visit-button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Mobile: vertical layout */
@media (max-width: 768px) {
  .website-card {
    flex-direction: column;
  }

  .website-card-screenshot {
    flex: none;
    min-height: 180px;
    order: 1;
  }

  .website-card-screenshot .screenshot-placeholder {
    min-height: 180px;
  }

  .website-card-info {
    order: 2;
    padding: 16px 20px;
  }

  .website-card-header {
    margin-bottom: 16px;
  }

  .website-buttons {
    flex-direction: column;
    width: 100%;
  }

  .site-button {
    width: 100%;
    justify-content: center;
  }
}
