/**
 * Share Feature Styles
 * Styles for share popup, contact carousel, and share options
 */

/* =====================================================
   Share Popup
   ===================================================== */

.share_post_wid {
    display: flex;
    flex-direction: column;
    gap:0;
    min-width: 400px;
    max-width: 500px;
    box-sizing: border-box;
    padding-bottom: 10px;
}

.share_as_post_section {
    display: flex;
    flex-direction: column;
}

.share_txt_area {
    width: 100%;
    min-height: 60px;
    padding: 2px 12px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary, #e4e6eb);
    resize: none;
    outline: none;
}

.share_txt_area::placeholder {
    color: var(--text-secondary, #b0b3b8);
}

/* =====================================================
   Shared Post Preview
   ===================================================== */

.shared_post_preview {
    padding: 0 12px;
}

.shared_post_card {
    border: 1px solid var(--border-color, #3e4042);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary, #242526);
}

.shared_post_header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.shared_post_header .prof_img.small {
    width: 32px;
    height: 32px;
}

.shared_post_header .prof_img.small img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.shared_post_meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shared_post_author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #e4e6eb);
}

.shared_post_time {
    font-size: 12px;
    color: var(--text-secondary, #b0b3b8);
}

.shared_post_content {
    padding: 0 12px 12px;
    font-size: 14px;
    color: var(--text-primary, #e4e6eb);
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shared_post_image {
    max-height: 150px;
    overflow: hidden;
}

.shared_post_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =====================================================
   Share Action Row
   ===================================================== */

.share_action_row {
    display: flex;
    justify-content: flex-end;
    padding: 0 12px;
    margin-bottom: 14px;
}

/* =====================================================
   Share Divider
   ===================================================== */

.share_divider {
    height: 1px;
    background: var(--divider-color, #3e4042);
    margin: 4px 0 10px 0;
}

/* =====================================================
   Share Sections (Contacts & Options)
   ===================================================== */


.share_section_title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #e4e6eb);
    margin-bottom: 6px;
    opacity: .8;
    padding: 0 12px;
}

/* =====================================================
   Carousel Styles
   ===================================================== */

.share_contacts_carousel,
.share_options_carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel_container {
    flex: 1;
    overflow: hidden;
}

.carousel_track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 4px;
}

.carousel_track::-webkit-scrollbar {
    display: none;
}

.carousel_track.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.carousel_nav_btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary, #3a3b3c);
    color: var(--text-primary, #e4e6eb);
    cursor: pointer;
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, opacity 0.2s;
    z-index: 1;
}

.carousel_nav_btn:hover {
    background: var(--bg-hover, #4e4f50);
}


.carousel_nav_btn.hidden {
    opacity: 0;
    pointer-events: none;
}
.carousel_prev .carousel_next{
    position: absolute;
}
.carousel_prev{
    left: 8px;
}
.carousel_next{
    right: 8px;
}

/* =====================================================
   Contact Item
   ===================================================== */

.share_contact_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    min-width: 72px;
    transition: background 0.2s;
}

.share_contact_item:hover {
    background: var(--bg-hover, #3a3b3c);
}

.share_contact_avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary, #3a3b3c);
}

.share_contact_avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share_contact_name {
    font-size: 12px;
    color: var(--text-primary, #e4e6eb);
    text-align: center;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================================================
   Share Option Item
   ===================================================== */

.share_option_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    min-width: 72px;
    transition: background 0.2s;
}

.share_option_item:hover {
    background: var(--bg-hover, #3a3b3c);
}

.share_option_icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary, #3a3b3c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary, #e4e6eb);
}

.share_option_name {
    font-size: 12px;
    color: var(--text-primary, #e4e6eb);
    text-align: center;
}

/* =====================================================
   Responsive Adjustments
   ===================================================== */

@media (max-width: 500px) {
    .share_post_wid {
        min-width: 100%;
        max-width: 100%;
    }
    
    .carousel_nav_btn {
        display: none;
    }
    
    .carousel_track {
        padding: 4px 8px;
    }
}
