/**
 * OPS Contact Cards - Frontend Styles
 * Adapted for WordPress themes
 */

.ops-contact-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  text-align: left;
  padding: 3rem 2rem 2rem 2rem;
  width: 100%;
  max-width: 300px;
  margin: 80px auto 20px auto;
  overflow: visible;
  box-sizing: border-box;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.ops-contact-avatar {
  position: absolute;
  top: -60px;
  left: 10px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  border: 4px solid #fff;
}

.ops-contact-name {
  margin-top: 70px;
  font-size: 1.4rem;
  color: #222;
  word-wrap: break-word;
  line-height: 1.3;
}

.ops-contact-title {
  font-weight: 600;
  color: #555;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.ops-contact-company {
  color: #666;
  margin-top: 0;
  margin-bottom: 1rem;
}

.ops-contact-info {
  margin-top: 1rem;
}

.ops-contact-info-link {
  display: block;
  color: #333;
  text-decoration: none;
  margin: 0.3rem 0;
  font-size: 0.95rem;
  padding-left: 5px;
  line-height: 2;
  transition: color 0.3s;
}

.ops-contact-info-link:hover {
  color: #007bff;
}

.ops-contact-socials {
  margin-top: 1rem;
  padding-left: 5px;
}

.ops-contact-social-link {
  display: inline-block;
  margin: 0.2rem 0.3rem;
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.ops-contact-social-link:hover {
  text-decoration: underline;
}

.ops-contact-qr-code {
  margin-top: 20px;
  text-align: left;
}

.ops-contact-qr-image {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ops-contact-qr-caption {
  font-size: 0.8rem;
  color: #555;
  margin-top: 5px;
  margin-bottom: 5px;
}

.ops-contact-btn {
  display: inline-block;
  background: #007bff;
  color: white !important;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.3s;
  font-weight: 500;
}

.ops-contact-btn:hover {
  background: #0056b3;
  color: white !important;
}

.ops-contact-error {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #f5c6cb;
  margin: 1rem 0;
}

/* Mobile Responsive Design */
@media (max-width: 480px) {
  .ops-contact-card {
    max-width: 100%;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    border-radius: 15px;
    margin-top: 70px;
  }
  
  .ops-contact-avatar {
    width: 120px;
    height: 120px;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .ops-contact-name {
    margin-top: 60px;
    font-size: 1.3rem;
    text-align: center;
  }
  
  .ops-contact-title {
    font-size: 0.9rem;
    text-align: center;
  }
  
  .ops-contact-company {
    text-align: center;
    font-size: 0.9rem;
  }
  
  .ops-contact-info {
    text-align: center;
  }
  
  .ops-contact-info-link {
    font-size: 0.9rem;
    word-break: break-word;
    padding-left: 0;
  }
  
  .ops-contact-socials {
    text-align: center;
    padding-left: 0;
  }
  
  .ops-contact-social-link {
    font-size: 0.9rem;
    margin: 0.2rem 0.2rem;
  }
  
  .ops-contact-qr-code {
    text-align: center;
  }
  
  .ops-contact-qr-image {
    width: 100px;
    height: 100px;
  }
  
  .ops-contact-btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

/* Tablet and small desktop */
@media (min-width: 481px) and (max-width: 768px) {
  .ops-contact-card {
    max-width: 400px;
  }
}

/* ===================================
   LANDSCAPE LAYOUTS (PRO FEATURE)
   =================================== */

.ops-contact-card.ops-landscape-left,
.ops-contact-card.ops-landscape-right {
  max-width: 600px;
  padding: 2rem;
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}

.ops-contact-card.ops-landscape-left .ops-contact-avatar,
.ops-contact-card.ops-landscape-right .ops-contact-avatar {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin-right: 0;
}

/* Inner row for avatar + content */
.ops-landscape-row {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.ops-landscape-right .ops-landscape-row {
  flex-direction: row-reverse;
}

.ops-landscape-left .ops-contact-avatar {
  margin-right: 2rem;
}

.ops-landscape-right .ops-contact-avatar {
  margin-left: 2rem;
}

.ops-landscape-left .ops-contact-content,
.ops-landscape-right .ops-contact-content {
  flex: 1 1 auto;
  min-width: 0;
}

.ops-landscape-left .ops-contact-name,
.ops-landscape-right .ops-contact-name {
  margin-top: 0;
}

/* Two-column body inside landscape layouts: content (left) and QR (right) */
.ops-landscape-body {
  display: block;
  width: 100%;
}

.ops-landscape-body .ops-contact-qr-code {
  text-align: center;
}

/* Center the actions/button below everything */
.ops-contact-actions {
  width: 100%;
  text-align: center;
  margin-top: 24px;
}

.ops-contact-actions .ops-contact-btn {
  display: inline-block;
}

/* ===================================
   IMAGE SHAPES (PRO FEATURE)
   =================================== */

/* Square images */
.ops-contact-card[data-image-shape="square"] .ops-contact-avatar {
  border-radius: 10px;
}

/* Round images (default) */
.ops-contact-card[data-image-shape="round"] .ops-contact-avatar {
  border-radius: 50%;
}

/* Responsive for landscape layouts */
@media (max-width: 768px) {
  .ops-landscape-row {
    flex-direction: column !important;
    align-items: center;
    gap: 1rem;
  }
  .ops-contact-card.ops-landscape-left .ops-contact-avatar,
  .ops-contact-card.ops-landscape-right .ops-contact-avatar {
    margin: 0 0 1.5rem 0;
  }
  
  .ops-contact-card.ops-landscape-left .ops-contact-info,
  .ops-contact-card.ops-landscape-right .ops-contact-info {
    text-align: center;
  }
  
  .ops-contact-card.ops-landscape-left .ops-contact-qr-code,
  .ops-contact-card.ops-landscape-right .ops-contact-qr-code {
    text-align: center;
  }

  .ops-landscape-body {
    display: block;
  }
}

/* Additional spacing for landscape templates */
.ops-contact-card.ops-landscape-left .ops-contact-qr-code,
.ops-contact-card.ops-landscape-right .ops-contact-qr-code {
  margin-top: 20px;
  text-align: center;
}

.ops-contact-card.ops-landscape-left .ops-contact-actions,
.ops-contact-card.ops-landscape-right .ops-contact-actions {
  margin-top: 28px;
}

