/* assets/css/chat_media.css - Shared Camera, Photo/File Upload, Lightbox & Media Bubble Styles */

.btn-chat-media {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.18s ease;
    padding: 0;
}
.btn-chat-media:hover {
    background: #ea580c;
    color: #ffffff;
    border-color: #ea580c;
    transform: translateY(-1px);
}
.btn-chat-media:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Media Chat Bubble */
.cm-bubble {
    max-width: 280px;
    border-radius: 14px;
    overflow: hidden;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
    font-family: 'Outfit', sans-serif;
}
.cm-bubble.cm-sent {
    background: #ea580c;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}
.cm-bubble.cm-received {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
}
.cm-img-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    background: #0f172a;
}
.cm-img-wrap img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.cm-img-wrap:hover img {
    transform: scale(1.02);
}
.cm-zoom-hint {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 999px;
    pointer-events: none;
}
.cm-file-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.16);
    color: inherit !important;
}
.cm-received .cm-file-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.cm-file-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #fff7ed;
    color: #ea580c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.cm-caption {
    padding: 6px 6px 2px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}
.cm-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 2px;
    font-size: 0.68rem;
    opacity: 0.82;
}
.cm-expired-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 0.82rem;
    font-style: italic;
}

/* Modal Backdrop (Camera + Preview + Lightbox) */
.cm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(4px);
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}
.cm-modal-overlay.active {
    display: flex;
}
.cm-modal-box {
    background: #ffffff;
    border-radius: 18px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}
.cm-modal-head {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.95rem;
}
.cm-close-btn {
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cm-camera-stage {
    position: relative;
    background: #000;
    width: 100%;
    min-height: 280px;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.cm-camera-stage video,
.cm-camera-stage img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
}
.cm-modal-body {
    padding: 14px 16px;
}
.cm-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Lightbox Zoom */
.cm-lightbox-box {
    position: relative;
    max-width: 94vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.cm-lightbox-img-wrap {
    max-width: 92vw;
    max-height: 80vh;
    overflow: auto;
    border-radius: 10px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cm-lightbox-img-wrap img {
    max-width: 100%;
    max-height: 78vh;
    transition: transform 0.2s ease;
    transform-origin: center center;
}
.cm-lightbox-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.cm-lightbox-toolbar button,
.cm-lightbox-toolbar a {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.cm-lightbox-toolbar button:hover,
.cm-lightbox-toolbar a:hover {
    background: #ea580c;
    border-color: #ea580c;
}
