/* Share Button và Dropdown */
.share-btn {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 0.6rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
    background: #f9fafb;
}

.share-btn:active {
    transform: translateY(0);
}

.share-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
    min-width: 200px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    background: white;
}

.share-option:last-child {
    border-bottom: none;
}

.share-option:hover {
    background: #f9fafb;
    color: #1f2937;
}

.share-option i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.share-option span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.share-option[onclick*="Facebook"] i { color: #1877f2; }
.share-option[onclick*="Messenger"] i { color: #0084ff; }
.share-option[onclick*="Telegram"] i { color: #0088cc; }
.share-option[onclick*="Twitter"] i { color: #1da1f2; }
.share-option[onclick*="WhatsApp"] i { color: #25d366; }
.share-option[onclick*="copyLink"] i { color: #6b7280; }

/* Mobile dropdown positioning - hiển thị giữa màn hình */
@media (max-width: 768px) {
    .share-dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        right: auto !important;
        min-width: 250px !important;
        max-width: 90vw !important;
        margin-top: 0 !important;
        z-index: 10000 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
        background: white !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 12px !important;
    }
    
    /* Loại bỏ overlay tự động trong dropdown */
    .share-dropdown::before {
        display: none !important;
    }
    
    /* Đảm bảo text trong dropdown có màu đen rõ ràng */
    .share-dropdown .share-option {
        color: #374151 !important;
        background: white !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }
    
    .share-dropdown .share-option:hover {
        background: #f9fafb !important;
        color: #1f2937 !important;
    }
    
    .share-dropdown .share-option:last-child {
        border-bottom: none !important;
    }
    
    .share-dropdown .share-option span {
        color: #374151 !important;
        font-weight: 500 !important;
    }
    
    .share-dropdown .share-option i {
        color: inherit !important;
    }
    
    /* Giữ màu icon cho từng mạng xã hội */
    .share-dropdown .share-option[onclick*="Facebook"] i { color: #1877f2 !important; }
    .share-dropdown .share-option[onclick*="Messenger"] i { color: #0084ff !important; }
    .share-dropdown .share-option[onclick*="Telegram"] i { color: #0088cc !important; }
    .share-dropdown .share-option[onclick*="Twitter"] i { color: #1da1f2 !important; }
    .share-dropdown .share-option[onclick*="WhatsApp"] i { color: #25d366 !important; }
    .share-dropdown .share-option[onclick*="copyLink"] i { color: #6b7280 !important; }
}

/* Mobile responsive cho các nút */
@media (max-width: 768px) {
    .download-btn, .share-btn, .apple-p12-modal-btn {
        min-width: auto;
        width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .apple-p12-modal-btn {
        min-width: auto;
        width: auto !important;
        max-width: none !important;
        flex-shrink: 0;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }
    
    /* Container cho nút Apple P12 */
    .flex.justify-center {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    /* Đảm bảo text hiển thị đầy đủ trên mobile */
    .download-btn .btn-text,
    .share-btn span,
    .apple-p12-modal-btn span {
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
    }
    
    /* Tăng padding cho nút để text không bị cắt */
    .download-btn {
        padding: 0.6rem 1.2rem;
        min-width: max-content;
    }
    
    .share-btn {
        padding: 0.6rem 1.2rem;
        min-width: max-content;
    }
}

/* Mobile nhỏ hơn - đảm bảo text không bị cắt */
@media (max-width: 480px) {
    .download-btn, .share-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        min-width: max-content;
    }
    
    .download-btn .btn-text,
    .share-btn span {
        white-space: nowrap;
        overflow: visible;
        text-overflow: unset;
    }
}

/* Mobile rất nhỏ - sử dụng layout dọc */
@media (max-width: 360px) {
    .md\:hidden .flex.gap-2 {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .download-btn, .share-btn {
        width: 100%;
        justify-content: center;
    }
} 