/* ============================================
   FONTS
   ============================================ */
@font-face {
  font-family: 'PPNeueMontreal';
  src: url('fonts/PPNeueMontreal/PPNeueMontreal-Regular.otf') format('opentype');
  font-weight: 400;
}
@font-face {
  font-family: 'PPNeueMontreal';
  src: url('fonts/PPNeueMontreal/PPNeueMontreal-Medium.otf') format('opentype');
  font-weight: 500;
}
@font-face {
  font-family: 'PPNeueMontreal';
  src: url('fonts/PPNeueMontreal/PPNeueMontreal-Bold.otf') format('opentype');
  font-weight: 700;
}

/* ============================================
   RESET
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============================================
   BASE
   ============================================ */
body {
  font-family: 'PPNeueMontreal', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: #fff;
  color: #000;
}

a { color: #F74F9E; text-decoration: none; }
a:hover, a:active { text-decoration: underline; }

/* ============================================
   CONTAINER
   ============================================ */
.container-align {
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 5%;
  overflow: hidden;
}

/* ============================================
   TEXT STYLES — text-title, text-context
   ============================================ */
.text-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.text-context p,
.text-context div {
  font-size: 18px;
  line-height: 1.5;
  padding-bottom: 6px;
}

.text-context p:last-child,
.text-context div:last-child {
  padding-bottom: 0;
}

.text-context a,
.text-context div a {
  color: #F74F9E;
  text-decoration: underline;
}

.text-context a:hover,
.text-context a:active,
.text-context div a:hover,
.text-context div a:active {
  text-decoration: underline;
}

/* ============================================
   GRID — con-section
   Mobile: 1 col | Desktop ≥992px: 3 cols
   ============================================ */
.con-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ============================================
   COPYRIGHT — con-copy
   ============================================ */
.con-copy {
  margin-top: 4rem;
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

/* ============================================
   VISIBILITY
   ============================================ */
.desktop-only { display: none; }
.mobile-only  { display: block; }

/* ============================================
   LARGE MOBILE BUTTON
   ============================================ */
.large-mobile-btn {
  display: block;
  width: 100%;
  height: 52px;
  border-radius: 26px;
  background: #000;
  color: #fff;
  border: none;
  font-family: 'PPNeueMontreal', sans-serif;
  font-size: 17.5px;
  cursor: pointer;
  letter-spacing: 0.01em;
}

/* ============================================
   MOBILE CANVAS OVERLAY
   ============================================ */
.canvas-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 100;
  flex-direction: column;
  padding: 20px;
}

.canvas-overlay.visible { display: flex; }

.canvas-overlay__close {
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  align-self: flex-start;
  margin-bottom: 16px;
}

.canvas-overlay__close svg { width: 18px; height: 18px; }

#mobile-cuboid {
  flex: 1;
  height: auto;
  min-height: 0;
  position: relative;
}

/* ============================================
   DESKTOP ≥992px
   ============================================ */
@media (min-width: 992px) {
  .con-section {
    grid-template-columns: repeat(3, 1fr);
  }

  .desktop-only { display: flex; }
  .mobile-only  { display: none; }

  /* Cuboid: fixed, exact values from original style.module.css */
  .section-c {
    position: fixed;
    width: 28%;
    right: 4%;
    top: 40px;
    height: calc(100vh - 80px);
    display: block !important;
  }
}

/* ============================================
   MOBILE <992px
   ============================================ */
@media (max-width: 991px) {
  .container-align { padding: 20px; }
  .con-section { gap: 2rem; }
  .section-c { display: none !important; }
}

/* ============================================
   CUBOID
   ============================================ */
.cuboid {
  position: relative;
  height: 100%;
  width: 100%;
}

.cuboid > * { position: absolute; }

.cuboid .first-rectangle,
.cuboid .second-rectangle {
  border: 1px solid #000;
  width: 100%;
  height: 100%;
}

.cuboid .first-rectangle { top: 12px; }

.cuboid .second-rectangle {
  left: 12px;
  padding: 10px 22px 10px 10px;
}

.connector {
  border-top: 1px solid #000;
  padding: 8px;
  transform: rotate(-45deg);
}

.connector.first-connector  { top: 4px;      left: 4px;    }
.connector.second-connector { top: 4px;      right: -19px; }
.connector.third-connector  { bottom: -20px; left: 4px;    }
.connector.fourth-connector { bottom: -20px; right: -19px; }

/* ============================================
   CANVAS HOLDER
   ============================================ */
.canvas-holder {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.canvas-box {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
}

#drawing-canvas,
#mobile-drawing-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.textarea-box {
  display: none;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  padding: 16px;
}

#message-text,
#mobile-message-text {
  width: 100%;
  height: auto;
  min-height: 60px;
  border: none;
  resize: none;
  overflow: hidden;
  text-align: center;
  line-height: 1.5;
  color: #c2c2c2;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  background: transparent;
}

/* ============================================
   CANVAS CONTROLS
   ============================================ */
.canvas-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  flex-shrink: 0;
}

.tools-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
}

.picker-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.picker-item {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  top: 0;
  transition: top 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.con-slide {
  position: relative;
  display: flex;
  align-items: center;
  height: 26px;
  width: 50px;
  flex-shrink: 0;
  border: 1.5px solid #000;
  border-radius: 100px;
  background: #fff;
  box-sizing: border-box;
}

.con-slide-icon {
  position: absolute;
  left: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  border: none;
  border-radius: 100px;
}

.slide-icon {
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000;
  flex-shrink: 0;
}

.slide-icon.active { color: #fff; }

.aa-text {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.slide {
  position: relative;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  background: #000;
  left: 0;
  flex-shrink: 0;
}

.slide.left  { animation: .2s linear slide-left;  left: 0; }
.slide.right { animation: .2s linear slide-right; left: 23px; }

@keyframes slide-left  { 0% { left: 22px; } 100% { left: 0; } }
@keyframes slide-right { 0% { left: 0; }    100% { left: 22px; } }

.bottom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

#send-btn,
#mobile-send-btn {
  flex: 1;
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 100px;
  white-space: nowrap;
}

#send-btn:hover,
#mobile-send-btn:hover { background: #333; }

.clear-button {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  border-radius: 100px;
  white-space: nowrap;
}