/* ==========================================================================
   Component Detail Page — Plain Planning
   Shared styles for Desktop App, Field App, and Customer Portal pages.
   Split-screen layout: image left, content right, no scrolling.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: #133b4e;
  background: #ffffff;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

a {
  color: inherit;
  text-decoration: none;
}


/* --------------------------------------------------------------------------
   Split Layout Container
   -------------------------------------------------------------------------- */
.cp {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}


/* --------------------------------------------------------------------------
   Image Panel (Left Side)
   -------------------------------------------------------------------------- */
.cp__image-panel {
  flex: 0 0 45%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Entrance animation */
  opacity: 0;
  animation: cpSlideInLeft 800ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 100ms;
}

.cp__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}


/* --------------------------------------------------------------------------
   Content Panel (Right Side)
   -------------------------------------------------------------------------- */
.cp__content {
  flex: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  overflow: hidden;
}


/* --------------------------------------------------------------------------
   Hero Area — icon, heading, tagline
   -------------------------------------------------------------------------- */
.cp__hero {
  margin-bottom: 32px;
  width: 100%;
}

.cp__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(0, 151, 178, 0.08);
  margin-bottom: 20px;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  animation: cpFadeUp 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 200ms;
}

.cp__icon svg {
  width: 40px;
  height: 40px;
}

.cp__heading {
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  font-weight: 700;
  color: #133b4e;
  line-height: 1.2;
  margin-bottom: 8px;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px);
  animation: cpFadeUp 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 300ms;
}

.cp__tagline {
  font-size: 1rem;
  font-weight: 400;
  color: #0097b2;
  line-height: 1.5;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px);
  animation: cpFadeUp 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 400ms;
}


/* --------------------------------------------------------------------------
   Description
   -------------------------------------------------------------------------- */
.cp__description {
  font-size: 0.9375rem;
  font-weight: 400;
  color: rgba(19, 59, 78, 0.8);
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 520px;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px);
  animation: cpFadeUp 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 450ms;
}


/* --------------------------------------------------------------------------
   Feature List
   -------------------------------------------------------------------------- */
.cp__features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(16px);
  animation: cpFadeUp 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 500ms;
}

.cp__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f7f9fa;
  border: 1px solid rgba(19, 59, 78, 0.06);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #133b4e;
  line-height: 1.4;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out;
}

.cp__feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(19, 59, 78, 0.08);
  background: #ffffff;
}

.cp__feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 151, 178, 0.12);
}

.cp__feature-icon svg {
  width: 14px;
  height: 14px;
}


/* --------------------------------------------------------------------------
   Divider
   -------------------------------------------------------------------------- */
.cp__divider {
  width: 40px;
  height: 2px;
  background: rgba(0, 151, 178, 0.25);
  border: none;
  border-radius: 1px;
  margin-bottom: 28px;

  /* Entrance animation */
  opacity: 0;
  animation: cpFadeIn 400ms ease-out forwards;
  animation-delay: 550ms;
}


/* --------------------------------------------------------------------------
   Bottom CTA — "Back to overview"
   -------------------------------------------------------------------------- */
.cp__bottom-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0097b2;
  text-decoration: none;
  padding: 10px 20px;
  border: 1.5px solid rgba(0, 151, 178, 0.3);
  border-radius: 8px;
  transition: background-color 200ms ease-out, border-color 200ms ease-out, gap 200ms ease-out;
  width: fit-content;

  /* Entrance animation */
  opacity: 0;
  transform: translateY(12px);
  animation: cpFadeUp 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 600ms;
}

.cp__bottom-cta:hover {
  background: rgba(0, 151, 178, 0.06);
  border-color: #0097b2;
  gap: 12px;
}

.cp__bottom-cta:focus-visible {
  outline: 2px solid #0097b2;
  outline-offset: 4px;
}

.cp__bottom-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 200ms ease-out;
}

.cp__bottom-cta:hover svg {
  transform: translateX(-3px);
}


/* --------------------------------------------------------------------------
   Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes cpFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cpFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cpSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* --------------------------------------------------------------------------
   Responsive — Large Desktop (1200px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  .cp__content {
    padding: 64px 80px;
  }

  .cp__icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
  }

  .cp__icon svg {
    width: 44px;
    height: 44px;
  }

  .cp__heading {
    font-size: 2.25rem;
    margin-bottom: 10px;
  }

  .cp__tagline {
    font-size: 1.125rem;
  }

  .cp__description {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .cp__features {
    gap: 12px;
    margin-bottom: 36px;
  }

  .cp__feature {
    padding: 14px 18px;
    font-size: 0.9375rem;
  }
}


/* --------------------------------------------------------------------------
   Responsive — Medium screens (901px - 1199px)
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) and (min-width: 901px) {
  .cp__image-panel {
    flex: 0 0 42%;
  }

  .cp__content {
    padding: 40px 48px;
  }

  .cp__hero {
    margin-bottom: 24px;
  }

  .cp__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
  }

  .cp__icon svg {
    width: 36px;
    height: 36px;
  }

  .cp__description {
    font-size: 0.875rem;
    margin-bottom: 24px;
  }

  .cp__features {
    gap: 8px;
    margin-bottom: 24px;
  }

  .cp__feature {
    padding: 10px 14px;
    font-size: 0.8125rem;
  }

  .cp__divider {
    margin-bottom: 24px;
  }
}


/* --------------------------------------------------------------------------
   Responsive — Tablet / Small Desktop (768px - 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) and (min-width: 768px) {
  .cp__image-panel {
    flex: 0 0 40%;
  }

  .cp__content {
    padding: 32px 40px;
  }

  .cp__hero {
    margin-bottom: 20px;
  }

  .cp__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin-bottom: 14px;
  }

  .cp__icon svg {
    width: 32px;
    height: 32px;
  }

  .cp__heading {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .cp__tagline {
    font-size: 0.9375rem;
  }

  .cp__description {
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .cp__features {
    gap: 6px;
    margin-bottom: 20px;
  }

  .cp__feature {
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
  }

  .cp__feature-icon {
    width: 20px;
    height: 20px;
  }

  .cp__feature-icon svg {
    width: 12px;
    height: 12px;
  }

  .cp__divider {
    width: 32px;
    margin-bottom: 20px;
  }

  .cp__bottom-cta {
    font-size: 0.8125rem;
    padding: 8px 16px;
  }
}


/* --------------------------------------------------------------------------
   Responsive — Mobile (below 768px)
   Stack layout: image on top, content below
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  body {
    overflow-y: auto;
    height: auto;
  }

  .cp {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .cp__image-panel {
    flex: none;
    height: 35vh;
    min-height: 200px;
    max-height: 300px;
    animation: cpFadeIn 600ms ease-out forwards;
  }

  .cp__content {
    flex: 1;
    height: auto;
    padding: 32px 24px 48px;
    justify-content: flex-start;
  }

  .cp__hero {
    margin-bottom: 24px;
    text-align: center;
  }

  .cp__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 0 auto 16px;
  }

  .cp__icon svg {
    width: 36px;
    height: 36px;
  }

  .cp__heading {
    font-size: 1.5rem;
    text-align: center;
  }

  .cp__tagline {
    text-align: center;
  }

  .cp__description {
    font-size: 0.9375rem;
    text-align: center;
    margin-bottom: 24px;
    max-width: 100%;
  }

  .cp__features {
    gap: 10px;
    margin-bottom: 28px;
    max-width: 100%;
  }

  .cp__feature {
    padding: 12px 16px;
    font-size: 0.875rem;
  }

  .cp__divider {
    margin: 0 auto 28px;
  }

  .cp__bottom-cta {
    margin: 0 auto;
  }
}


/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cp__image-panel,
  .cp__icon,
  .cp__heading,
  .cp__tagline,
  .cp__description,
  .cp__features,
  .cp__divider,
  .cp__bottom-cta {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .cp__feature:hover {
    transform: none;
  }

  .cp__bottom-cta:hover svg {
    transform: none;
  }
}
