/* Crear Foto Con Roger (0.33.0): the Cambiar Foto menu and the window, as the approved mockup
   (Mockups/crear-foto-con-roger/Crear Foto Con Roger.html). Every class starts with cf- so nothing else moves. */
.foto { position: relative; }
.cf-menu { position: absolute; z-index: 5; left: 8px; right: 8px; bottom: 44px; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14); padding: 6px; }
.cf-menu button { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; }
.cf-menu button:hover, .cf-menu button:focus-visible { background: var(--bg); }
.cf-menu b { display: block; color: var(--navy); }
.cf-menu small { color: var(--muted); }
.cf-menu .ico { font-size: 18px; line-height: 1.2; }

.cf-scrim { position: fixed; inset: 0; background: rgba(8, 30, 20, .45); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 60; }
.cf-modal { width: min(1120px, 100%); height: min(820px, 100%); background: var(--bg); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; overflow: hidden; }
.cf-mh { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--border); }
.cf-mh h2 { margin: 0; font-size: 19px; color: var(--navy); }
.cf-mh .sub { color: var(--muted); font-size: 13px; }
.cf-mh .x { margin-left: auto; width: 36px; height: 36px; flex: none; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 18px; color: var(--navy); }
.cf-mb { flex: 1; display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 0; }
.cf-aside { border-right: 1px solid var(--border); padding: 18px; overflow: auto; background: #fff; }
.cf-aside h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--oro-antiguo); margin: 0 0 8px; }
.cf-aside .cur img { width: 100%; height: 230px; object-fit: cover; border-radius: 8px; display: block; background: #e9edf3; }
.cf-aside .cur .fn { font-size: 11.5px; color: var(--muted); margin: 6px 0 18px; word-break: break-all; }
.cf-aside .rules { list-style: none; margin: 0 0 18px; padding: 0; font-size: 13px; }
.cf-aside .rules li { padding: 5px 0 5px 22px; position: relative; }
.cf-aside .rules li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.cf-aside .meter { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 13px; }
.cf-aside .meter .cf-bar { height: 8px; background: #EDE5D0; border-radius: 99px; margin: 8px 0 6px; overflow: hidden; }
.cf-aside .meter .cf-bar i { display: block; height: 100%; background: var(--oro-antiguo); border-radius: 99px; transition: width .4s; }
.cf-aside .meter small { color: var(--muted); }

.cf-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cf-thread { flex: 1; overflow: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; min-width: 0; }
.cf-msg { max-width: 86%; }
.cf-msg .who { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.cf-msg .b { padding: 10px 14px; border-radius: 14px; overflow-wrap: anywhere; }
.cf-msg .b p { margin: 0 0 8px; }
.cf-msg .b p:last-of-type { margin-bottom: 0; }
.cf-msg.r .b { background: #fff; border: 1px solid var(--border); border-top-left-radius: 4px; }
.cf-msg.u { align-self: flex-end; }
.cf-msg.u .who { text-align: right; }
.cf-msg.u .b { background: var(--navy); color: #fff; border-top-right-radius: 4px; white-space: pre-wrap; }
.cf-msg.wide { max-width: 100%; width: 100%; }
.cf-vela-tag { opacity: .7; }
.cf-note { align-self: center; max-width: 90%; font-size: 13px; color: #6b4e12; background: var(--wash); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.cf-working { color: var(--muted); }
.cf-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.cf-opt { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-width: 0; }
.cf-opt img { width: 100%; height: 300px; object-fit: cover; border-radius: 6px; display: block; cursor: zoom-in; background: #e9edf3; }
.cf-opt .n { font-weight: 600; color: var(--navy); margin: 8px 2px 2px; font-size: 13px; }
.cf-opt .d { color: var(--muted); font-size: 12px; margin: 0 2px 8px; min-height: 36px; }
.cf-opt .acts { display: flex; gap: 6px; }
.cf-opt .acts .btn { flex: 1; padding: 7px 8px; font-size: 13px; }
.cf-opt.chosen { outline: 3px solid var(--oro); }
.cf-opt.faded { opacity: .45; }
.cf-opt .cf-off { height: 300px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 13px; }
.cf-opt .skel { height: 300px; border-radius: 6px; background: linear-gradient(90deg, #EFE8D6 25%, #F8F3E6 50%, #EFE8D6 75%); background-size: 200% 100%; animation: cf-sh 1.2s infinite; }
@keyframes cf-sh { to { background-position: -200% 0; } }
.cf-done { background: #EAF5EE; border: 1px solid #BFE0CB; color: #15563A; padding: 12px 14px; border-radius: 10px; margin-top: 12px; }
#cf-ver { margin-top: 10px; }

.cf-composer { border-top: 1px solid var(--border); background: #fff; padding: 12px 18px 14px; }
.cf-composer .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cf-composer .chip { border: 1px solid var(--border); background: var(--bg); color: var(--navy); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; }
.cf-composer .chip:hover { border-color: var(--oro-antiguo); }
.cf-composer .row { display: flex; gap: 10px; align-items: flex-end; }
.cf-vela { display: flex; gap: 6px; align-items: center; }
.cf-vela-foto { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.cf-composer select { border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; background: #fff; color: var(--navy); }
.cf-composer textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; min-height: 42px; max-height: 120px; }
.cf-composer textarea:focus, .cf-composer select:focus { outline: 2px solid var(--oro); border-color: var(--oro); }
.cf-composer .btn.gold { white-space: nowrap; padding: 10px 14px; }
.cf-modal .btn.green { background: var(--navy); border-color: var(--navy); color: #fff; }
.cf-composer .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.cf-zoom { position: fixed; inset: 0; background: rgba(0, 0, 0, .8); display: flex; align-items: center; justify-content: center; z-index: 70; cursor: zoom-out; }
.cf-zoom[hidden] { display: none; }
.cf-zoom img { max-height: 92vh; max-width: 92vw; border-radius: 8px; }

/* a phone: the window takes the whole screen and the options scroll sideways */
@media (max-width: 860px) {
  .cf-scrim { padding: 0; }
  .cf-modal { height: 100%; border-radius: 0; }
  .cf-mb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .cf-aside { border-right: 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; padding: 12px; min-width: 0; }
  .cf-aside .cur img { width: 70px; height: 100px; }
  .cf-aside .cur .fn, .cf-aside .rules, .cf-aside h3.r { display: none; }
  .cf-aside .meter { flex: 1; min-width: 0; }
  .cf-thread { padding: 14px; }
  .cf-opts { grid-template-columns: repeat(3, 70%); overflow-x: auto; scroll-snap-type: x mandatory; }
  .cf-opt { scroll-snap-align: start; }
  .cf-composer .row { flex-wrap: wrap; }
  .cf-vela { width: 100%; }
  .cf-vela select { flex: 1; min-width: 0; }
  .cf-composer textarea { flex: 1 1 100%; }
  .cf-composer .row .btn { width: 100%; }
}
