/* Reagan's Family Care Digital Business Card - Updated Styles */

:root {
  /* Using website color scheme */
  --primary-color: #0071E3;
  --primary-light: #40A9FF;
  --primary-dark: #0051B5;
  --secondary-color: #FF9F7D;
  --secondary-light: #FFB59A;
  --accent-color: #5EEAD4;
  --background: #F1FAFA;
  --neutral-50: #FAFAFA;
  --neutral-100: #F5F5F5;
  --neutral-200: #E5E5E5;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --text-primary: #171717;
  --text-secondary: #525252;

  /* Logo heart colors */
  --heart-pink: #E1347D;
  --heart-teal: #5DD0D1;
  --heart-gold: #EFD679;

  /* Apple-style shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);

  /* Apple-style fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
}

body {
  margin: 0 auto;
  width: 100%;
  padding: 0;
  max-width: 30rem;
  background-color: var(--background);
  color: var(--text-primary);
  position: relative;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  line-height: 1.6;
  margin: 0;
}

h2, h3 {
  margin: 0;
  font-weight: 600;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  border: none;
}

.icon svg {
  border: none;
  outline: none;
  display: block;
}

.icon svg path {
  border: none;
  outline: none;
}

a {
  text-decoration: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Modal Styling */
#modal {
  display: flex;
  flex-direction: column;
  position: absolute;
  z-index: 1;
  width: 100%;
  bottom: 0;
  transition: top 0.2s ease-out, opacity 0.1s ease-out;
  transform: translateZ(0);
  background-color: white;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: var(--shadow-xl);
}

#close {
  align-self: end;
  padding: 1rem;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.2s ease;
}

#close:hover {
  transform: scale(1.1);
}

.closeColor {
  filter: none;
}

.closeColor svg path {
  stroke: var(--text-primary);
}

#keyView, #copyView, #qrView {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 1rem;
  text-align: center;
}

#keyView p, #copyView p, #qrView p {
  margin: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

#copyURL, #dlKey {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  border: none;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  min-height: 44px;
}

#copyURL:hover, #dlKey:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

#copyURL:active, #dlKey:active {
  transform: scale(0.98);
}

#copyURL span, #dlKey span {
  margin-left: 0.5rem;
}

#qrView h3 {
  margin: 2rem 2rem 0;
  color: var(--text-primary);
}

#qrView p {
  margin: 0.5rem 2rem 0;
}

#qr {
  margin: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

/* Header Styling */
header {
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
}

.headerImgC {
  display: grid;
  grid-template-columns: auto;
  grid-template-rows: auto;
  overflow: hidden;
  border-radius: 0 0 2rem 2rem;
}

#cover {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 20rem;
  object-position: top center;
  object-fit: cover;
}

#logo {
  max-height: 6rem;
  pointer-events: none;
  user-select: none;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}

#topActions {
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: flex-start;
  position: absolute;
  width: 100%;
  z-index: 2;
}

#topActions > div {
  display: flex;
}

#topActions a {
  padding: 1rem;
  cursor: pointer;
  line-height: 0;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  margin: 0.5rem;
  transition: all 0.2s ease;
}

#topActions a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.topAction svg path {
  stroke: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Main Content */
main {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: white;
  border-radius: 2rem 2rem 0 0;
  margin-top: -2rem;
  box-shadow: var(--shadow-lg);
}

#profilePhoto {
  width: 10rem;
  height: 10rem;
  border-radius: 100%;
  box-sizing: content-box;
  pointer-events: none;
  user-select: none;
  margin-top: -6rem;
  border: 4px solid white;
  box-shadow: var(--shadow-lg);
}

#info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  line-height: 1.4;
  word-break: break-word;
}

.name {
  font-weight: 700;
  font-size: 1.75rem;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.jobtitle {
  font-size: 1rem;
  margin: 0.5rem 0 0;
  color: var(--text-secondary);
  font-weight: 500;
}

.bizname {
  font-size: 1.125rem;
  margin: 0.75rem 0 0;
  color: var(--primary-color);
  font-weight: 600;
}

.bizaddr {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.sub {
  font-size: 0.9rem;
  white-space: pre-line;
  line-height: 1.6;
  margin: 1rem 0 0;
  color: var(--text-secondary);
  max-width: 90%;
}

.textColor {
  color: var(--text-primary) !important;
}

/* CTA Button */
#cta {
  display: flex;
  align-items: center;
  border-radius: 1rem;
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  line-height: 0;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
  background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  min-height: 48px;
}

#cta:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

#cta:active {
  transform: scale(0.98);
}

#cta .icon {
  margin-right: 0.5rem;
}

#cta p {
  margin: 0;
  color: white;
  font-weight: 500;
  font-size: 1rem;
}

.iconColor {
  color: white !important;
}

.iconColor svg path {
  stroke: white;
}

/* Remove white stroke from action button icons */
.actionBtn svg path,
.secBtn svg path {
  stroke: none !important;
}

/* Action Buttons */
.actions {
  width: 100%;
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.actionsC {
  width: calc(25% - 0.375rem);
  min-width: 70px;
}

.actionBtn {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.actionBtn a {
  border-radius: 1rem;
  padding: 1rem;
  line-height: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  border: none;
  outline: none;
}

.actionBtn .icon {
  border: none;
  outline: none;
}

.actionBtn .icon svg {
  border: none;
  outline: none;
  overflow: visible;
}

.actionBtn .icon svg path {
  stroke: none !important;
}

/* Individual button colors from logo hearts */
.actionsC:nth-child(1) .actionBtn a {
  background: linear-gradient(to bottom, var(--heart-pink), #c12966);
}

.actionsC:nth-child(2) .actionBtn a {
  background: linear-gradient(to bottom, var(--heart-teal), #4ab8b9);
}

.actionsC:nth-child(3) .actionBtn a {
  background: linear-gradient(to bottom, var(--heart-gold), #d9c060);
}

.actionsC:nth-child(4) .actionBtn a {
  background: linear-gradient(to bottom, var(--heart-pink), #c12966);
}

.actionBtn a:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.actionBtn a:active {
  transform: scale(0.95);
}

.actionBtn p {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Secondary Actions (Social Media) */
.actions.secondary {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--neutral-200);
}

.secBtn {
  padding: 1rem;
}

.secBtn a {
  padding: 1.25rem;
  border: none;
  outline: none;
}

.secBtn .icon {
  border: none;
  outline: none;
}

.secBtn .icon svg {
  border: none;
  outline: none;
  overflow: visible;
}

.secBtn .icon svg path {
  stroke: none !important;
}

/* Responsive Design */
@media (max-width: 640px) {
  .actionsC {
    width: calc(25% - 0.375rem);
  }

  .name {
    font-size: 1.5rem;
  }

  main {
    padding: 1rem 0.75rem;
  }
}

/* Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Selection Colors */
::selection {
  background-color: rgba(0, 113, 227, 0.2);
  color: var(--text-primary);
}
