| 1 | /* MAPS Connect - Mensajes */ |
| 2 | |
| 3 | .messages-container { |
| 4 | --hub-accent: var(--accent-dark, #005a2b); |
| 5 | --hub-accent-dark: #004420; |
| 6 | --hub-accent-soft: var(--accent-soft, #e8f5e9); |
| 7 | --hub-border: #dcdfe6; |
| 8 | --hub-muted: #666; |
| 9 | |
| 10 | max-width: 1050px; |
| 11 | margin: 0 auto; |
| 12 | width: 100%; |
| 13 | height: calc(100vh - 110px); |
| 14 | min-height: 420px; |
| 15 | background: #ffffff; |
| 16 | border: 1px solid var(--hub-border); |
| 17 | display: grid; |
| 18 | grid-template-columns: 320px 1fr; |
| 19 | } |
| 20 | |
| 21 | @media (max-width: 768px) { |
| 22 | .messages-container { |
| 23 | grid-template-columns: 1fr; |
| 24 | height: auto; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | /* Bordes rectos institucionales (scopeado a la página) */ |
| 29 | .messages-container .avatar, |
| 30 | .messages-container .btn-solid, |
| 31 | .messages-container .btn-clean, |
| 32 | .messages-container .chat-search-box input, |
| 33 | .messages-container .chat-input-bar input, |
| 34 | .messages-container .message { |
| 35 | border-radius: 0; |
| 36 | } |
| 37 | |
| 38 | /* --- BANDEJA LATERAL (IZQUIERDA) --- */ |
| 39 | .chat-sidebar { |
| 40 | border-right: 1px solid var(--hub-border); |
| 41 | display: flex; |
| 42 | flex-direction: column; |
| 43 | background: #fafafa; |
| 44 | } |
| 45 | |
| 46 | .chat-search-box { |
| 47 | padding: 14px; |
| 48 | border-bottom: 1px solid #e0e0e0; |
| 49 | } |
| 50 | |
| 51 | .chat-search-box input { |
| 52 | width: 100%; |
| 53 | padding: 8px 12px; |
| 54 | border: 1px solid var(--hub-border); |
| 55 | outline: none; |
| 56 | background: #ffffff; |
| 57 | font-size: 0.88rem; |
| 58 | color: #1a1a1a; |
| 59 | } |
| 60 | |
| 61 | .chat-search-box input:focus { |
| 62 | border-color: var(--hub-accent); |
| 63 | } |
| 64 | |
| 65 | .conversation-list { |
| 66 | flex: 1; |
| 67 | overflow-y: auto; |
| 68 | } |
| 69 | |
| 70 | .chat-item { |
| 71 | display: flex; |
| 72 | align-items: center; |
| 73 | gap: 12px; |
| 74 | padding: 14px; |
| 75 | border-bottom: 1px solid #f0f0f0; |
| 76 | cursor: pointer; |
| 77 | background: #ffffff; |
| 78 | transition: background 0.15s; |
| 79 | } |
| 80 | |
| 81 | .chat-item:hover { |
| 82 | background: #f4f6f8; |
| 83 | } |
| 84 | |
| 85 | .chat-item.active { |
| 86 | background: var(--hub-accent-soft); |
| 87 | border-left: 4px solid var(--hub-accent); |
| 88 | } |
| 89 | |
| 90 | .avatar { |
| 91 | width: 40px; |
| 92 | height: 40px; |
| 93 | background-color: var(--hub-accent); |
| 94 | color: #ffffff; |
| 95 | display: flex; |
| 96 | align-items: center; |
| 97 | justify-content: center; |
| 98 | font-weight: bold; |
| 99 | font-size: 0.85rem; |
| 100 | flex-shrink: 0; |
| 101 | } |
| 102 | |
| 103 | .avatar.prof { |
| 104 | background-color: #0284c7; |
| 105 | } |
| 106 | |
| 107 | .chat-item-info { |
| 108 | flex: 1; |
| 109 | min-width: 0; |
| 110 | } |
| 111 | |
| 112 | .chat-item-header { |
| 113 | display: flex; |
| 114 | justify-content: space-between; |
| 115 | margin-bottom: 2px; |
| 116 | gap: 8px; |
| 117 | } |
| 118 | |
| 119 | .chat-item-header strong { |
| 120 | font-size: 0.9rem; |
| 121 | color: #222; |
| 122 | white-space: nowrap; |
| 123 | overflow: hidden; |
| 124 | text-overflow: ellipsis; |
| 125 | } |
| 126 | |
| 127 | .chat-item-header span { |
| 128 | font-size: 0.75rem; |
| 129 | color: #888; |
| 130 | flex-shrink: 0; |
| 131 | } |
| 132 | |
| 133 | .chat-item-preview { |
| 134 | font-size: 0.8rem; |
| 135 | color: var(--hub-muted); |
| 136 | white-space: nowrap; |
| 137 | overflow: hidden; |
| 138 | text-overflow: ellipsis; |
| 139 | } |
| 140 | |
| 141 | /* --- VENTANA PRINCIPAL DE CHAT (DERECHA) --- */ |
| 142 | .chat-window { |
| 143 | display: flex; |
| 144 | flex-direction: column; |
| 145 | background: #ffffff; |
| 146 | } |
| 147 | |
| 148 | .chat-header { |
| 149 | padding: 14px 20px; |
| 150 | border-bottom: 1px solid var(--hub-border); |
| 151 | display: flex; |
| 152 | justify-content: space-between; |
| 153 | align-items: center; |
| 154 | background: #ffffff; |
| 155 | gap: 12px; |
| 156 | flex-wrap: wrap; |
| 157 | } |
| 158 | |
| 159 | .chat-header-user { |
| 160 | display: flex; |
| 161 | align-items: center; |
| 162 | gap: 12px; |
| 163 | } |
| 164 | |
| 165 | .chat-header-user h3 { |
| 166 | font-size: 1rem; |
| 167 | color: #111; |
| 168 | } |
| 169 | |
| 170 | .chat-header-user span { |
| 171 | font-size: 0.8rem; |
| 172 | color: var(--hub-accent); |
| 173 | font-weight: 600; |
| 174 | } |
| 175 | |
| 176 | /* Cuerpo con los mensajes */ |
| 177 | .chat-body { |
| 178 | flex: 1; |
| 179 | padding: 20px; |
| 180 | overflow-y: auto; |
| 181 | display: flex; |
| 182 | flex-direction: column; |
| 183 | gap: 12px; |
| 184 | background-color: #f9fafb; |
| 185 | } |
| 186 | |
| 187 | .message { |
| 188 | max-width: 70%; |
| 189 | padding: 10px 14px; |
| 190 | font-size: 0.9rem; |
| 191 | line-height: 1.4; |
| 192 | } |
| 193 | |
| 194 | .message.received { |
| 195 | align-self: flex-start; |
| 196 | background-color: #ffffff; |
| 197 | border: 1px solid #e0e0e0; |
| 198 | color: #222; |
| 199 | } |
| 200 | |
| 201 | .message.sent { |
| 202 | align-self: flex-end; |
| 203 | background-color: var(--hub-accent); |
| 204 | color: #ffffff; |
| 205 | } |
| 206 | |
| 207 | .message-time { |
| 208 | display: block; |
| 209 | font-size: 0.7rem; |
| 210 | margin-top: 4px; |
| 211 | text-align: right; |
| 212 | opacity: 0.8; |
| 213 | } |
| 214 | |
| 215 | /* Estado vacío del chat */ |
| 216 | .chat-empty { |
| 217 | flex: 1; |
| 218 | display: flex; |
| 219 | align-items: center; |
| 220 | justify-content: center; |
| 221 | color: #999; |
| 222 | font-size: 0.9rem; |
| 223 | background-color: #f9fafb; |
| 224 | padding: 24px; |
| 225 | text-align: center; |
| 226 | } |
| 227 | |
| 228 | /* Barra de entrada inferior */ |
| 229 | .chat-input-bar { |
| 230 | padding: 14px 20px; |
| 231 | border-top: 1px solid var(--hub-border); |
| 232 | display: flex; |
| 233 | gap: 10px; |
| 234 | background: #ffffff; |
| 235 | } |
| 236 | |
| 237 | .chat-input-bar input { |
| 238 | flex: 1; |
| 239 | padding: 10px 14px; |
| 240 | border: 1px solid var(--hub-border); |
| 241 | outline: none; |
| 242 | font-size: 0.9rem; |
| 243 | color: #1a1a1a; |
| 244 | } |
| 245 | |
| 246 | .chat-input-bar input:focus { |
| 247 | border-color: var(--hub-accent); |
| 248 | } |
| 249 | |
| 250 | .messages-container .btn-solid { |
| 251 | background-color: var(--hub-accent); |
| 252 | color: #ffffff; |
| 253 | border: none; |
| 254 | padding: 10px 20px; |
| 255 | font-size: 0.9rem; |
| 256 | font-weight: bold; |
| 257 | cursor: pointer; |
| 258 | } |
| 259 | |
| 260 | .messages-container .btn-solid:hover { |
| 261 | background-color: var(--hub-accent-dark); |
| 262 | } |
| 263 | |
| 264 | .messages-container .btn-clean { |
| 265 | background-color: transparent; |
| 266 | color: #555; |
| 267 | border: 1px solid var(--hub-border); |
| 268 | padding: 8px 14px; |
| 269 | cursor: pointer; |
| 270 | font-weight: 600; |
| 271 | } |
| 272 | |
| 273 | /* --- ADJUNTOS --- */ |
| 274 | .adjunto-area { |
| 275 | display: flex; |
| 276 | align-items: center; |
| 277 | gap: 10px; |
| 278 | flex-shrink: 0; |
| 279 | } |
| 280 | |
| 281 | .chat-input-bar .btn-clean { |
| 282 | white-space: nowrap; |
| 283 | } |
| 284 | |
| 285 | .adjunto-pendiente { |
| 286 | display: inline-flex; |
| 287 | align-items: center; |
| 288 | gap: 6px; |
| 289 | max-width: 220px; |
| 290 | padding: 4px 8px; |
| 291 | background: var(--hub-accent-soft); |
| 292 | border: 1px solid var(--hub-accent); |
| 293 | font-size: 0.78rem; |
| 294 | color: var(--hub-accent-dark); |
| 295 | white-space: nowrap; |
| 296 | overflow: hidden; |
| 297 | text-overflow: ellipsis; |
| 298 | } |
| 299 | |
| 300 | .adjunto-pendiente[hidden] { |
| 301 | display: none; |
| 302 | } |
| 303 | |
| 304 | .adjunto-pendiente span { |
| 305 | overflow: hidden; |
| 306 | text-overflow: ellipsis; |
| 307 | } |
| 308 | |
| 309 | .adjunto-quitar { |
| 310 | background: transparent; |
| 311 | border: none; |
| 312 | color: var(--hub-accent-dark); |
| 313 | font-weight: bold; |
| 314 | cursor: pointer; |
| 315 | padding: 0 2px; |
| 316 | font-size: 0.8rem; |
| 317 | } |
| 318 | |
| 319 | .message-attachment { |
| 320 | display: flex; |
| 321 | align-items: center; |
| 322 | justify-content: space-between; |
| 323 | gap: 10px; |
| 324 | margin-bottom: 6px; |
| 325 | padding: 8px 10px; |
| 326 | background: rgba(255, 255, 255, 0.9); |
| 327 | border: 1px solid rgba(0, 0, 0, 0.12); |
| 328 | border-radius: 0; |
| 329 | } |
| 330 | |
| 331 | .message.sent .message-attachment { |
| 332 | background: rgba(255, 255, 255, 0.92); |
| 333 | border-color: rgba(0, 0, 0, 0.15); |
| 334 | } |
| 335 | |
| 336 | .attachment-info { |
| 337 | display: flex; |
| 338 | align-items: center; |
| 339 | gap: 8px; |
| 340 | min-width: 0; |
| 341 | } |
| 342 | |
| 343 | .attachment-icon { |
| 344 | background: var(--hub-accent); |
| 345 | color: #ffffff; |
| 346 | font-size: 0.62rem; |
| 347 | font-weight: bold; |
| 348 | padding: 4px 6px; |
| 349 | letter-spacing: 0.5px; |
| 350 | flex-shrink: 0; |
| 351 | } |
| 352 | |
| 353 | .message.sent .attachment-icon { |
| 354 | background: #ffffff; |
| 355 | color: var(--hub-accent); |
| 356 | } |
| 357 | |
| 358 | .attachment-info > span:last-child { |
| 359 | display: flex; |
| 360 | flex-direction: column; |
| 361 | min-width: 0; |
| 362 | } |
| 363 | |
| 364 | .attachment-nombre { |
| 365 | font-size: 0.8rem; |
| 366 | color: #111; |
| 367 | white-space: nowrap; |
| 368 | overflow: hidden; |
| 369 | text-overflow: ellipsis; |
| 370 | max-width: 200px; |
| 371 | } |
| 372 | |
| 373 | .attachment-peso { |
| 374 | font-size: 0.68rem; |
| 375 | color: var(--hub-muted); |
| 376 | } |
| 377 | |
| 378 | .adjunto-descargar { |
| 379 | flex-shrink: 0; |
| 380 | background: transparent; |
| 381 | border: 1px solid var(--hub-accent); |
| 382 | color: var(--hub-accent); |
| 383 | padding: 4px 10px; |
| 384 | font-size: 0.72rem; |
| 385 | font-weight: 700; |
| 386 | cursor: pointer; |
| 387 | border-radius: 0; |
| 388 | } |
| 389 | |
| 390 | .message.sent .adjunto-descargar { |
| 391 | border-color: #ffffff; |
| 392 | color: #ffffff; |
| 393 | } |
| 394 | |
| 395 | .adjunto-descargar:hover { |
| 396 | background: var(--hub-accent); |
| 397 | color: #ffffff; |
| 398 | } |
| 399 | |
| 400 | .message.sent .adjunto-descargar:hover { |
| 401 | background: #ffffff; |
| 402 | color: var(--hub-accent); |
| 403 | } |
| 404 | |
| 405 | .message-texto { |
| 406 | margin: 0 0 4px; |
| 407 | overflow-wrap: break-word; |
| 408 | } |
| 409 |